Renamed API amdsmi_dev_get_subsystem_id to

amdsmi_get_gpu_subsystem_id

grep -rli 'amdsmi_dev_get_subsystem_id' * | xargs -i@ sed -i
's/amdsmi_dev_get_subsystem_id/amdsmi_get_gpu_subsystem_id/g' @

Change-Id: I64616ac4c001f7761b8d83120d05d21c5c8e763f


[ROCm/amdsmi commit: 14f1367d6b]
Este commit está contenido en:
Deepak Mewar
2023-02-25 07:08:28 -05:00
cometido por Naveen Krishna Chatradhi
padre 06cedb0eed
commit cccbca0e65
Se han modificado 10 ficheros con 20 adiciones y 20 borrados
+1 -1
Ver fichero
@@ -1397,7 +1397,7 @@ amdsmi_status_t amdsmi_get_gpu_vram_vendor(amdsmi_processor_handle processor_han
*
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t amdsmi_dev_get_subsystem_id(amdsmi_processor_handle processor_handle, uint16_t *id);
amdsmi_status_t amdsmi_get_gpu_subsystem_id(amdsmi_processor_handle processor_handle, uint16_t *id);
/**
* @brief Get the name string for the device subsytem
+3 -3
Ver fichero
@@ -2986,7 +2986,7 @@ except AmdSmiException as e:
print(e)
```
## amdsmi_dev_get_subsystem_id
## amdsmi_get_gpu_subsystem_id
Description: Get the subsystem device id associated with the device with provided device handle.
Input parameters:
@@ -2995,7 +2995,7 @@ Input parameters:
Output: subsystem device id
Exceptions that can be thrown by `amdsmi_dev_get_subsystem_id` function:
Exceptions that can be thrown by `amdsmi_get_gpu_subsystem_id` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
* `AmdSmiParameterException`
@@ -3008,7 +3008,7 @@ try:
print("No GPUs on machine")
else:
for device in devices:
id = amdsmi_dev_get_subsystem_id(device)
id = amdsmi_get_gpu_subsystem_id(device)
print(id)
except AmdSmiException as e:
print(e)
+1 -1
Ver fichero
@@ -161,7 +161,7 @@ from .amdsmi_interface import amdsmi_get_gpu_vendor_name
from .amdsmi_interface import amdsmi_get_gpu_id
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_get_gpu_subsystem_id
from .amdsmi_interface import amdsmi_dev_get_subsystem_name
# # Version information
@@ -1137,7 +1137,7 @@ def amdsmi_dev_get_drm_render_minor(processor_handle: amdsmi_wrapper.amdsmi_proc
return minor.value
def amdsmi_dev_get_subsystem_id(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
def amdsmi_get_gpu_subsystem_id(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
@@ -1145,7 +1145,7 @@ def amdsmi_dev_get_subsystem_id(processor_handle: amdsmi_wrapper.amdsmi_processo
id = ctypes.c_uint16()
_check_res(
amdsmi_wrapper.amdsmi_dev_get_subsystem_id(
amdsmi_wrapper.amdsmi_get_gpu_subsystem_id(
processor_handle, ctypes.byref(id))
)
+4 -4
Ver fichero
@@ -1430,9 +1430,9 @@ uint32_t = ctypes.c_uint32
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)]
amdsmi_get_gpu_subsystem_id = _libraries['libamd_smi.so'].amdsmi_get_gpu_subsystem_id
amdsmi_get_gpu_subsystem_id.restype = amdsmi_status_t
amdsmi_get_gpu_subsystem_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint16)]
amdsmi_dev_get_subsystem_name = _libraries['libamd_smi.so'].amdsmi_dev_get_subsystem_name
amdsmi_dev_get_subsystem_name.restype = amdsmi_status_t
amdsmi_dev_get_subsystem_name.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_char), size_t]
@@ -1867,7 +1867,7 @@ __all__ = \
'amdsmi_dev_get_pci_throughput', 'amdsmi_dev_get_perf_level',
'amdsmi_dev_get_power_ave',
'amdsmi_dev_get_power_profile_presets',
'amdsmi_dev_get_subsystem_id', 'amdsmi_dev_get_subsystem_name',
'amdsmi_get_gpu_subsystem_id', 'amdsmi_dev_get_subsystem_name',
'amdsmi_dev_get_temp_metric', 'amdsmi_get_gpu_vendor_name',
'amdsmi_dev_get_volt_metric', 'amdsmi_get_gpu_vram_vendor',
'amdsmi_dev_open_supported_func_iterator',
+2 -2
Ver fichero
@@ -291,7 +291,7 @@ class Formatter:
| """ + self.style.text(" 2 Get device id. Api: amdsmi_get_gpu_id <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(" 5 Get device subsystem id. Api: amdsmi_get_gpu_subsystem_id <bdf>") + """ |
| """ + self.style.text(" 6 Get device subsystem name. Api: amdsmi_dev_get_subsystem_name <bdf>") + """ |
| """ + self.style.text(" 7 Get device pci id. Api: amdsmi_dev_get_pci_id <bdf>") + """ |
| """ + self.style.text(" 8 Get device pci bandwidth. Api: amdsmi_dev_get_pci_bandwidth <bdf>") + """ |
@@ -734,7 +734,7 @@ commands = {
4: [smi_api.amdsmi_dev_get_drm_render_minor, {
"device_identifier1": [None, True]
}],
5: [smi_api.amdsmi_dev_get_subsystem_id, {
5: [smi_api.amdsmi_get_gpu_subsystem_id, {
"device_identifier1": [None, True]
}],
6: [smi_api.amdsmi_dev_get_subsystem_name, {
+2 -2
Ver fichero
@@ -622,7 +622,7 @@ amdsmi_get_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_info_
}
amdsmi_status_t amdsmi_dev_get_subsystem_id(amdsmi_processor_handle processor_handle,
amdsmi_status_t amdsmi_get_gpu_subsystem_id(amdsmi_processor_handle processor_handle,
uint16_t *id) {
return rsmi_wrapper(rsmi_dev_subsystem_id_get, processor_handle, id);
}
@@ -896,7 +896,7 @@ amdsmi_get_func_iter_value(amdsmi_func_id_iter_handle_t handle,
{"rsmi_dev_brand_get", "amdsmi_get_asic_info"},
{"rsmi_dev_vendor_name_get", "amdsmi_get_gpu_vendor_name"},
{"rsmi_dev_serial_number_get", "amdsmi_get_asic_info"},
{"rsmi_dev_subsystem_id_get", "amdsmi_dev_get_subsystem_id"},
{"rsmi_dev_subsystem_id_get", "amdsmi_get_gpu_subsystem_id"},
{"rsmi_dev_subsystem_name_get", "amdsmi_dev_get_subsystem_name"},
{"rsmi_dev_drm_render_minor_get", "amdsmi_dev_get_drm_render_minor"},
{"rsmi_dev_subsystem_vendor_id_get", "amdsmi_get_asic_info"},
@@ -177,10 +177,10 @@ void TestIdInfoRead::Run(void) {
}
// Get the device ID, name, vendor ID and vendor name for the sub-device
err = amdsmi_dev_get_subsystem_id(processor_handles_[i], &id);
err = amdsmi_get_gpu_subsystem_id(processor_handles_[i], &id);
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
// Verify api support checking functionality is working
err = amdsmi_dev_get_subsystem_id(processor_handles_[i], nullptr);
err = amdsmi_get_gpu_subsystem_id(processor_handles_[i], nullptr);
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
} else {
CHK_ERR_ASRT(err)
@@ -188,7 +188,7 @@ void TestIdInfoRead::Run(void) {
std::cout << "\t**Subsystem ID: 0x" << std::hex << id << std::endl;
}
// Verify api support checking functionality is working
err = amdsmi_dev_get_subsystem_id(processor_handles_[i], nullptr);
err = amdsmi_get_gpu_subsystem_id(processor_handles_[i], nullptr);
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
}
err = amdsmi_dev_get_subsystem_name(processor_handles_[i], buffer, kBufferLen);
@@ -213,7 +213,7 @@ void TestMutualExclusion::Run(void) {
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
ret = amdsmi_get_gpu_vram_vendor(processor_handles_[0], dmy_str, 10);
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
ret = amdsmi_dev_get_subsystem_id(processor_handles_[0], &dmy_ui16);
ret = amdsmi_get_gpu_subsystem_id(processor_handles_[0], &dmy_ui16);
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
ret = amdsmi_dev_get_pci_id(processor_handles_[0], &dmy_ui64);
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
+1 -1
Ver fichero
@@ -187,7 +187,7 @@ void TestBase::PrintDeviceHeader(amdsmi_processor_handle dv_ind) {
}
}
err = amdsmi_dev_get_subsystem_id(dv_ind, &val_ui16);
err = amdsmi_get_gpu_subsystem_id(dv_ind, &val_ui16);
CHK_ERR_ASRT(err)
IF_VERB(STANDARD) {
std::cout << "\t**Subsystem ID: 0x" << std::hex << val_ui16 << std::endl;