SWDEV-279657 - Fix hipMallocManaged-N256M failure
Add concurrentManagedAccess detection in hipMallocManaged test.
Skip test when device doesn't support concurrentManagedAccess.
Change-Id: Ie54046feef3baba857a7068972ec1fc1a60c2dfd
[ROCm/clr commit: 20fd6b8a66]
This commit is contained in:
@@ -1561,6 +1561,9 @@ inline static hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t att
|
|||||||
case hipDeviceAttributeCooperativeMultiDeviceLaunch:
|
case hipDeviceAttributeCooperativeMultiDeviceLaunch:
|
||||||
cdattr = cudaDevAttrCooperativeMultiDeviceLaunch;
|
cdattr = cudaDevAttrCooperativeMultiDeviceLaunch;
|
||||||
break;
|
break;
|
||||||
|
case hipDeviceAttributeConcurrentManagedAccess:
|
||||||
|
cdattr = cudaDevAttrConcurrentManagedAccess;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return hipCUDAErrorTohipError(cudaErrorInvalidValue);
|
return hipCUDAErrorTohipError(cudaErrorInvalidValue);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,15 @@ void add(int n, float *x, float *y)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
HipTest::parseStandardArguments(argc, argv, true);
|
HipTest::parseStandardArguments(argc, argv, true);
|
||||||
|
int concurrentManagedAccess = 0;
|
||||||
|
HIPCHECK(hipDeviceGetAttribute(&concurrentManagedAccess,
|
||||||
|
hipDeviceAttributeConcurrentManagedAccess,
|
||||||
|
p_gpuDevice));
|
||||||
|
if(!concurrentManagedAccess) {
|
||||||
|
printf("info: concurrent managed access not supported on device %d\n Skipped\n",
|
||||||
|
p_gpuDevice);
|
||||||
|
passed();
|
||||||
|
}
|
||||||
|
|
||||||
printf("info: set device to %d\n", p_gpuDevice);
|
printf("info: set device to %d\n", p_gpuDevice);
|
||||||
HIPCHECK(hipSetDevice(p_gpuDevice));
|
HIPCHECK(hipSetDevice(p_gpuDevice));
|
||||||
|
|||||||
Reference in New Issue
Block a user