diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-11-23 02:57:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-11-23 02:57:15 +0300 |
commit | d1a4e043bdb0351bd0828fac9495b5efb5d210d8 (patch) | |
tree | e4f5d2979a0679d8cc3115da05d1d95ddf156181 | |
parent | 8600d4491fa4b349cb80241382c503abaf9c5ce9 (diff) | |
parent | f749506163b7d2409c63c469f00e9bb1cbb2e68d (diff) |
Merge branch 'blender-v3.0-release'
-rw-r--r-- | extern/hipew/include/hipew.h | 4 | ||||
-rw-r--r-- | extern/hipew/src/hipew.c | 2 | ||||
-rw-r--r-- | intern/cycles/device/hip/device_impl.cpp | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/extern/hipew/include/hipew.h b/extern/hipew/include/hipew.h index 90a538719ab..9351ec4d30c 100644 --- a/extern/hipew/include/hipew.h +++ b/extern/hipew/include/hipew.h @@ -1072,9 +1072,10 @@ typedef enum hiprtcResult { typedef hipError_t HIPAPI thipGetErrorName(hipError_t error, const char** pStr); typedef hipError_t HIPAPI thipInit(unsigned int Flags); typedef hipError_t HIPAPI thipDriverGetVersion(int* driverVersion); -typedef hipError_t HIPAPI thipGetDevice(hipDevice_t* device, int ordinal); +typedef hipError_t HIPAPI thipGetDevice(int* device); typedef hipError_t HIPAPI thipGetDeviceCount(int* count); typedef hipError_t HIPAPI thipGetDeviceProperties(hipDeviceProp_t* props, int deviceId); +typedef hipError_t HIPAPI thipDeviceGet(hipDevice_t* device, int ordinal); typedef hipError_t HIPAPI thipDeviceGetName(char* name, int len, hipDevice_t dev); typedef hipError_t HIPAPI thipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attrib, hipDevice_t dev); typedef hipError_t HIPAPI thipDeviceComputeCapability(int* major, int* minor, hipDevice_t dev); @@ -1207,6 +1208,7 @@ extern thipDriverGetVersion *hipDriverGetVersion; extern thipGetDevice *hipGetDevice; extern thipGetDeviceCount *hipGetDeviceCount; extern thipGetDeviceProperties *hipGetDeviceProperties; +extern thipDeviceGet* hipDeviceGet; extern thipDeviceGetName *hipDeviceGetName; extern thipDeviceGetAttribute *hipDeviceGetAttribute; extern thipDeviceComputeCapability *hipDeviceComputeCapability; diff --git a/extern/hipew/src/hipew.c b/extern/hipew/src/hipew.c index 02cec1ba28f..92022778dfc 100644 --- a/extern/hipew/src/hipew.c +++ b/extern/hipew/src/hipew.c @@ -71,6 +71,7 @@ thipDriverGetVersion *hipDriverGetVersion; thipGetDevice *hipGetDevice; thipGetDeviceCount *hipGetDeviceCount; thipGetDeviceProperties *hipGetDeviceProperties; +thipDeviceGet* hipDeviceGet; thipDeviceGetName *hipDeviceGetName; thipDeviceGetAttribute *hipDeviceGetAttribute; thipDeviceComputeCapability *hipDeviceComputeCapability; @@ -255,6 +256,7 @@ static int hipewHipInit(void) { HIP_LIBRARY_FIND_CHECKED(hipGetDevice); HIP_LIBRARY_FIND_CHECKED(hipGetDeviceCount); HIP_LIBRARY_FIND_CHECKED(hipGetDeviceProperties); + HIP_LIBRARY_FIND_CHECKED(hipDeviceGet); HIP_LIBRARY_FIND_CHECKED(hipDeviceGetName); HIP_LIBRARY_FIND_CHECKED(hipDeviceGetAttribute); HIP_LIBRARY_FIND_CHECKED(hipDeviceComputeCapability); diff --git a/intern/cycles/device/hip/device_impl.cpp b/intern/cycles/device/hip/device_impl.cpp index 64cd4cd826a..53c4f3f0b3f 100644 --- a/intern/cycles/device/hip/device_impl.cpp +++ b/intern/cycles/device/hip/device_impl.cpp @@ -93,7 +93,7 @@ HIPDevice::HIPDevice(const DeviceInfo &info, Stats &stats, Profiler &profiler) } /* Setup device and context. */ - result = hipGetDevice(&hipDevice, hipDevId); + result = hipDeviceGet(&hipDevice, hipDevId); if (result != hipSuccess) { set_error(string_printf("Failed to get HIP device handle from ordinal (%s)", hipewErrorString(result))); |