Fix unit test errors
Add unit test error handling for set freq and volt.
Change-Id: I5877f8300b942caac8f38e6efc03264bfc432def
[ROCm/amdsmi commit: 4307330cb0]
Αυτή η υποβολή περιλαμβάνεται σε:
υποβλήθηκε από
Shuzhou Liu
γονέας
c0bc09b2f7
υποβολή
fa6f0f5ea0
@@ -176,6 +176,12 @@ void TestFrequenciesReadWrite::Run(void) {
|
|||||||
std::cout << "Resetting mask to all frequencies." << std::endl;
|
std::cout << "Resetting mask to all frequencies." << std::endl;
|
||||||
}
|
}
|
||||||
ret = amdsmi_set_clk_freq(processor_handles_[dv_ind], amdsmi_clk, 0xFFFFFFFF);
|
ret = amdsmi_set_clk_freq(processor_handles_[dv_ind], amdsmi_clk, 0xFFFFFFFF);
|
||||||
|
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||||
|
std::cout << "\t**Set all frequencies: Not supported on this machine. Skipping..."
|
||||||
|
<< std::endl;
|
||||||
|
ret = AMDSMI_STATUS_SUCCESS;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (ret != AMDSMI_STATUS_SUCCESS) {
|
if (ret != AMDSMI_STATUS_SUCCESS) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,15 +158,18 @@ void TestVoltCurvRead::Run(void) {
|
|||||||
PrintDeviceHeader(processor_handles_[i]);
|
PrintDeviceHeader(processor_handles_[i]);
|
||||||
|
|
||||||
err = amdsmi_get_gpu_od_volt_info(processor_handles_[i], &odv);
|
err = amdsmi_get_gpu_od_volt_info(processor_handles_[i], &odv);
|
||||||
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
if (err == AMDSMI_STATUS_NOT_SUPPORTED
|
||||||
|
|| err == AMDSMI_STATUS_NOT_YET_IMPLEMENTED) {
|
||||||
IF_VERB(STANDARD) {
|
IF_VERB(STANDARD) {
|
||||||
std::cout <<
|
std::cout <<
|
||||||
"\t** amdsmi_get_gpu_od_volt_info: Not supported on this machine"
|
"\t** amdsmi_get_gpu_od_volt_info: Not supported on this machine"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
// Verify api support checking functionality is working
|
// Verify api support checking functionality is working
|
||||||
err = amdsmi_get_gpu_od_volt_info(processor_handles_[i], nullptr);
|
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||||
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
err = amdsmi_get_gpu_od_volt_info(processor_handles_[i], nullptr);
|
||||||
|
ASSERT_EQ(err, AMDSMI_STATUS_NOT_SUPPORTED);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
CHK_ERR_ASRT(err)
|
CHK_ERR_ASRT(err)
|
||||||
// Verify api support checking functionality is working
|
// Verify api support checking functionality is working
|
||||||
|
|||||||
Αναφορά σε νέο ζήτημα
Block a user