fix: [rocm/amd_smi_lib] Navi3X/Navi2X/MI100 amdsmitst 2 test cases fail when running
Checks returned error by get_gpu_pci_bandwith() before assert
Code changes related to the following:
* Unit tests
Change-Id: I950eee5d92607eea08722af7d7c84e8457cd4e60
Signed-off-by: Oliveira, Daniel <daniel.oliveira@amd.com>
[ROCm/amdsmi commit: c6208c0db0]
This commit is contained in:
@@ -183,7 +183,14 @@ void TestFrequenciesRead::Run(void) {
|
||||
// Verify api support checking functionality is working
|
||||
// NOTE: We expect AMDSMI_STATUS_NOT_SUPPORTED, if rsmi_pcie_bandwidth_t* is NULL
|
||||
err = amdsmi_get_gpu_pci_bandwidth(processor_handles_[i], nullptr);
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
if (err != amdsmi_status_t::AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
ASSERT_EQ(err, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
else {
|
||||
auto status_string("");
|
||||
amdsmi_status_code_to_string(err, &status_string);
|
||||
std::cout << "\t\t** amdsmi_get_gpu_pci_bandwidth(): " << status_string << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,6 @@ void TestPciReadWrite::Run(void) {
|
||||
}
|
||||
|
||||
ret = amdsmi_get_gpu_pci_bandwidth(processor_handles_[dv_ind], &bw);
|
||||
|
||||
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
std::cout << "TEST FAILURE: Current PCIe bandwidth is not detected. "
|
||||
"This is likely because it is not indicated in the pp_dpm_pcie sysfs "
|
||||
@@ -165,7 +164,14 @@ void TestPciReadWrite::Run(void) {
|
||||
// Verify api support checking functionality is working
|
||||
// NOTE: We expect AMDSMI_STATUS_NOT_SUPPORTED, if rsmi_pcie_bandwidth_t* is NULL
|
||||
ret = amdsmi_get_gpu_pci_bandwidth(processor_handles_[dv_ind], nullptr);
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||
if (ret != amdsmi_status_t::AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
ASSERT_EQ(ret, AMDSMI_STATUS_INVAL);
|
||||
}
|
||||
else {
|
||||
auto status_string("");
|
||||
amdsmi_status_code_to_string(ret, &status_string);
|
||||
std::cout << "\t\t** amdsmi_get_gpu_pci_bandwidth(): " << status_string << "\n";
|
||||
}
|
||||
|
||||
// First set the bitmask to all supported bandwidths
|
||||
freq_bitmask = ~(~0u << bw.transfer_rate.num_supported);
|
||||
|
||||
Reference in New Issue
Block a user