Fix uninitialized var in hipDeviceGetAttribute (#1497)
This fixes the usage of an uninitialized cdattr variable in hipDeviceGetAttribute for the CUDA backend when taking the switch default, as detailed in #1317.
Note that the directed_tests/runtimeApi/device/hipGetDeviceAttribute.tst test fails for me, but it already did before applying this patch. Let's see what CI says!
[ROCm/clr commit: 11f23bba39]
Этот коммит содержится в:
коммит произвёл
Maneesh Gupta
родитель
8d500c1b59
Коммит
2dee09bd5b
@@ -992,8 +992,7 @@ inline static hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t att
|
||||
cdattr = cudaDevAttrEccEnabled;
|
||||
break;
|
||||
default:
|
||||
cerror = cudaErrorInvalidValue;
|
||||
break;
|
||||
return hipCUDAErrorTohipError(cudaErrorInvalidValue);
|
||||
}
|
||||
|
||||
cerror = cudaDeviceGetAttribute(pi, cdattr, device);
|
||||
|
||||
Ссылка в новой задаче
Block a user