EXSWCPHIPT-13 - Fix Segfault on Nvidia Platform
Change-Id: Ib85bb0b0e91b7703afc4858c4a5ada0115ad68f4
Tento commit je obsažen v:
@@ -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);
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele