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:
Deepak Mewar
2023-02-25 07:06:13 -05:00
committed by Naveen Krishna Chatradhi
parent 60a4679846
commit 06cedb0eed
9 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -1363,7 +1363,7 @@ amdsmi_status_t amdsmi_get_gpu_vendor_name(amdsmi_processor_handle processor_han
* buffer @p brand.
*
* If the vram vendor for the device is not found as one of the values
* contained within amdsmi_dev_get_vram_vendor, then this function will return
* contained within amdsmi_get_gpu_vram_vendor, then this function will return
* the string 'unknown' instead of the vram vendor.
*
* @param[in] processor_handle a device handle
@@ -1375,7 +1375,7 @@ amdsmi_status_t amdsmi_get_gpu_vendor_name(amdsmi_processor_handle processor_han
*
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t amdsmi_dev_get_vram_vendor(amdsmi_processor_handle processor_handle, char *brand,
amdsmi_status_t amdsmi_get_gpu_vram_vendor(amdsmi_processor_handle processor_handle, char *brand,
uint32_t len);
/**
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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, {
+2 -2
View File
@@ -638,7 +638,7 @@ amdsmi_status_t amdsmi_get_gpu_vendor_name(
return rsmi_wrapper(rsmi_dev_vendor_name_get, processor_handle, name, len);
}
amdsmi_status_t amdsmi_dev_get_vram_vendor(amdsmi_processor_handle processor_handle,
amdsmi_status_t amdsmi_get_gpu_vram_vendor(amdsmi_processor_handle processor_handle,
char *brand, uint32_t len) {
return rsmi_wrapper(rsmi_dev_vram_vendor_get, processor_handle, brand, len);
}
@@ -888,7 +888,7 @@ amdsmi_get_func_iter_value(amdsmi_func_id_iter_handle_t handle,
return AMDSMI_STATUS_INVAL;
static const std::map<std::string, const char*> rsmi_2_amdsmi = {
{"rsmi_dev_vram_vendor_get", "amdsmi_dev_get_vram_vendor"},
{"rsmi_dev_vram_vendor_get", "amdsmi_get_gpu_vram_vendor"},
{"rsmi_dev_id_get", "amdsmi_get_gpu_id"},
{"rsmi_dev_vendor_id_get", "amdsmi_get_asic_info"},
{"rsmi_dev_name_get", "amdsmi_get_board_info"},
@@ -132,11 +132,11 @@ void TestIdInfoRead::Run(void) {
err = amdsmi_get_board_info(processor_handles_[0], &board_info);
CHK_ERR_ASRT(err)
err = amdsmi_dev_get_vram_vendor(processor_handles_[i], buffer, kBufferLen);
err = amdsmi_get_gpu_vram_vendor(processor_handles_[i], buffer, kBufferLen);
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
std::cout <<
"\t**Vram Vendor string not supported on this system." << std::endl;
err = amdsmi_dev_get_vram_vendor(processor_handles_[i], nullptr, kBufferLen);
err = amdsmi_get_gpu_vram_vendor(processor_handles_[i], nullptr, kBufferLen);
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
} else {
CHK_ERR_ASRT(err)
@@ -211,7 +211,7 @@ void TestMutualExclusion::Run(void) {
ret = amdsmi_get_gpu_vendor_name(processor_handles_[0], dmy_str, 10);
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
ret = amdsmi_dev_get_vram_vendor(processor_handles_[0], dmy_str, 10);
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);
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
@@ -265,7 +265,7 @@ void TestMutualExclusion::Run(void) {
amdsmi_dev_firmware_version_get
amdsmi_dev_name_get
amdsmi_dev_brand_get
amdsmi_dev_get_vram_vendor
amdsmi_get_gpu_vram_vendor
amdsmi_dev_get_subsystem_name
amdsmi_dev_get_drm_render_minor
amdsmi_get_gpu_vendor_name