SWDEV-329802 - Refactor PCH to generate the right warp size on Navi GPUs

Change-Id: I817de9c858c152fee1f586303372820066a09dc9
This commit is contained in:
Satyanvesh Dittakavi committed 2022-07-22 05:49:59 -04:00
1 parent 9f4214b587
commit a9935b3257
3 files changed
+225 -5

No files matched your search

+15 -4
View File
@@ -19,11 +19,22 @@ size_t amd_dbgapi_get_build_id() {
}
#ifdef __HIP_ENABLE_PCH
extern const char __hip_pch[];
extern unsigned __hip_pch_size;
extern const char __hip_pch_wave32[];
extern const char __hip_pch_wave64[];
extern unsigned __hip_pch_wave32_size;
extern unsigned __hip_pch_wave64_size;
void __hipGetPCH(const char** pch, unsigned int *size) {
*pch = __hip_pch;
*size = __hip_pch_size;
hipDeviceProp_t deviceProp;
int deviceId;
hipError_t error = hipGetDevice(&deviceId);
error = hipGetDeviceProperties(&deviceProp, deviceId);
if (deviceProp.warpSize == 32) {
*pch = __hip_pch_wave32;
*size = __hip_pch_wave32_size;
} else {
*pch = __hip_pch_wave64;
*size = __hip_pch_wave64_size;
}
}
#endif
namespace hip {