From 3ecd00a09fced01902dea59325f1d82e92d648b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 May 2023 17:54:23 +0000 Subject: [PATCH] Merge pull request #999 from IntelPython/feature/dpnp_parfor_reduction_final Enable dpnp parfor reduction ee08e9b02bb7bcfecee78c530ad835211ced2b4e --- dev/.buildinfo | 2 +- dev/CoreFeatures.html | 2 +- ...el_templates.kernel_template_iface.rst.txt | 7 + ...ernel_templates.reduction_template.rst.txt | 7 + ...a_dpex.core.utils.kernel_templates.rst.txt | 2 + ...a_dpex.core.utils.reduction_helper.rst.txt | 7 + ...ore.utils.reduction_kernel_builder.rst.txt | 7 + .../apidoc/numba_dpex.core.utils.rst.txt | 2 + dev/_static/documentation_options.js | 2 +- dev/apidoc/modules.html | 2 +- dev/apidoc/numba_dpex.config.html | 2 +- dev/apidoc/numba_dpex.core.caching.html | 2 +- dev/apidoc/numba_dpex.core.codegen.html | 2 +- dev/apidoc/numba_dpex.core.compiler.html | 2 +- dev/apidoc/numba_dpex.core.datamodel.html | 2 +- .../numba_dpex.core.datamodel.models.html | 2 +- dev/apidoc/numba_dpex.core.descriptor.html | 2 +- .../numba_dpex.core.dpjit_dispatcher.html | 2 +- dev/apidoc/numba_dpex.core.exceptions.html | 2 +- dev/apidoc/numba_dpex.core.html | 13 +- .../numba_dpex.core.itanium_mangler.html | 2 +- ...re.kernel_interface.arg_pack_unpacker.html | 2 +- ...dpex.core.kernel_interface.dispatcher.html | 2 +- ...numba_dpex.core.kernel_interface.func.html | 2 +- .../numba_dpex.core.kernel_interface.html | 2 +- ...a_dpex.core.kernel_interface.indexers.html | 2 +- ...pex.core.kernel_interface.kernel_base.html | 2 +- ...ex.core.kernel_interface.spirv_kernel.html | 2 +- ...umba_dpex.core.kernel_interface.utils.html | 2 +- ...numba_dpex.core.passes.dufunc_inliner.html | 2 +- dev/apidoc/numba_dpex.core.passes.html | 2 +- .../numba_dpex.core.passes.lowerer.html | 2 +- dev/apidoc/numba_dpex.core.passes.parfor.html | 2 +- ....core.passes.parfor_legalize_cfd_pass.html | 2 +- ...dpex.core.passes.parfor_lowering_pass.html | 2 +- dev/apidoc/numba_dpex.core.passes.passes.html | 2 +- ...ba_dpex.core.pipelines.dpjit_compiler.html | 2 +- dev/apidoc/numba_dpex.core.pipelines.html | 2 +- ...a_dpex.core.pipelines.kernel_compiler.html | 2 +- .../numba_dpex.core.runtime.context.html | 19 +- dev/apidoc/numba_dpex.core.runtime.html | 3 +- .../numba_dpex.core.targets.dpjit_target.html | 2 +- dev/apidoc/numba_dpex.core.targets.html | 2 +- ...numba_dpex.core.targets.kernel_target.html | 2 +- ...a_dpex.core.typeconv.array_conversion.html | 2 +- dev/apidoc/numba_dpex.core.typeconv.html | 2 +- .../numba_dpex.core.types.array_type.html | 2 +- .../numba_dpex.core.types.dpctl_types.html | 2 +- ...mba_dpex.core.types.dpnp_ndarray_type.html | 2 +- dev/apidoc/numba_dpex.core.types.html | 2 +- ...ex.core.types.numba_types_short_names.html | 2 +- ...umba_dpex.core.types.usm_ndarray_type.html | 2 +- .../numba_dpex.core.typing.dpnpdecl.html | 2 +- dev/apidoc/numba_dpex.core.typing.html | 2 +- dev/apidoc/numba_dpex.core.typing.typeof.html | 2 +- .../numba_dpex.core.utils.caching_utils.html | 2 +- dev/apidoc/numba_dpex.core.utils.html | 42 +++- .../numba_dpex.core.utils.kernel_builder.html | 19 +- ...numba_dpex.core.utils.kernel_launcher.html | 18 +- ...umba_dpex.core.utils.kernel_templates.html | 29 ++- ...ernel_templates.kernel_template_iface.html | 153 ++++++++++++ ...ernel_templates.range_kernel_template.html | 2 +- ...s.kernel_templates.reduction_template.html | 213 +++++++++++++++++ ...umba_dpex.core.utils.reduction_helper.html | 224 ++++++++++++++++++ ...x.core.utils.reduction_kernel_builder.html | 139 +++++++++++ .../numba_dpex.core.utils.suai_helper.html | 2 +- dev/apidoc/numba_dpex.debuginfo.html | 2 +- dev/apidoc/numba_dpex.decorators.html | 2 +- ...pex.dpctl_iface.dpctl_capi_fn_builder.html | 2 +- ...dpex.dpctl_iface.dpctl_function_types.html | 2 +- dev/apidoc/numba_dpex.dpctl_iface.html | 2 +- ....dpctl_iface.legacy_kernel_launch_ops.html | 2 +- .../numba_dpex.dpnp_iface.arrayobj.html | 2 +- .../numba_dpex.dpnp_iface.dpnp_ufunc_db.html | 2 +- .../numba_dpex.dpnp_iface.dpnpimpl.html | 2 +- dev/apidoc/numba_dpex.dpnp_iface.html | 2 +- dev/apidoc/numba_dpex.html | 2 +- .../numba_dpex.ocl.atomics.atomic_helper.html | 2 +- dev/apidoc/numba_dpex.ocl.atomics.html | 2 +- dev/apidoc/numba_dpex.ocl.html | 2 +- dev/apidoc/numba_dpex.ocl.mathdecl.html | 2 +- dev/apidoc/numba_dpex.ocl.mathimpl.html | 2 +- dev/apidoc/numba_dpex.ocl.ocldecl.html | 2 +- dev/apidoc/numba_dpex.ocl.oclimpl.html | 2 +- dev/apidoc/numba_dpex.ocl.stubs.html | 2 +- dev/apidoc/numba_dpex.parfor_diagnostics.html | 2 +- dev/apidoc/numba_dpex.printimpl.html | 2 +- dev/apidoc/numba_dpex.spirv_generator.html | 2 +- dev/apidoc/numba_dpex.utils.array_utils.html | 2 +- dev/apidoc/numba_dpex.utils.constants.html | 2 +- dev/apidoc/numba_dpex.utils.html | 2 +- ...numba_dpex.utils.llvm_codegen_helpers.html | 2 +- .../numba_dpex.utils.type_conversion_fns.html | 2 +- dev/apidoc/numba_dpex.vectorizers.html | 2 +- dev/developer_guides/caching.html | 2 +- dev/developer_guides/dpnp_integration.html | 2 +- dev/developer_guides/tools.html | 2 +- dev/genindex.html | 146 ++++++++++-- dev/index.html | 2 +- dev/objects.inv | Bin 10217 -> 10624 bytes dev/py-modindex.html | 22 +- dev/search.html | 2 +- dev/searchindex.js | 2 +- dev/user_guides/debugging/altering.html | 2 +- dev/user_guides/debugging/backtrace.html | 2 +- dev/user_guides/debugging/breakpoints.html | 2 +- dev/user_guides/debugging/common_issues.html | 2 +- dev/user_guides/debugging/data.html | 2 +- .../debugging/debugging_environment.html | 2 +- dev/user_guides/debugging/features.html | 2 +- dev/user_guides/debugging/frame_info.html | 2 +- dev/user_guides/debugging/index.html | 2 +- dev/user_guides/debugging/limitations.html | 2 +- .../debugging/local_variables.html | 2 +- dev/user_guides/debugging/numba-0.55.html | 2 +- dev/user_guides/debugging/set_up_machine.html | 2 +- dev/user_guides/debugging/stepping.html | 2 +- dev/user_guides/debugging/symbols.html | 2 +- dev/user_guides/docker.html | 2 +- dev/user_guides/getting_started.html | 2 +- .../atomic-operations.html | 2 +- .../device-functions.html | 2 +- .../kernel_programming_guide/index.html | 2 +- .../memory-management.html | 2 +- .../memory_allocation_address_space.html | 2 +- .../kernel_programming_guide/random.html | 2 +- .../kernel_programming_guide/reduction.html | 2 +- .../selecting_device.html | 2 +- .../supported-python-features.html | 2 +- .../synchronization.html | 2 +- .../kernel_programming_guide/ufunc.html | 2 +- .../writing_kernels.html | 2 +- .../migrating_from_numba_cuda.html | 2 +- 133 files changed, 1137 insertions(+), 161 deletions(-) create mode 100644 dev/_sources/apidoc/numba_dpex.core.utils.kernel_templates.kernel_template_iface.rst.txt create mode 100644 dev/_sources/apidoc/numba_dpex.core.utils.kernel_templates.reduction_template.rst.txt create mode 100644 dev/_sources/apidoc/numba_dpex.core.utils.reduction_helper.rst.txt create mode 100644 dev/_sources/apidoc/numba_dpex.core.utils.reduction_kernel_builder.rst.txt create mode 100644 dev/apidoc/numba_dpex.core.utils.kernel_templates.kernel_template_iface.html create mode 100644 dev/apidoc/numba_dpex.core.utils.kernel_templates.reduction_template.html create mode 100644 dev/apidoc/numba_dpex.core.utils.reduction_helper.html create mode 100644 dev/apidoc/numba_dpex.core.utils.reduction_kernel_builder.html diff --git a/dev/.buildinfo b/dev/.buildinfo index 985b96115e..cfec1aaf35 100644 --- a/dev/.buildinfo +++ b/dev/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 43d741c7b0a96a7ae8222d55d81e851e +config: 176b1a5a2334742ba67c2198c100f20b tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/dev/CoreFeatures.html b/dev/CoreFeatures.html index bf84badf42..ae5a987ba8 100644 --- a/dev/CoreFeatures.html +++ b/dev/CoreFeatures.html @@ -13,7 +13,7 @@ - Code-generation based on a device — numba-dpex 0.21.0dev0+20.gc0dd04f6 documentation + Code-generation based on a device — numba-dpex 0.21.0dev0+23.gee08e9b0 documentation + + + + + numba_dpex.core.utils.kernel_templates.kernel_template_iface module — numba-dpex 0.21.0dev0+23.gee08e9b0 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • + View page source +
  • +
+
+
+
+
+ +
+

numba_dpex.core.utils.kernel_templates.kernel_template_iface module

+
+
+class numba_dpex.core.utils.kernel_templates.kernel_template_iface.KernelTemplateInterface
+

Bases: object

+
+
+abstract dump_kernel_ir()
+
+ +
+
+abstract dump_kernel_string()
+
+ +
+
+abstract property kernel_ir
+
+ +
+
+abstract property kernel_string
+
+ +
+ +
+ + +
+
+
+ +
+ +
+

© Copyright 2021-2023 Intel Corporation.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/dev/apidoc/numba_dpex.core.utils.kernel_templates.range_kernel_template.html b/dev/apidoc/numba_dpex.core.utils.kernel_templates.range_kernel_template.html index 3da7adb8fa..f564e9306e 100644 --- a/dev/apidoc/numba_dpex.core.utils.kernel_templates.range_kernel_template.html +++ b/dev/apidoc/numba_dpex.core.utils.kernel_templates.range_kernel_template.html @@ -13,7 +13,7 @@ - numba_dpex.core.utils.kernel_templates.range_kernel_template module — numba-dpex 0.21.0dev0+20.gc0dd04f6 documentation + numba_dpex.core.utils.kernel_templates.range_kernel_template module — numba-dpex 0.21.0dev0+23.gee08e9b0 documentation + + + + + numba_dpex.core.utils.kernel_templates.reduction_template module — numba-dpex 0.21.0dev0+23.gee08e9b0 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • + View page source +
  • +
