[SWDEV-481004] Fix for incorrect gfx_version number (#52)
The target_graphics_version was not formatted properly and was showing incorrect Target Name. Corrected this by fomatting major, minor and revision numbers. Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
This commit is contained in:
committed by
GitHub
parent
9cc5c303a2
commit
6fa991c39c
@@ -398,11 +398,8 @@ def getTargetGfxVersion(device, silent=False):
|
||||
market_name = str(getDeviceName(device, True))
|
||||
gfx_ver_ret = "N/A"
|
||||
ret = rocmsmi.rsmi_dev_target_graphics_version_get(device, byref(target_graphics_version))
|
||||
target_graphics_version = str(target_graphics_version.value)
|
||||
target_graphics_version = hex(target_graphics_version.value)[2:]
|
||||
if rsmi_ret_ok(ret, device, 'get_target_gfx_version', silent=silent):
|
||||
if len(target_graphics_version) == 4 and ("Instinct MI2" in market_name):
|
||||
hex_part = str(hex(int(str(target_graphics_version)[2:]))).replace("0x", "")
|
||||
target_graphics_version = str(target_graphics_version)[:2] + hex_part
|
||||
gfx_ver_ret = "gfx" + str(target_graphics_version)
|
||||
return gfx_ver_ret
|
||||
|
||||
|
||||
Reference in New Issue
Block a user