Renamed API amdsmi_dev_get_vram_vendor to
amdsmi_get_gpu_vram_vendor
grep -rli 'amdsmi_dev_get_vram_vendor' * | xargs -i@ sed -i
's/amdsmi_dev_get_vram_vendor/amdsmi_get_gpu_vram_vendor/g' @
Change-Id: I3c11643a778f147027d0d3121b9782931439c752
[ROCm/amdsmi commit: f69a6ea64e]
This commit is contained in:
committed by
Naveen Krishna Chatradhi
szülő
60a4679846
commit
06cedb0eed
@@ -2930,7 +2930,7 @@ except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
## amdsmi_dev_get_vram_vendor
|
||||
## amdsmi_get_gpu_vram_vendor
|
||||
Description: Get the vram vendor string of a gpu device.
|
||||
|
||||
Input parameters:
|
||||
@@ -2939,7 +2939,7 @@ Input parameters:
|
||||
|
||||
Output: vram vendor
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_dev_get_vram_vendor` function:
|
||||
Exceptions that can be thrown by `amdsmi_get_gpu_vram_vendor` function:
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
* `AmdSmiParameterException`
|
||||
@@ -2952,7 +2952,7 @@ try:
|
||||
print("No GPUs on machine")
|
||||
else:
|
||||
for device in devices:
|
||||
vram_vendor = amdsmi_dev_get_vram_vendor(device)
|
||||
vram_vendor = amdsmi_get_gpu_vram_vendor(device)
|
||||
print(vram_vendor)
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
|
||||
@@ -159,7 +159,7 @@ from .amdsmi_interface import AmdSmiEventReader
|
||||
# # Device Identification information
|
||||
from .amdsmi_interface import amdsmi_get_gpu_vendor_name
|
||||
from .amdsmi_interface import amdsmi_get_gpu_id
|
||||
from .amdsmi_interface import amdsmi_dev_get_vram_vendor
|
||||
from .amdsmi_interface import amdsmi_get_gpu_vram_vendor
|
||||
from .amdsmi_interface import amdsmi_dev_get_drm_render_minor
|
||||
from .amdsmi_interface import amdsmi_dev_get_subsystem_id
|
||||
from .amdsmi_interface import amdsmi_dev_get_subsystem_name
|
||||
|
||||
@@ -1102,7 +1102,7 @@ def amdsmi_get_gpu_id(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
|
||||
return id.value
|
||||
|
||||
|
||||
def amdsmi_dev_get_vram_vendor(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
|
||||
def amdsmi_get_gpu_vram_vendor(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
|
||||
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
|
||||
raise AmdSmiParameterException(
|
||||
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
|
||||
@@ -1114,7 +1114,7 @@ def amdsmi_dev_get_vram_vendor(processor_handle: amdsmi_wrapper.amdsmi_processor
|
||||
vram_vendor = ctypes.create_string_buffer(_AMDSMI_STRING_LENGTH)
|
||||
|
||||
_check_res(
|
||||
amdsmi_wrapper.amdsmi_dev_get_vram_vendor(
|
||||
amdsmi_wrapper.amdsmi_get_gpu_vram_vendor(
|
||||
processor_handle, vram_vendor, length)
|
||||
)
|
||||
|
||||
|
||||
@@ -1427,9 +1427,9 @@ amdsmi_get_gpu_vendor_name = _libraries['libamd_smi.so'].amdsmi_get_gpu_vendor_n
|
||||
amdsmi_get_gpu_vendor_name.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_vendor_name.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_char), size_t]
|
||||
uint32_t = ctypes.c_uint32
|
||||
amdsmi_dev_get_vram_vendor = _libraries['libamd_smi.so'].amdsmi_dev_get_vram_vendor
|
||||
amdsmi_dev_get_vram_vendor.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_vram_vendor.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_char), uint32_t]
|
||||
amdsmi_get_gpu_vram_vendor = _libraries['libamd_smi.so'].amdsmi_get_gpu_vram_vendor
|
||||
amdsmi_get_gpu_vram_vendor.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_vram_vendor.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_char), uint32_t]
|
||||
amdsmi_dev_get_subsystem_id = _libraries['libamd_smi.so'].amdsmi_dev_get_subsystem_id
|
||||
amdsmi_dev_get_subsystem_id.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_subsystem_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint16)]
|
||||
@@ -1869,7 +1869,7 @@ __all__ = \
|
||||
'amdsmi_dev_get_power_profile_presets',
|
||||
'amdsmi_dev_get_subsystem_id', 'amdsmi_dev_get_subsystem_name',
|
||||
'amdsmi_dev_get_temp_metric', 'amdsmi_get_gpu_vendor_name',
|
||||
'amdsmi_dev_get_volt_metric', 'amdsmi_dev_get_vram_vendor',
|
||||
'amdsmi_dev_get_volt_metric', 'amdsmi_get_gpu_vram_vendor',
|
||||
'amdsmi_dev_open_supported_func_iterator',
|
||||
'amdsmi_dev_open_supported_variant_iterator',
|
||||
'amdsmi_dev_perf_level_t', 'amdsmi_dev_perf_level_t__enumvalues',
|
||||
|
||||
@@ -289,7 +289,7 @@ class Formatter:
|
||||
| |
|
||||
| """ + self.style.text(" 1 Get device vendor name. Api: amdsmi_get_gpu_vendor_name <bdf>") + """ |
|
||||
| """ + self.style.text(" 2 Get device id. Api: amdsmi_get_gpu_id <bdf>") + """ |
|
||||
| """ + self.style.text(" 3 Get device vram vendor. Api: amdsmi_dev_get_vram_vendor <bdf>") + """ |
|
||||
| """ + self.style.text(" 3 Get device vram vendor. Api: amdsmi_get_gpu_vram_vendor <bdf>") + """ |
|
||||
| """ + self.style.text(" 4 Get device drm render minor. Api: amdsmi_dev_get_drm_render_minor <bdf>") + """ |
|
||||
| """ + self.style.text(" 5 Get device subsystem id. Api: amdsmi_dev_get_subsystem_id <bdf>") + """ |
|
||||
| """ + self.style.text(" 6 Get device subsystem name. Api: amdsmi_dev_get_subsystem_name <bdf>") + """ |
|
||||
@@ -728,7 +728,7 @@ commands = {
|
||||
2: [smi_api.amdsmi_get_gpu_id, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
3: [smi_api.amdsmi_dev_get_vram_vendor, {
|
||||
3: [smi_api.amdsmi_get_gpu_vram_vendor, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
4: [smi_api.amdsmi_dev_get_drm_render_minor, {
|
||||
|
||||
Reference in New Issue
Block a user