diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 8ef2bb8a52..b92afb14cb 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -1650,7 +1650,7 @@ amdsmi_status_t amdsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle, /** * @brief Get the NUMA node associated with a device * - * @details Given a processor handle @p processor_handle and a pointer to a uint32_t @p + * @details Given a processor handle @p processor_handle and a pointer to a int32_t @p * numa_node, this function will retrieve the NUMA node value associated * with device @p processor_handle and store the value at location pointed to by * @p numa_node. @@ -1666,7 +1666,7 @@ amdsmi_status_t amdsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle, * * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ -amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity(amdsmi_processor_handle processor_handle, uint32_t *numa_node); +amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity(amdsmi_processor_handle processor_handle, int32_t *numa_node); /** * @brief Get PCIe traffic information. It is not supported on virtual machine guest diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index 850ac680a3..d3acead676 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -1651,7 +1651,7 @@ def amdsmi_get_gpu_topo_numa_affinity(processor_handle: amdsmi_wrapper.amdsmi_pr processor_handle, amdsmi_wrapper.amdsmi_processor_handle ) - numa_node = ctypes.c_uint32() + numa_node = ctypes.c_int32() _check_res( amdsmi_wrapper.amdsmi_get_gpu_topo_numa_affinity( diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index 9e69a70f80..ff38c86e45 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1434,7 +1434,7 @@ amdsmi_get_gpu_bdf_id.restype = amdsmi_status_t amdsmi_get_gpu_bdf_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)] amdsmi_get_gpu_topo_numa_affinity = _libraries['libamd_smi.so'].amdsmi_get_gpu_topo_numa_affinity amdsmi_get_gpu_topo_numa_affinity.restype = amdsmi_status_t -amdsmi_get_gpu_topo_numa_affinity.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32)] +amdsmi_get_gpu_topo_numa_affinity.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_int32)] amdsmi_get_gpu_pci_throughput = _libraries['libamd_smi.so'].amdsmi_get_gpu_pci_throughput amdsmi_get_gpu_pci_throughput.restype = amdsmi_status_t amdsmi_get_gpu_pci_throughput.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint64)] diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index fa2e3edb29..829301b16e 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -1277,7 +1277,7 @@ amdsmi_status_t amdsmi_get_gpu_bdf_id( } amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity( - amdsmi_processor_handle processor_handle, uint32_t *numa_node) { + amdsmi_processor_handle processor_handle, int32_t *numa_node) { return rsmi_wrapper(rsmi_topo_numa_affinity_get, processor_handle, numa_node); } diff --git a/projects/amdsmi/tests/amd_smi_test/functional/sys_info_read.cc b/projects/amdsmi/tests/amd_smi_test/functional/sys_info_read.cc index c6e2b066fc..6b513e0ec2 100755 --- a/projects/amdsmi/tests/amd_smi_test/functional/sys_info_read.cc +++ b/projects/amdsmi/tests/amd_smi_test/functional/sys_info_read.cc @@ -139,7 +139,7 @@ void TestSysInfoRead::Run(void) { err = amdsmi_get_gpu_bdf_id(processor_handles_[i], nullptr); ASSERT_EQ(err, AMDSMI_STATUS_INVAL); - err = amdsmi_get_gpu_topo_numa_affinity(processor_handles_[i], &val_ui32); + err = amdsmi_get_gpu_topo_numa_affinity(processor_handles_[i], &val_i32); CHK_ERR_ASRT(err) IF_VERB(STANDARD) { std::cout << "\t**NUMA NODE: 0x" << std::hex << val_i32;