Skip to content

GpaGetDeviceAndRevisionId

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

Syntax

GpaStatus GpaGetDeviceAndRevisionId(
GpaContextId context_id,
GpaUInt32* device_id,
GpaUInt32* revision_id);

Description

Gets the GPU device id and revision id associated with the specified context.

Parameters

NameDescription
context_idUnique identifier of a previously-opened context.
device_idThe value that will be set to the device id upon successful execution.
revision_idThe value that will be set to the device revision id upon successful execution.

Return value

Return valueDescription
kGpaStatusOkThe device id and revision id were successfully retrieved.
kGpaStatusErrorGpaNotInitializedGPA was not initialized. Call GpaInitialize before all other entrypoints.
kGpaStatusErrorNullPointerThe supplied device_id parameter is NULL.

The supplied revision_id 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 id and revision id could not be retrieved. | | kGpaStatusErrorException | Exception occurred. |