13bool HIPDeviceKernels::load_kernel(HIPDevice *device,
14 hipModule_t hip_module,
17 if (available(kernel)) {
25 HIPDeviceKernel &hip_kernel = kernels_[int(kernel)];
28 hip_device_assert(device,
29 hipModuleGetFunction(&hip_kernel.function, hip_module, function_name.c_str()));
30 if (!hip_kernel.function) {
31 LOG_ERROR <<
"Unable to load kernel " << function_name;
35 hip_device_assert(device, hipFuncSetCacheConfig(hip_kernel.function, hipFuncCachePreferL1));
38 hipModuleOccupancyMaxPotentialBlockSize(
39 &hip_kernel.min_blocks, &hip_kernel.num_threads_per_block, hip_kernel.function, 0, 0));
41 LOG_DEBUG <<
"Loaded kernel: " << function_name;
46void HIPDeviceKernels::load_all(HIPDevice *device, hipModule_t hip_module)
55void HIPDeviceKernels::load_raytrace(HIPDevice *device, hipModule_t hip_module)
57 LOG_DEBUG <<
"Loading ray-tracing HIP-RT kernels";
69const HIPDeviceKernel &HIPDeviceKernels::get(
DeviceKernel kernel)
const
71 return kernels_[(int)kernel];
74bool HIPDeviceKernels::available(
DeviceKernel kernel)
const
76 return kernels_[(int)kernel].function !=
nullptr;
#define CCL_NAMESPACE_END
const char * device_kernel_as_string(DeviceKernel kernel)
bool device_kernel_has_gpu_function(DeviceKernel kernel)
@ DEVICE_KERNEL_INTEGRATOR_INTERSECT_MNEE
@ DEVICE_KERNEL_INTEGRATOR_INTERSECT_SUBSURFACE
@ DEVICE_KERNEL_INTEGRATOR_INTERSECT_VOLUME_STACK
@ DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE
@ DEVICE_KERNEL_INTEGRATOR_INTERSECT_DEDICATED_LIGHT
@ DEVICE_KERNEL_INTEGRATOR_INTERSECT_SHADOW
@ DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST