Skip to content

Commit 6103b6b

Browse files
Merge pull request #1435 from IntelPython/fix/windows-parfor
Migrate parfor to SPIRVKernelDispatcher 675cb79
1 parent 740274d commit 6103b6b

File tree

124 files changed

+1073
-586
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+1073
-586
lines changed

dev/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 4dd9bd111271e8299ebcca45d149268b
3+
config: fd05f27b09982a018355b52b5e35eb29
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

dev/_sources/autoapi/numba_dpex/core/parfors/kernel_builder/index.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Overview
2626
:widths: auto
2727
:class: summarytable
2828

29-
* - :py:obj:`create_kernel_for_parfor <numba_dpex.core.parfors.kernel_builder.create_kernel_for_parfor>`\ (lowerer, parfor_node, typemap, flags, loop_ranges, has_aliases, races, parfor_outputs)
29+
* - :py:obj:`create_kernel_for_parfor <numba_dpex.core.parfors.kernel_builder.create_kernel_for_parfor>`\ (lowerer, parfor_node, typemap, loop_ranges, races, parfor_outputs)
3030
- Creates a numba_dpex.kernel function for a parfor node.
3131
* - :py:obj:`update_sentinel <numba_dpex.core.parfors.kernel_builder.update_sentinel>`\ (kernel_ir, sentinel_name, kernel_body, new_label)
3232
- Searched all the blocks in the IR generated from a kernel template and
@@ -36,14 +36,14 @@ Overview
3636
Classes
3737
-------
3838

39-
.. py:class:: ParforKernel(name, kernel, signature, kernel_args, kernel_arg_types, queue: dpctl.SyclQueue, local_accessors=None, work_group_size=None)
39+
.. py:class:: ParforKernel(signature, kernel_args, kernel_arg_types, local_accessors=None, work_group_size=None, kernel_module=None)
4040
4141
4242
4343
4444
Functions
4545
---------
46-
.. py:function:: create_kernel_for_parfor(lowerer, parfor_node, typemap, flags, loop_ranges, has_aliases, races, parfor_outputs) -> ParforKernel
46+
.. py:function:: create_kernel_for_parfor(lowerer, parfor_node, typemap, loop_ranges, races, parfor_outputs) -> ParforKernel
4747
4848
Creates a numba_dpex.kernel function for a parfor node.
4949

dev/_sources/autoapi/numba_dpex/core/parfors/kernel_templates/kernel_template_iface/index.rst.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ Classes
3939

4040
* - :py:obj:`dump_kernel_string <numba_dpex.core.parfors.kernel_templates.kernel_template_iface.KernelTemplateInterface.dump_kernel_string>`\ ()
4141
- :summarylabel:`abc` \-
42-
* - :py:obj:`dump_kernel_ir <numba_dpex.core.parfors.kernel_templates.kernel_template_iface.KernelTemplateInterface.dump_kernel_ir>`\ ()
43-
- :summarylabel:`abc` \-
4442

4543

4644
.. rubric:: Members
@@ -49,10 +47,6 @@ Classes
4947
:abstractmethod:
5048

5149

52-
.. py:method:: dump_kernel_ir()
53-
:abstractmethod:
54-
55-
5650

5751

5852

dev/_sources/autoapi/numba_dpex/core/parfors/kernel_templates/range_kernel_template/index.rst.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ Classes
4242

4343
* - :py:obj:`dump_kernel_string <numba_dpex.core.parfors.kernel_templates.range_kernel_template.RangeKernelTemplate.dump_kernel_string>`\ ()
4444
- Helper to print the kernel function string.
45-
* - :py:obj:`dump_kernel_ir <numba_dpex.core.parfors.kernel_templates.range_kernel_template.RangeKernelTemplate.dump_kernel_ir>`\ ()
46-
- Helper to dump the Numba IR for the RangeKernelTemplate.
4745

4846

4947
.. rubric:: Members
@@ -53,11 +51,6 @@ Classes
5351
Helper to print the kernel function string.
5452

5553

56-
.. py:method:: dump_kernel_ir()
57-
58-
Helper to dump the Numba IR for the RangeKernelTemplate.
59-
60-
6154

6255

6356

dev/_sources/autoapi/numba_dpex/core/parfors/kernel_templates/reduction_template/index.rst.txt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ Classes
4646

4747
* - :py:obj:`dump_kernel_string <numba_dpex.core.parfors.kernel_templates.reduction_template.TreeReduceIntermediateKernelTemplate.dump_kernel_string>`\ ()
4848
- Helper to print the kernel function string.
49-
* - :py:obj:`dump_kernel_ir <numba_dpex.core.parfors.kernel_templates.reduction_template.TreeReduceIntermediateKernelTemplate.dump_kernel_ir>`\ ()
50-
- Helper to dump the Numba IR for a
5149

5250

5351
.. rubric:: Members
@@ -57,12 +55,6 @@ Classes
5755
Helper to print the kernel function string.
5856

5957

60-
.. py:method:: dump_kernel_ir()
61-
62-
Helper to dump the Numba IR for a
63-
TreeReduceIntermediateKernelTemplate.
64-
65-
6658

6759

6860
.. py:class:: 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)
@@ -83,8 +75,6 @@ Classes
8375

8476
* - :py:obj:`dump_kernel_string <numba_dpex.core.parfors.kernel_templates.reduction_template.RemainderReduceIntermediateKernelTemplate.dump_kernel_string>`\ ()
8577
- Helper to print the kernel function string.
86-
* - :py:obj:`dump_kernel_ir <numba_dpex.core.parfors.kernel_templates.reduction_template.RemainderReduceIntermediateKernelTemplate.dump_kernel_ir>`\ ()
87-
- Helper to dump the Numba IR for the
8878

8979

9080
.. rubric:: Members
@@ -94,12 +84,6 @@ Classes
9484
Helper to print the kernel function string.
9585

9686

97-
.. py:method:: dump_kernel_ir()
98-
99-
Helper to dump the Numba IR for the
100-
RemainderReduceIntermediateKernelTemplate.
101-
102-
10387

10488

10589

dev/_sources/autoapi/numba_dpex/core/parfors/parfor_lowerer/index.rst.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ Overview
2424

2525

2626

27-
.. list-table:: Attributes
28-
:header-rows: 0
29-
:widths: auto
30-
:class: summarytable
31-
32-
* - :py:obj:`keep_alive_kernels <numba_dpex.core.parfors.parfor_lowerer.keep_alive_kernels>`
33-
- \-
34-
3527

3628
Classes
3729
-------
@@ -96,12 +88,5 @@ Classes
9688

9789

9890

99-
Attributes
100-
----------
101-
.. py:data:: keep_alive_kernels
102-
:value: []
103-
104-
105-
10691

10792

dev/_sources/autoapi/numba_dpex/core/parfors/parfor_pass/index.rst.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Overview
3636

3737
* - :py:obj:`get_dpnp_ufunc_typ <numba_dpex.core.parfors.parfor_pass.get_dpnp_ufunc_typ>`\ (func)
3838
- get type of the incoming function from builtin registry
39+
* - :py:obj:`mk_alloc <numba_dpex.core.parfors.parfor_pass.mk_alloc>`\ (typingctx, typemap, calltypes, lhs, size_var, dtype, scope, loc, lhs_typ, \*\*kws)
40+
- generate an array allocation with np.empty() and return list of nodes.
3941

4042

4143

@@ -93,6 +95,15 @@ Functions
9395
get type of the incoming function from builtin registry
9496

9597

98+
.. py:function:: mk_alloc(typingctx, typemap, calltypes, lhs, size_var, dtype, scope, loc, lhs_typ, **kws)
99+
100+
generate an array allocation with np.empty() and return list of nodes.
101+
size_var can be an int variable or tuple of int variables.
102+
lhs_typ is the type of the array being allocated.
103+
104+
Taken from numba, added kws argument to pass it to __allocate__
105+
106+
96107

97108

98109

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
2+
3+
:orphan:
4+
5+
numba_dpex.core.parfors.parfor_sentinel_replace_pass
6+
====================================================
7+
8+
.. py:module:: numba_dpex.core.parfors.parfor_sentinel_replace_pass
9+
10+
11+
12+
13+
Overview
14+
--------
15+
.. list-table:: Classes
16+
:header-rows: 0
17+
:widths: auto
18+
:class: summarytable
19+
20+
* - :py:obj:`ParforBodyArguments <numba_dpex.core.parfors.parfor_sentinel_replace_pass.ParforBodyArguments>`
21+
- Arguments containing information to inject parfor code inside kernel.
22+
* - :py:obj:`ParforSentinelReplacePass <numba_dpex.core.parfors.parfor_sentinel_replace_pass.ParforSentinelReplacePass>`
23+
- Base class for function passes
24+
25+
26+
27+
28+
Classes
29+
-------
30+
31+
.. py:class:: ParforBodyArguments
32+
33+
Bases: :py:obj:`NamedTuple`
34+
35+
Arguments containing information to inject parfor code inside kernel.
36+
37+
38+
.. rubric:: Overview
39+
40+
.. list-table:: Attributes
41+
:header-rows: 0
42+
:widths: auto
43+
:class: summarytable
44+
45+
* - :py:obj:`loop_body <numba_dpex.core.parfors.parfor_sentinel_replace_pass.ParforBodyArguments.loop_body>`
46+
- \-
47+
* - :py:obj:`param_dict <numba_dpex.core.parfors.parfor_sentinel_replace_pass.ParforBodyArguments.param_dict>`
48+
- \-
49+
* - :py:obj:`legal_loop_indices <numba_dpex.core.parfors.parfor_sentinel_replace_pass.ParforBodyArguments.legal_loop_indices>`
50+
- \-
51+
52+
53+
54+
.. rubric:: Members
55+
56+
.. py:attribute:: loop_body
57+
:type: any
58+
59+
60+
61+
.. py:attribute:: param_dict
62+
:type: any
63+
64+
65+
66+
.. py:attribute:: legal_loop_indices
67+
:type: any
68+
69+
70+
71+
72+
73+
.. py:class:: ParforSentinelReplacePass
74+
75+
Bases: :py:obj:`numba.core.compiler_machinery.FunctionPass`
76+
77+
Base class for function passes
78+
79+
80+
81+
.. rubric:: Overview
82+
83+
84+
.. list-table:: Methods
85+
:header-rows: 0
86+
:widths: auto
87+
:class: summarytable
88+
89+
* - :py:obj:`run_pass <numba_dpex.core.parfors.parfor_sentinel_replace_pass.ParforSentinelReplacePass.run_pass>`\ (state)
90+
- Runs the pass itself. Must return True/False depending on whether
91+
92+
93+
.. rubric:: Members
94+
95+
.. py:method:: run_pass(state)
96+
97+
Runs the pass itself. Must return True/False depending on whether
98+
statement level modification took place.
99+
100+
101+
102+
103+
104+
105+

dev/_sources/autoapi/numba_dpex/core/parfors/reduction_helper/index.rst.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ Classes
5151
:widths: auto
5252
:class: summarytable
5353

54-
* - :py:obj:`copy_final_sum_to_host <numba_dpex.core.parfors.reduction_helper.ReductionKernelVariables.copy_final_sum_to_host>`\ (parfor_kernel)
54+
* - :py:obj:`copy_final_sum_to_host <numba_dpex.core.parfors.reduction_helper.ReductionKernelVariables.copy_final_sum_to_host>`\ (queue_ref)
5555
- \-
5656

5757

5858
.. rubric:: Members
5959

60-
.. py:method:: copy_final_sum_to_host(parfor_kernel)
60+
.. py:method:: copy_final_sum_to_host(queue_ref)
6161
6262
6363

dev/_sources/autoapi/numba_dpex/core/parfors/reduction_kernel_builder/index.rst.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ Overview
1818
:widths: auto
1919
:class: summarytable
2020

21-
* - :py:obj:`create_reduction_main_kernel_for_parfor <numba_dpex.core.parfors.reduction_kernel_builder.create_reduction_main_kernel_for_parfor>`\ (loop_ranges, parfor_node, typemap, flags, has_aliases, reductionKernelVar, parfor_reddict)
21+
* - :py:obj:`create_reduction_main_kernel_for_parfor <numba_dpex.core.parfors.reduction_kernel_builder.create_reduction_main_kernel_for_parfor>`\ (loop_ranges, parfor_node, typemap, reductionKernelVar, parfor_reddict)
2222
- Creates a numba_dpex.kernel function for reduction main kernel.
23-
* - :py:obj:`create_reduction_remainder_kernel_for_parfor <numba_dpex.core.parfors.reduction_kernel_builder.create_reduction_remainder_kernel_for_parfor>`\ (parfor_node, typemap, flags, has_aliases, reductionKernelVar, parfor_reddict, reductionHelperList)
23+
* - :py:obj:`create_reduction_remainder_kernel_for_parfor <numba_dpex.core.parfors.reduction_kernel_builder.create_reduction_remainder_kernel_for_parfor>`\ (parfor_node, typemap, reductionKernelVar, parfor_reddict, reductionHelperList)
2424
- Creates a numba_dpex.kernel function for a reduction remainder kernel.
2525

2626

2727

2828

2929
Functions
3030
---------
31-
.. py:function:: create_reduction_main_kernel_for_parfor(loop_ranges, parfor_node, typemap, flags, has_aliases, reductionKernelVar: numba_dpex.core.parfors.reduction_helper.ReductionKernelVariables, parfor_reddict=None)
31+
.. py:function:: create_reduction_main_kernel_for_parfor(loop_ranges, parfor_node, typemap, reductionKernelVar: numba_dpex.core.parfors.reduction_helper.ReductionKernelVariables, parfor_reddict=None)
3232
3333
Creates a numba_dpex.kernel function for reduction main kernel.
3434

3535

36-
.. py:function:: create_reduction_remainder_kernel_for_parfor(parfor_node, typemap, flags, has_aliases, reductionKernelVar, parfor_reddict, reductionHelperList)
36+
.. py:function:: create_reduction_remainder_kernel_for_parfor(parfor_node, typemap, reductionKernelVar, parfor_reddict, reductionHelperList)
3737
3838
Creates a numba_dpex.kernel function for a reduction remainder kernel.
3939

0 commit comments

Comments
 (0)