diff options
author | Sayak Biswas <sayakAMD> | 2021-10-21 21:57:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-10-22 13:15:29 +0300 |
commit | d092933abbadb3a6d5ab53a0b2b3b865cd5c9079 (patch) | |
tree | 9d44286512efc1db894257fa9ed786a5049bb41b /extern/hipew/src | |
parent | d1fcf93f039b0546dfd01c33daf50bd135e34344 (diff) |
Cycles: various fixes for HIP and compilation of HIP binaries
* Additional structs added to the hipew loader for device props
* Adds hipRTC functions to the loader for future usage
* Enables CPU+GPU usage for HIP
* Cleanup to the adaptive kernel compilation process
* Fix for kernel compilation failures with HIP with latest master
Ref T92393, D12958
Diffstat (limited to 'extern/hipew/src')
-rw-r--r-- | extern/hipew/src/hipew.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/extern/hipew/src/hipew.c b/extern/hipew/src/hipew.c index 9d5a63f869a..02cec1ba28f 100644 --- a/extern/hipew/src/hipew.c +++ b/extern/hipew/src/hipew.c @@ -70,6 +70,7 @@ thipInit *hipInit; thipDriverGetVersion *hipDriverGetVersion; thipGetDevice *hipGetDevice; thipGetDeviceCount *hipGetDeviceCount; +thipGetDeviceProperties *hipGetDeviceProperties; thipDeviceGetName *hipDeviceGetName; thipDeviceGetAttribute *hipDeviceGetAttribute; thipDeviceComputeCapability *hipDeviceComputeCapability; @@ -178,6 +179,17 @@ thipGraphicsResourceGetMappedPointer *hipGraphicsResourceGetMappedPointer; thipGraphicsGLRegisterBuffer *hipGraphicsGLRegisterBuffer; thipGLGetDevices *hipGLGetDevices; +thiprtcGetErrorString* hiprtcGetErrorString; +thiprtcAddNameExpression* hiprtcAddNameExpression; +thiprtcCompileProgram* hiprtcCompileProgram; +thiprtcCreateProgram* hiprtcCreateProgram; +thiprtcDestroyProgram* hiprtcDestroyProgram; +thiprtcGetLoweredName* hiprtcGetLoweredName; +thiprtcGetProgramLog* hiprtcGetProgramLog; +thiprtcGetProgramLogSize* hiprtcGetProgramLogSize; +thiprtcGetCode* hiprtcGetCode; +thiprtcGetCodeSize* hiprtcGetCodeSize; + static DynamicLibrary dynamic_library_open_find(const char **paths) { @@ -242,6 +254,7 @@ static int hipewHipInit(void) { HIP_LIBRARY_FIND_CHECKED(hipDriverGetVersion); HIP_LIBRARY_FIND_CHECKED(hipGetDevice); HIP_LIBRARY_FIND_CHECKED(hipGetDeviceCount); + HIP_LIBRARY_FIND_CHECKED(hipGetDeviceProperties); HIP_LIBRARY_FIND_CHECKED(hipDeviceGetName); HIP_LIBRARY_FIND_CHECKED(hipDeviceGetAttribute); HIP_LIBRARY_FIND_CHECKED(hipDeviceComputeCapability); @@ -346,6 +359,16 @@ static int hipewHipInit(void) { HIP_LIBRARY_FIND_CHECKED(hipGraphicsGLRegisterBuffer); HIP_LIBRARY_FIND_CHECKED(hipGLGetDevices); #endif + HIP_LIBRARY_FIND_CHECKED(hiprtcGetErrorString); + HIP_LIBRARY_FIND_CHECKED(hiprtcAddNameExpression); + HIP_LIBRARY_FIND_CHECKED(hiprtcCompileProgram); + HIP_LIBRARY_FIND_CHECKED(hiprtcCreateProgram); + HIP_LIBRARY_FIND_CHECKED(hiprtcDestroyProgram); + HIP_LIBRARY_FIND_CHECKED(hiprtcGetLoweredName); + HIP_LIBRARY_FIND_CHECKED(hiprtcGetProgramLog); + HIP_LIBRARY_FIND_CHECKED(hiprtcGetProgramLogSize); + HIP_LIBRARY_FIND_CHECKED(hiprtcGetCode); + HIP_LIBRARY_FIND_CHECKED(hiprtcGetCodeSize); result = HIPEW_SUCCESS; return result; } |