Skip to content

GpaGetDeviceGeneration

Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All rights reserved.

Syntax

GpaStatus GpaGetDeviceGeneration(
GpaContextId context_id,
GpaHwGeneration* hardware_generation);

Description

Gets the device generation of the GPU associated with the specified context.

Parameters

NameDescription
context_idUnique identifier of a previously-opened context.
hardware_generationThe value that will be set to the device generation upon successful execution.

Return value

Return valueDescription
kGpaStatusOkThe device generation was successfully retrieved.
kGpaStatusErrorGpaNotInitializedGPA was not initialized. Call GpaInitialize before all other entrypoints.
kGpaStatusErrorNullPointerThe supplied hardware_generation parameter is NULL.

The supplied context_id parameter is NULL. | | kGpaStatusErrorContextNotOpen | The supplied context is not currently open. | | kGpaStatusErrorContextNotFound | The supplied context_id parameter was not recognized as a previously-opened context identifier. | | kGpaStatusErrorFailed | The device generation could not be retrieved. | | kGpaStatusErrorException | Exception occurred. |