25#if !defined(WITH_ONEAPI)
38 if (getenv(
"SYCL_CACHE_PERSISTENT") ==
nullptr) {
39 _putenv_s(
"SYCL_CACHE_PERSISTENT",
"1");
41 if (getenv(
"SYCL_CACHE_TRESHOLD") ==
nullptr) {
42 _putenv_s(
"SYCL_CACHE_THRESHOLD",
"0");
44 if (getenv(
"ONEAPI_DEVICE_SELECTOR") ==
nullptr) {
45 if (getenv(
"CYCLES_ONEAPI_ALL_DEVICES") ==
nullptr) {
46 _putenv_s(
"ONEAPI_DEVICE_SELECTOR",
"level_zero:*");
49 _putenv_s(
"ONEAPI_DEVICE_SELECTOR",
"!opencl:*");
53 if (getenv(
"ZES_ENABLE_SYSMAN") ==
nullptr) {
54 _putenv_s(
"ZES_ENABLE_SYSMAN",
"1");
56 if (getenv(
"SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE") ==
nullptr) {
57 _putenv_s(
"SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE",
"0");
60 setenv(
"SYCL_CACHE_PERSISTENT",
"1",
false);
61 setenv(
"SYCL_CACHE_THRESHOLD",
"0",
false);
62 if (getenv(
"CYCLES_ONEAPI_ALL_DEVICES") ==
nullptr) {
63 setenv(
"ONEAPI_DEVICE_SELECTOR",
"level_zero:*",
false);
66 setenv(
"ONEAPI_DEVICE_SELECTOR",
"!opencl:*",
false);
69 setenv(
"ZES_ENABLE_SYSMAN",
"1",
false);
70 setenv(
"SYCL_PI_LEVEL_ZERO_USE_COPY_ENGINE",
"0",
false);
83 return make_unique<OneapiDevice>(info, stats, profiler, headless);
90 LOG_FATAL <<
"Requested to create oneAPI device while not enabled for this build.";
97static void device_iterator_cb(
const char *
id,
102 bool has_execution_optimization,
117# if defined(WITH_OPENIMAGEDENOISE)
118# if OIDN_VERSION >= 20300
121 if (OIDNDenoiserGPU::is_device_supported(info)) {
137# ifdef WITH_EMBREE_GPU
146 devices->push_back(info);
150 LOG_INFO <<
"Device with id \"" << info.
id <<
"\" supports "
159 OneapiDevice::iterate_devices(device_iterator_cb, &devices);
169 char *c_capabilities = OneapiDevice::device_capabilities();
170 if (c_capabilities) {
171 capabilities = c_capabilities;
172 free(c_capabilities);
void BLI_kdtree_nd_ free(KDTree *tree)
ATTR_WARN_UNUSED_RESULT const size_t num
bool has_execution_optimization
DenoiserTypeMask denoisers
bool use_hardware_raytracing
CCL_NAMESPACE_BEGIN const char * denoiserTypeToHumanReadable(DenoiserType type)
@ DENOISER_OPENIMAGEDENOISE
#define CCL_NAMESPACE_END
unique_ptr< Device > device_oneapi_create(const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless)
void device_oneapi_info(vector< DeviceInfo > &devices)
CCL_NAMESPACE_BEGIN bool device_oneapi_init()
string device_oneapi_capabilities()