12HIPContextScope::HIPContextScope(HIPDevice *device) : device(device)
14 hip_device_assert(device, hipCtxPushCurrent(device->hipContext));
17HIPContextScope::~HIPContextScope()
19 hip_device_assert(device, hipCtxPopCurrent(
nullptr));
22# ifndef WITH_HIP_DYNLOAD
23const char *hipewErrorString(hipError_t result)
36const char *hipewCompilerPath()
38 return CYCLES_HIP_HIPCC_EXECUTABLE;
41int hipewCompilerVersion()
43 return (HIP_VERSION / 100) + (HIP_VERSION % 100 / 10);
47bool hipSupportsDriver()
49 int hip_driver_version = 0;
50 hipError_t
result = hipDriverGetVersion(&hip_driver_version);
51 if (result != hipSuccess) {
52 LOG_WARNING <<
"Error getting driver version: " << hipewErrorString(result);
56 LOG_TRACE <<
"Detected HIP driver version: " << hip_driver_version;
59 if (hip_driver_version < 60241512) {
65 if (hip_driver_version < 60342131) {
#define CCL_NAMESPACE_END
CCL_NAMESPACE_BEGIN string string_printf(const char *format,...)