SWDEV-240804 - Check the managed capability

Some system have HMM disabled. Check the capability before running the test.

Change-Id: I098d04d87c12ec317b4cb57e121e702b6bba03bc


[ROCm/clr commit: 17f32d4508]
Esse commit está contido em:
German Andryeyev
2021-04-26 14:05:50 -04:00
commit d01cfbc1cc
@@ -368,8 +368,18 @@ int main(int argc, char* argv[]) {
failed("Valid arguments are from 1 to 5");
}
int managed_memory = 0;
HIPCHECK(hipDeviceGetAttribute(&managed_memory,
hipDeviceAttributeManagedMemory,
p_gpuDevice));
if (!managed_memory) {
printf("info: managed memory access not supported on device %d\n Skipped\n", p_gpuDevice);
passed();
}
int NumDevices = 0;
HIPCHECK(hipGetDeviceCount(&NumDevices));
bool TestStatus = true, OverAllStatus = true;
if (p_tests == 1) {
TestStatus = TestMallocManaged1<float>(NumDevices);