Skip to content

Commit

Permalink
Merge pull request #11 from cfreehill/master
Browse files Browse the repository at this point in the history
 Don't assert or fail tests that are unsupported by system
  • Loading branch information
cfreehill authored Jan 24, 2019
2 parents b2eb5d7 + 08ec2a9 commit ce2c7c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/rocm_smi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,11 @@ static rsmi_status_t get_od_clk_volt_info(uint32_t dv_ind,
p->curr_sclk_range.upper_bound = freq_string_to_int(val_vec, nullptr,
nullptr, kOD_SCLK_label_array_index + 2);

assert(val_vec[kOD_MCLK_label_array_index] == "OD_MCLK:");

// The condition below indicates old style format, which is not supported
if (val_vec[kOD_MCLK_label_array_index] != "OD_MCLK:") {
return RSMI_STATUS_NOT_YET_IMPLEMENTED;
}
p->curr_mclk_range.lower_bound = 0;

p->curr_mclk_range.upper_bound = freq_string_to_int(val_vec, nullptr,
Expand Down
11 changes: 10 additions & 1 deletion tests/rocm_smi_test/functional/rsmi_sanity.cc
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,16 @@ void TestSanity::Run(void) {
}

err = rsmi_dev_od_volt_info_get(i, &odv);
DISPLAY_RSMI_ERR(err)
if (err == RSMI_STATUS_FILE_ERROR ||
err == RSMI_STATUS_NOT_YET_IMPLEMENTED) {
IF_VERB(STANDARD) {
std::cout <<
"\t**rsmi_dev_od_volt_info_get: Not supported on this machine"
<< std::endl;
}
} else {
CHK_ERR_ASRT(err)
}

if (err == RSMI_STATUS_SUCCESS) {
std::cout << "\t**Frequency-voltage curve data:" << std::endl;
Expand Down

0 comments on commit ce2c7c1

Please sign in to comment.