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
Tento commit je obsažen v:
Suma Hegde
2023-02-25 05:30:19 -05:00
odevzdal Naveen Krishna Chatradhi
rodič 3f9e4d95d4
revize dd00a16124
11 změnil soubory, kde provedl 45 přidání a 45 odebrání
+4 -4
Zobrazit soubor
@@ -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;
}