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
This commit is contained in:
committed by
Naveen Krishna Chatradhi
parent
3f9e4d95d4
commit
dd00a16124
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user