+
+
+
+
+ +
+

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: KernelTemplateInterface

+

The 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: KernelTemplateInterface

+

The 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.

+
+
+
+ +
+ +
+ + +
+
+
+ +
+ +
+

© Copyright 2021-2023 Intel Corporation.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/dev/apidoc/numba_dpex.core.utils.reduction_helper.html b/dev/apidoc/numba_dpex.core.utils.reduction_helper.html new file mode 100644 index 0000000000..2e66daacfd --- /dev/null +++ b/dev/apidoc/numba_dpex.core.utils.reduction_helper.html @@ -0,0 +1,224 @@ + + + + + + + + + + + numba_dpex.core.utils.reduction_helper module — numba-dpex 0.21.0dev0+23.gee08e9b0 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

numba_dpex.core.utils.reduction_helper module

+
+
+class numba_dpex.core.utils.reduction_helper.ReductionHelper
+

Bases: object

+

The class to define and allocate reduction intermediate variables.

+
+ +
+
+class numba_dpex.core.utils.reduction_helper.ReductionKernelVariables(lowerer, parfor_node, typemap, parfor_outputs, reductionHelperList)
+

Bases: object

+

The parfor body and the main function body share ir.Var nodes. +We have to do some replacements of Var names in the parfor body +to make them legal parameter names. If we don’t copy then the +Vars in the main function also would incorrectly change their name.

