numba_dpex.core.utils.kernel_templates.reduction_template module
- class numba_dpex.core.utils.kernel_templates.reduction_template.RemainderReduceIntermediateKernelTemplate(kernel_name, kernel_params, sentinel_name, redvars, parfor_reddict, redvars_dict, typemap, legal_loop_indices, global_size_var_name, global_size_mod_var_name, partial_sum_size_var_name, partial_sum_var_name, final_sum_var_name, reductionKernelVar)
Bases:
KernelTemplateInterfaceThe class to build reduction remainder kernel_txt template and compiled Numba functionIR.
- dump_kernel_ir()
Helper to dump the Numba IR for the RemainderReduceIntermediateKernelTemplate.
- dump_kernel_string()
Helper to print the kernel function string.
- property kernel_ir
- Returns the Numba IR generated for a
RemainderReduceIntermediateKernelTemplate.
Returns: The Numba functionIR object for the compiled kernel_txt string.
- property kernel_string
- Returns the function string generated for a
RemainderReduceIntermediateKernelTemplate.
- Returns:
str: A string representing a stub reduction kernel function for the parfor.
- class numba_dpex.core.utils.kernel_templates.reduction_template.TreeReduceIntermediateKernelTemplate(kernel_name, kernel_params, ivar_names, sentinel_name, loop_ranges, param_dict, parfor_dim, redvars, parfor_args, parfor_reddict, redvars_dict, typemap, work_group_size)
Bases:
KernelTemplateInterfaceThe class to build reduction main kernel_txt template and compiled Numba functionIR.
- dump_kernel_ir()
Helper to dump the Numba IR for a TreeReduceIntermediateKernelTemplate.
- dump_kernel_string()
Helper to print the kernel function string.
- property kernel_ir
- Returns the Numba IR generated for a
TreeReduceIntermediateKernelTemplate.
Returns: The Numba functionIR object for the compiled kernel_txt string.
- property kernel_string
- Returns the function string generated for a
TreeReduceIntermediateKernelTemplate.
- Returns:
str: A string representing a stub reduction kernel function for the parfor.