DRM - Remove FD usage
Change-Id: I77dfa778ccd0d39a03289c2e11cf10357566ff16 Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
This commit is contained in:
committed by
Arif, Maisam
parent
202b46d96f
commit
9b5bbf555a
@@ -273,7 +273,6 @@ static void checkPartitionIdChanges(amdsmi_processor_handle* const processor_han
|
||||
"\"sudo rmmod amdgpu && sudo rmmod ast && sudo modprobe amdgpu\")."
|
||||
"\n\tCPX may not enumerate properly.\n";
|
||||
}
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
break;
|
||||
}
|
||||
amdsmi_kfd_info_t kfd_info;
|
||||
@@ -433,7 +432,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
<< computePartitionString(updatePartition)
|
||||
<< " ===============" << std::endl;
|
||||
}
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
|
||||
auto ret_set = amdsmi_set_gpu_compute_partition(processor_handles_[dv_ind], updatePartition);
|
||||
IF_VERB(STANDARD) {
|
||||
@@ -464,7 +462,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
<< "\n\t Device might be in a static partition mode. "
|
||||
<< "With inability to change partition modes."
|
||||
<< std::endl;
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -493,7 +490,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
static_cast<amdsmi_compute_partition_type_t>(
|
||||
mapStringToSMIComputePartitionTypes.at(
|
||||
std::string(orig_char_computePartition)));
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors on going back to original partition
|
||||
auto ret_set = amdsmi_set_gpu_compute_partition(processor_handles_[dv_ind], updatePartition);
|
||||
EXPECT_TRUE(ret_set == AMDSMI_STATUS_SETTING_UNAVAILABLE
|
||||
|| ret_set== AMDSMI_STATUS_NO_PERM
|
||||
@@ -526,7 +522,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
<< " ==========================================================\n";
|
||||
std::cout << "\t**======================================================================\n";
|
||||
}
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
PrintDeviceHeader(processor_handles_[dv_ind]);
|
||||
amdsmi_accelerator_partition_profile_t profile = {};
|
||||
uint32_t partition_id[8] = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
@@ -650,7 +645,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
AcceleratorProfileConfig original_profile_config = {};
|
||||
original_profile_config
|
||||
= getAvailableProfileConfigs(dv_ind, profile, profile_config, isVerbose);
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**=========================================================\n";
|
||||
@@ -772,7 +766,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
<< profile_config.profiles[config].profile_index << ")"
|
||||
<< " ===============" << std::endl;
|
||||
}
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
|
||||
auto ret_set = amdsmi_set_gpu_accelerator_partition_profile(
|
||||
processor_handles_[dv_ind],
|
||||
@@ -799,7 +792,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
<< "\n\t Device might be in a static partition mode. "
|
||||
<< "With inability to change partition modes."
|
||||
<< std::endl;
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
break;
|
||||
}
|
||||
if (ret_set == AMDSMI_STATUS_NOT_SUPPORTED) {
|
||||
@@ -883,7 +875,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
std::cout << "\t**" << "amdsmi_get_gpu_accelerator_partition_profile: "
|
||||
<< "Not supported on this machine, skipping remaining tests." << std::endl;
|
||||
}
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -923,7 +914,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
std::cout << "\t**Test #3: Check fluctuating # of devices & partition IDs ==============\n";
|
||||
std::cout << "\t**======================================================================\n";
|
||||
}
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors on going back to original partition
|
||||
|
||||
// ---------------------------------------------------------//
|
||||
// TEST 3: Check fluctuating # of devices & partition IDs //
|
||||
@@ -942,7 +932,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
std::cout << "\t**======================================================================\n";
|
||||
}
|
||||
// Leaving for debug purposes
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors on going back to original partition
|
||||
uint32_t device_index = 0;
|
||||
amdsmi_processor_handle p_handle = {};
|
||||
uint32_t current_num_devices = 0;
|
||||
@@ -1025,7 +1014,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
<< "\n\t Device might be in a static partition mode. "
|
||||
<< "With inability to change partition modes."
|
||||
<< std::endl;
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1052,7 +1040,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
EXPECT_NE(updatePartition, mapStringToSMIComputePartitionTypes.at(
|
||||
std::string(current_char_computePartition)));
|
||||
}
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors on going back to original partition
|
||||
}
|
||||
|
||||
uint32_t device_index3 = 0;
|
||||
@@ -1068,7 +1055,6 @@ void TestComputePartitionReadWrite::Run(void) {
|
||||
std::cout << "\t**ABOUT TO GO BACK TO ORIGINAL PARTITION ("
|
||||
<< orig_char_computePartition << ")\n";
|
||||
}
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors on going back to original partition
|
||||
auto ret_set = amdsmi_set_gpu_compute_partition(p_handle3, updatePartition);
|
||||
checkPartitionIdChanges(processor_handles_, dv_ind, std::string(orig_char_computePartition),
|
||||
isVerbose, true);
|
||||
|
||||
@@ -253,7 +253,6 @@ void TestMemoryPartitionReadWrite::Run(void) {
|
||||
AcceleratorProfileConfig original_profile_config =
|
||||
getAvailableProfileConfigs(dv_ind, profile, profile_config, isVerbose);
|
||||
orig_dev_config[dv_ind] = original_profile_config;
|
||||
// amdsmi_wait_for_user_input(); // watch for any errors
|
||||
|
||||
IF_VERB(STANDARD) {
|
||||
std::cout << "\t**=========================================================\n";
|
||||
|
||||
@@ -116,7 +116,6 @@ static void RunGenericTest(TestBase *test) {
|
||||
// RunGenericTest(&<test_obj>);
|
||||
// }
|
||||
TEST(amdsmitstReadOnly, TestVersionRead) {
|
||||
// amdsmi_wait_for_user_input();
|
||||
TestVersionRead tst;
|
||||
RunGenericTest(&tst);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user