EXSWCPHIPT-13 - Fix Segfault on Nvidia Platform

Change-Id: Ib85bb0b0e91b7703afc4858c4a5ada0115ad68f4
Этот коммит содержится в:
Satyanvesh Dittakavi committed 2022-02-19 12:53:46 +00:00
1 родитель e3aafb9636
Коммит 974138cfd5
1 file changed
+10
+10
Просмотреть файл
@@ -1220,6 +1220,11 @@ inline static hipError_t hipSetDevice(int device) {
}
inline static hipError_t hipChooseDevice(int* device, const hipDeviceProp_t* prop) {
if (prop == NULL) {
return hipErrorInvalidValue;
}
struct cudaDeviceProp cdprop;
memset(&cdprop, 0x0, sizeof(struct cudaDeviceProp));
cdprop.major = prop->major;
@@ -1532,6 +1537,11 @@ inline static hipError_t hipMemset3DAsync(hipPitchedPtr pitchedDevPtr, int valu
}
inline static hipError_t hipGetDeviceProperties(hipDeviceProp_t* p_prop, int device) {
if (p_prop == NULL) {
return hipErrorInvalidValue;
}
struct cudaDeviceProp cdprop;
cudaError_t cerror;
cerror = cudaGetDeviceProperties(&cdprop, device);