From eb2c98bb009d3649b7781211242fa4f4da68520f Mon Sep 17 00:00:00 2001 From: agodavar Date: Mon, 31 May 2021 04:02:56 -0700 Subject: [PATCH] SWDEV-288708 - Rationalize HIP runtime and device version reporting Change-Id: I49a7ee1fa9ae3ef5f26d99d18c0b8bb58cb9d5ce --- rocclr/hip_context.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rocclr/hip_context.cpp b/rocclr/hip_context.cpp index 5b4bdb73ab..60bb43421d 100755 --- a/rocclr/hip_context.cpp +++ b/rocclr/hip_context.cpp @@ -246,16 +246,13 @@ hipError_t hipCtxPushCurrent(hipCtx_t ctx) { hipError_t hipDriverGetVersion(int* driverVersion) { HIP_INIT_API(hipDriverGetVersion, driverVersion); - auto* deviceHandle = g_devices[0]->devices()[0]; - const auto& info = deviceHandle->info(); - - if (driverVersion) { - *driverVersion = AMD_PLATFORM_BUILD_NUMBER * 100 + - AMD_PLATFORM_REVISION_NUMBER; - } else { + if (!driverVersion) { HIP_RETURN(hipErrorInvalidValue); } + // HIP_VERSION = HIP_VERSION_MAJOR*100 + HIP_MINOR_VERSION + *driverVersion = HIP_VERSION; + HIP_RETURN(hipSuccess); }