+
+
+copy_final_sum_to_host(psrfor_kernel)
+
+ +
+
+property final_sum_names
+
+ +
+
+property func_arg_types
+
+ +
+
+property ind_dict
+
+ +
+
+property legal_loop_indices
+
+ +
+
+property loop_body
+
+ +
+
+property lowerer
+
+ +
+
+property param_dict
+
+ +
+
+property param_types
+
+ +
+
+property parfor_legalized_params
+
+ +
+ +
+ +
+
+property parfor_reddict
+
+ +
+
+property parfor_redvars
+
+ +
+
+property parfor_redvars_to_redarrs
+
+ +
+ +
+ +
+
+property work_group_size
+
+ +
+ +
+ + +
+
+
+ +
+ +
+

© Copyright 2021-2023 Intel Corporation.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/dev/apidoc/numba_dpex.core.utils.reduction_kernel_builder.html b/dev/apidoc/numba_dpex.core.utils.reduction_kernel_builder.html new file mode 100644 index 0000000000..8fde91e861 --- /dev/null +++ b/dev/apidoc/numba_dpex.core.utils.reduction_kernel_builder.html @@ -0,0 +1,139 @@ + + + + + + + + + + + numba_dpex.core.utils.reduction_kernel_builder module — numba-dpex 0.21.0dev0+23.gee08e9b0 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

numba_dpex.core.utils.reduction_kernel_builder module

+
+
+numba_dpex.core.utils.reduction_kernel_builder.create_reduction_main_kernel_for_parfor(loop_ranges, parfor_node, typemap, flags, has_aliases, reductionKernelVar, parfor_reddict=None)
+

Creates a numba_dpex.kernel function for reduction main kernel.

+
+ +
+
+numba_dpex.core.utils.reduction_kernel_builder.create_reduction_remainder_kernel_for_parfor(parfor_node, typemap, flags, has_aliases, reductionKernelVar, parfor_reddict, reductionHelperList)
+

Creates a numba_dpex.kernel function for a reduction remainder kernel.

+
+ +
+ + +
+
+
+ +
+ +
+

© Copyright 2021-2023 Intel Corporation.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/dev/apidoc/numba_dpex.core.utils.suai_helper.html b/dev/apidoc/numba_dpex.core.utils.suai_helper.html index 1842d3f305..fc15cb201c 100644 --- a/dev/apidoc/numba_dpex.core.utils.suai_helper.html +++ b/dev/apidoc/numba_dpex.core.utils.suai_helper.html @@ -13,7 +13,7 @@ - numba_dpex.core.utils.suai_helper module — numba-dpex 0.21.0dev0+20.gc0dd04f6 documentation + numba_dpex.core.utils.suai_helper module — numba-dpex 0.21.0dev0+23.gee08e9b0 documentation