Change device_type to processor_type

also rename amdsmi_get_device_type to amdsmi_get_processor_type

grep -rli 'device_type' * | xargs -i@ sed -i
's/device_type/processor_type/g' @

Change-Id: Ic6a73c1a170757d5ab5d10ad20b4fc2f0b280e78
此提交包含在:
Suma Hegde
2023-02-25 05:30:19 -05:00
提交者 Naveen Krishna Chatradhi
父節點 3f9e4d95d4
當前提交 dd00a16124
共有 11 個檔案被更改,包括 45 行新增45 行删除
+4 -4
查看文件
@@ -257,11 +257,11 @@ int main() {
// For each device of the socket, get name and temperature.
for (uint32_t j = 0; j < device_count; j++) {
// Get device type. Since the amdsmi is initialized with
// AMD_SMI_INIT_AMD_GPUS, the device_type must be AMD_GPU.
device_type_t device_type = {};
ret = amdsmi_get_device_type(processor_handles[j], &device_type);
// AMD_SMI_INIT_AMD_GPUS, the processor_type must be AMD_GPU.
processor_type_t processor_type = {};
ret = amdsmi_get_processor_type(processor_handles[j], &processor_type);
CHK_AMDSMI_RET(ret)
if (device_type != AMD_GPU) {
if (processor_type != AMD_GPU) {
std::cout << "Expect AMD_GPU device type!\n";
return AMDSMI_STATUS_NOT_SUPPORTED;
}
+4 -4
查看文件
@@ -109,11 +109,11 @@ int main() {
// For each device of the socket, get name and temperature.
for (uint32_t j = 0; j < device_count; j++) {
// Get device type. Since the amdsmi is initialized with
// AMD_SMI_INIT_AMD_GPUS, the device_type must be AMD_GPU.
device_type_t device_type = {};
ret = amdsmi_get_device_type(processor_handles[j], &device_type);
// AMD_SMI_INIT_AMD_GPUS, the processor_type must be AMD_GPU.
processor_type_t processor_type = {};
ret = amdsmi_get_processor_type(processor_handles[j], &processor_type);
CHK_AMDSMI_RET(ret)
if (device_type != AMD_GPU) {
if (processor_type != AMD_GPU) {
std::cout << "Expect AMD_GPU device type!\n";
return AMDSMI_STATUS_NOT_SUPPORTED;
}