Cycles: Allow enabling OIDN for HIP with environment variable #119672
|
@ -220,11 +220,13 @@ static void device_oidn_init_once()
|
||||||
*
|
*
|
||||||
* This also affects systems which have for example an NVIDIA GPU as OIDN
|
* This also affects systems which have for example an NVIDIA GPU as OIDN
|
||||||
* initializes all device types together. */
|
* initializes all device types together. */
|
||||||
|
if (getenv("OIDN_DEVICE_HIP") == nullptr) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
_putenv_s("OIDN_DEVICE_HIP", "0");
|
_putenv_s("OIDN_DEVICE_HIP", "0");
|
||||||
#else
|
#else
|
||||||
setenv("OIDN_DEVICE_HIP", "0", true);
|
setenv("OIDN_DEVICE_HIP", "0", true);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue