Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 6c67922

Browse files
committed
Merge branch 'update/njit_parallel_option' into 'devel'
Rename njit option spirv to offload See merge request mlp-python/NUMBA-DPPY!78
2 parents 1d85494 + 1e75630 commit 6c67922

17 files changed

+83
-83
lines changed

numba/core/cpu_dispatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class CPUDispatcher(dispatcher.Dispatcher):
77

88
def __init__(self, py_func, locals={}, targetoptions={}, impl_kind='direct', pipeline_class=compiler.Compiler):
99
if ('parallel' in targetoptions and isinstance(targetoptions['parallel'], dict) and
10-
'spirv' in targetoptions['parallel'] and targetoptions['parallel']['spirv'] == True):
10+
'offload' in targetoptions['parallel'] and targetoptions['parallel']['offload'] == True):
1111
import numba.dppy_config as dppy_config
1212
if dppy_config.dppy_present:
1313
from numba.dppy.compiler import DPPyCompiler

numba/core/cpu_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self, value):
6464
self.stencil = value.pop('stencil', True)
6565
self.fusion = value.pop('fusion', True)
6666
self.prange = value.pop('prange', True)
67-
self.gen_spirv = value.pop('spirv', False)
67+
self.gen_spirv = value.pop('offload', False)
6868
if value:
6969
msg = "Unrecognized parallel options: %s" % value.keys()
7070
raise NameError(msg)

numba/dppy/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def define_pipelines(self):
5454
# this maintains the objmode fallback behaviour
5555
pms = []
5656
if not self.state.flags.force_pyobject:
57-
print("Numba-DPPY [INFO]: Using Numba-DPPY pipeline")
57+
#print("Numba-DPPY [INFO]: Using Numba-DPPY pipeline")
5858
pms.append(DPPyPassBuilder.define_nopython_pipeline(self.state))
5959
if self.state.status.can_fallback or self.state.flags.force_pyobject:
6060
pms.append(

numba/dppy/examples/blacksholes_njit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def cndf2(inp):
1414
out = 0.5 + 0.5 * math.erf((math.sqrt(2.0)/2.0) * inp)
1515
return out
1616

17-
@numba.njit(parallel={'spirv':True}, fastmath=True)
17+
@numba.njit(parallel={'offload':True}, fastmath=True)
1818
def blackscholes(sptprice, strike, rate, volatility, timev):
1919
logterm = np.log(sptprice / strike)
2020
powterm = 0.5 * volatility * volatility

numba/dppy/examples/pa_examples/test1-2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from numba import njit, gdb
22
import numpy as np
33

4-
@njit(parallel={'spirv':True})
4+
@njit(parallel={'offload':True})
55
def f1(a, b):
66
c = a + b
77
return c

numba/dppy/examples/pa_examples/test1-3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from numba import njit, gdb
22
import numpy as np
33

4-
@njit(parallel={'spirv':True})
4+
@njit(parallel={'offload':True})
55
def f1(a, b):
66
c = a + b
77
return c

numba/dppy/examples/pa_examples/test1-4d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from numba import njit, gdb
22
import numpy as np
33

4-
@njit(parallel={'spirv':True})
4+
@njit(parallel={'offload':True})
55
def f1(a, b):
66
c = a + b
77
return c

numba/dppy/examples/pa_examples/test1-5d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from numba import njit, gdb
22
import numpy as np
33

4-
@njit(parallel={'spirv':True})
4+
@njit(parallel={'offload':True})
55
def f1(a, b):
66
c = a + b
77
return c

numba/dppy/examples/pa_examples/test1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import numpy as np
33

44
#@njit(target='dppy')
5-
@njit(parallel={'spirv':True})
5+
@njit(parallel={'offload':True})
66
def f1(a, b):
77
c = a + b
88
return c

numba/dppy/tests/dppy/test_numpy_bit_twiddling_functions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class TestNumpy_bit_twiddling_functions(DPPYTestCase):
1515
def test_bitwise_and(self):
16-
@njit(parallel={'spirv':True})
16+
@njit(parallel={'offload':True})
1717
def f(a, b):
1818
c = np.bitwise_and(a, b)
1919
return c
@@ -27,7 +27,7 @@ def f(a, b):
2727

2828

2929
def test_bitwise_or(self):
30-
@njit(parallel={'spirv':True})
30+
@njit(parallel={'offload':True})
3131
def f(a, b):
3232
c = np.bitwise_or(a, b)
3333
return c
@@ -41,7 +41,7 @@ def f(a, b):
4141

4242

4343
def test_bitwise_xor(self):
44-
@njit(parallel={'spirv':True})
44+
@njit(parallel={'offload':True})
4545
def f(a, b):
4646
c = np.bitwise_xor(a, b)
4747
return c
@@ -55,7 +55,7 @@ def f(a, b):
5555

5656

5757
def test_bitwise_not(self):
58-
@njit(parallel={'spirv':True})
58+
@njit(parallel={'offload':True})
5959
def f(a):
6060
c = np.bitwise_not(a)
6161
return c
@@ -68,7 +68,7 @@ def f(a):
6868

6969

7070
def test_invert(self):
71-
@njit(parallel={'spirv':True})
71+
@njit(parallel={'offload':True})
7272
def f(a):
7373
c = np.invert(a)
7474
return c
@@ -81,7 +81,7 @@ def f(a):
8181

8282

8383
def test_left_shift(self):
84-
@njit(parallel={'spirv':True})
84+
@njit(parallel={'offload':True})
8585
def f(a, b):
8686
c = np.left_shift(a, b)
8787
return c
@@ -95,7 +95,7 @@ def f(a, b):
9595

9696

9797
def test_right_shift(self):
98-
@njit(parallel={'spirv':True})
98+
@njit(parallel={'offload':True})
9999
def f(a, b):
100100
c = np.right_shift(a, b)
101101
return c

0 commit comments

Comments
 (0)