Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
7cbb9c0
Initialize process lock lazily to prevent multiprocessing issue
belltailjp May 18, 2020
947af3d
Flake8
belltailjp May 20, 2020
726786b
fix
niteya-shah May 27, 2020
2277244
changes as requested
niteya-shah May 28, 2020
7d84b3a
Merge branch 'fix-for-3789' of https://github.com/niteya-shah/numba i…
niteya-shah May 28, 2020
e9cbf13
fix rebase mistake
niteya-shah May 28, 2020
707bbce
CUDA: Add function to get SASS for kernels
gmarkall Jun 8, 2020
83e9754
Fix #5836: Passing opt=0 to NVVM doesn't work
gmarkall Jun 10, 2020
bfd1b71
Fix #5835: CUDA debug info is invalid
gmarkall Jun 10, 2020
99e3950
CUDA: Add opt flag to @cuda.jit
gmarkall Jun 10, 2020
88a4b3a
Add test for Issue #5835
gmarkall Jun 10, 2020
d7721cb
Add parfor support for inplace_binop on arrays.
DrTodd13 Jun 11, 2020
d723836
Add assignment after inplace_binop parfor to assign target of inplace…
DrTodd13 Jun 11, 2020
211be86
Add test of support for inplace_binop parfor conversion.
DrTodd13 Jun 11, 2020
d17e25f
Remove accidentally left-in opt kwarg
gmarkall Jun 12, 2020
7cd32fc
One more parfor should be created for logistic regression for the inp…
DrTodd13 Jun 12, 2020
d8a272e
Move the conversion of inplace binops after the prange pass so that r…
DrTodd13 Jun 12, 2020
831d5bf
Reduce overhead in objmode function
sklam Jun 24, 2020
2a6ac69
Keep a memo to reuse unpickled object from compiled-code
sklam Jun 24, 2020
ce0b127
Fix SVML tests with LLVM 10 and AVX512
PokhodenkoSA Jul 3, 2020
72b6784
Deprecate target kwarg for numba.jit.
hameerabbasi Jul 13, 2020
ac03caf
Merge branch 'master' into fix/iss5828_objmode_overhead
sklam Jul 16, 2020
ec30d9c
Fix segfault due to corrupted typeobject in numba_do_raise
sklam Jul 16, 2020
741e1cc
Update numba/tests/test_parfors.py
DrTodd13 Jul 20, 2020
1630eaa
Fixing up numba_do_raise
sklam Jul 21, 2020
4639799
Merge remote-tracking branch 'numba/master' into grm-inspect-sass-v2
gmarkall Jul 21, 2020
69b300f
Revert "Fix segfault due to corrupted typeobject in numba_do_raise"
sklam Jul 21, 2020
8b3f34d
Simplify do_raise logic
sklam Jul 21, 2020
ca9dfba
Hash pickled buffer to help deduplicate
sklam Jul 22, 2020
96d35e1
Fix pycc for changed pickle info
sklam Jul 22, 2020
7ce939c
Cleanup
sklam Jul 22, 2020
2ba2eb4
Make template show better name for debugging
sklam Jul 23, 2020
37747b0
Ensure the cache is not populated if the compilation will fail
sklam Jul 23, 2020
17365a5
Fix #6023
kozlov-alexey Jul 24, 2020
34fd3df
CUDA: Don't optimize IR before sending it to NVVM
gmarkall Jul 23, 2020
b5c6f15
setup.py: add option to disable tbb at compile time
epsilon-0 Jun 5, 2020
55a9bd2
added documentation for NUMBA_NO_TBB and NUMBA_NO_OPENMP
epsilon-0 Jun 16, 2020
6ef2fd7
Apply suggestions from code review
epsilon-0 Jun 23, 2020
90cfbc1
Added intel documentation link
epsilon-0 Jun 23, 2020
0ee6175
Respond to PR feedback
stuartarchibald Jul 24, 2020
ddfeb7b
Fix missing kws
sklam Jul 24, 2020
3f3c1db
Fix missing guard for StringLiteral in assert_equiv
sklam Jul 24, 2020
256231e
Prefer non-literal
sklam Jul 24, 2020
285f84f
Fix __unliteral__ for StarArgTuple
sklam Jul 24, 2020
66fb4a4
Tests to check multiprocessing context isn't set by import
stuartarchibald Jul 24, 2020
8c6f918
Re-word deprecation message and add deprecation to docs.
hameerabbasi Jul 27, 2020
1d26cf9
Respond to PR #6030 feedback
gmarkall Jul 27, 2020
e9f96e6
Fix argsort
sklam Jul 27, 2020
c14e5f4
Add `prefer_literal` for template that needs it
sklam Jul 27, 2020
65f107c
__unliteral__ should not change tuple type
sklam Jul 27, 2020
aab789a
Revert "__unliteral__ should not change tuple type"
sklam Jul 28, 2020
f03ecfb
Specialize Unituple.__unliteral__
sklam Jul 28, 2020
f39ccce
Use arg_aliases as well as alias_map to determine if statements can b…
DrTodd13 Jul 28, 2020
08de21a
Fix literal_unroll to raise on non-literal input
sklam Jul 28, 2020
0077782
Fix template __str__/__repr__ to not cause self-recursion
sklam Jul 28, 2020
91a906c
Fix numba.tests.test_lists.TestLiteralLists.test_contains
sklam Jul 28, 2020
4c86201
Fix TestLiteralStrKeyDict
sklam Jul 28, 2020
0596e3c
Merge remote-tracking branch 'numba/master' into grm-disable-o1-for-nvvm
gmarkall Jul 29, 2020
e3719bc
Fix test_const_array_3d for CUDA 9.0
gmarkall Jul 29, 2020
89e2a4c
Remove xfail from test_const_record_align_optimization
gmarkall Jul 29, 2020
019ee7b
Fix test_const_array_3d for CUDA 8
gmarkall Jul 29, 2020
e1fd664
Fix test_const_array_3d for CUDA 9.1
gmarkall Jul 29, 2020
f1e1943
Fix test_const_record_align_optimization for 10.2
gmarkall Jul 29, 2020
6bcc0a8
Merge remote-tracking branch 'numba/master' into grm-inspect-sass-v2
gmarkall Jul 29, 2020
2eae393
Fix disassemble_cubin on Python 3.6
gmarkall Jul 29, 2020
e561f62
Attempt to fix test_const_record_optimization
gmarkall Jul 29, 2020
8f281a4
Merge branch 'master' into grm-inspect-sass-v2
gmarkall Jul 29, 2020
8d38cd5
Merge remote-tracking branch 'numba/master' into grm-debug-fixes
gmarkall Jul 29, 2020
f44b24a
Clean up
sklam Jul 29, 2020
4ea838b
Add docstrings to prefer_literal
sklam Jul 29, 2020
b99ca56
Add support for CUDA stream callbacks and asyncio awaitable streams
pwuertz Jul 30, 2020
76fc464
Attempt to fix test_const_record_optimization on Windows / CUDA 10
gmarkall Jul 30, 2020
fa16f25
Document inspect_sass
gmarkall Jul 30, 2020
48e2087
Fix dtype for atomic_add_double tests
gmarkall Jul 30, 2020
07415eb
Add code comments
sklam Jul 30, 2020
df78f66
Merge pull request #5745 from pwuertz/cuda_stream_callback
sklam Jul 30, 2020
a9155a9
Merge pull request #5761 from niteya-shah/fix-for-3789
sklam Jul 30, 2020
54fbed9
Merge pull request #5826 from gmarkall/grm-inspect-sass-v2
sklam Jul 30, 2020
e686e52
Merge pull request #5846 from gmarkall/grm-debug-fixes
sklam Jul 30, 2020
1c77b13
Merge pull request #5856 from IntelLabs/parfor_inplace_binop
sklam Jul 30, 2020
fa1d922
Merge pull request #6030 from gmarkall/grm-disable-o1-for-nvvm
sklam Jul 30, 2020
6c01e9a
Merge pull request #6052 from gmarkall/grm-fix-atomic-tests-dtypes
sklam Jul 30, 2020
94fceaa
Adding proper docstring
kozlov-alexey Jul 30, 2020
bf81fbd
Flake8
belltailjp Jul 31, 2020
8427972
Fix #6053 issue on invalid inlining of non-empty build_list by inline…
sklam Jul 31, 2020
45fee0e
fix aarch64/python_3.8 failure on master
esc Jul 31, 2020
228cff5
Add prefer_literal to overload
sklam Jul 31, 2020
d875e12
Add prefer_literal to overload_method.
sklam Jul 31, 2020
e811f41
Add prefer_literal to numpy sum method
sklam Jul 31, 2020
49551fd
Fix dispatch in BoundFunction
sklam Jul 31, 2020
7d1d0ea
Update numba/tests/test_stencils.py
esc Jul 31, 2020
5e832e9
Merge pull request #6057 from esc/fix/aarch64_py38
sklam Jul 31, 2020
ce02012
Merge pull request #5980 from hameerabbasi/target-kwarg
sklam Jul 31, 2020
ebbae83
Update docs
sklam Jul 31, 2020
17e72af
Add test to check _numba_unpickle is memorizing
sklam Jul 31, 2020
02deac5
Change references to numba.pydata.org to https
Aug 2, 2020
19ce816
Apply suggestions from code review
stuartarchibald Aug 3, 2020
a02bdea
Respond to review.
stuartarchibald Aug 3, 2020
6a3aa2f
Minor typo fix.
stuartarchibald Aug 3, 2020
2f8c737
Apply suggestions from code review
stuartarchibald Aug 3, 2020
d2ae805
noqa long line
Aug 3, 2020
b118abb
Apply suggestions from code review
sklam Aug 3, 2020
8acb58d
Update error message
sklam Aug 3, 2020
4d7b707
Merge pull request #6062 from mroeschke/fix/https
stuartarchibald Aug 3, 2020
bf18b3b
Merge pull request #6056 from sklam/fix/iss6053
stuartarchibald Aug 3, 2020
0574148
Merge pull request #6046 from IntelLabs/issue5942
stuartarchibald Aug 3, 2020
287daa9
Merge pull request #6035 from sklam/fix/overspecialize
stuartarchibald Aug 3, 2020
395db46
Merge pull request #6031 from stuartarchibald/pr_5821_continued_tmp
stuartarchibald Aug 3, 2020
8563d05
Merge pull request #6028 from kozlov-alexey/bugfix/6023_tuple_getitem…
stuartarchibald Aug 3, 2020
2e5169a
Merge pull request #6017 from sklam/refactor/do_raise
stuartarchibald Aug 3, 2020
6bb2930
Merge pull request #5724 from belltailjp/lazy-initialize-process-lock
stuartarchibald Aug 3, 2020
9b8bbc0
Merge branch 'master' into fix/overspecialize_option
sklam Aug 3, 2020
6ffb1da
Merge branch 'master' into fix/iss5828_objmode_overhead
sklam Aug 3, 2020
d63dede
Add __unliteral__ to despecialize containers with initial_value
sklam Aug 3, 2020
235df5e
try this
stuartarchibald Aug 4, 2020
585f609
Try this
stuartarchibald Aug 4, 2020
be63016
Add test for literally, list and append
stuartarchibald Aug 4, 2020
73ce1a9
Add test for literally, dict and insert
stuartarchibald Aug 4, 2020
0496072
unliteral for static get item assert
stuartarchibald Aug 4, 2020
15930f0
Remove f-strings in setup.py
stuartarchibald Aug 4, 2020
965a19b
Fix bugs!
stuartarchibald Aug 4, 2020
18462a7
Fixes invalid C prototype in helper function.
stuartarchibald Aug 4, 2020
d328ac5
Remove dead comments
sklam Aug 4, 2020
7d9286f
Make prefer_literal has default value
sklam Aug 4, 2020
6a4fe0f
Make prefer_literal has default value
sklam Aug 4, 2020
89a3840
Add docstring on prefer_literal
sklam Aug 4, 2020
efaa1a7
Replace unliteral with _unlit_non_poison
sklam Aug 4, 2020
50d3df6
Update numba/core/extending.py
sklam Aug 4, 2020
dc16d2c
Fix for #6005
stuartarchibald Jul 21, 2020
d3527ad
Update numba/core/typing/templates.py
stuartarchibald Aug 4, 2020
8b40f73
Merge pull request #5922 from sklam/fix/iss5828_objmode_overhead
sklam Aug 4, 2020
bed4d04
Merge pull request #6058 from sklam/fix/overspecialize_option
sklam Aug 4, 2020
64923dd
Merge pull request #6070 from stuartarchibald/wip/fix_overspecialized…
sklam Aug 4, 2020
c64d69a
Merge pull request #6071 from stuartarchibald/fix/5854
sklam Aug 4, 2020
04eabf6
Merge pull request #6072 from stuartarchibald/fix/6005
sklam Aug 4, 2020
4aceb27
Merge pull request #6073 from stuartarchibald/fix/invalid_prototype_1
sklam Aug 4, 2020
f7908cc
Duplicate NumPy's PyArray_DescrCheck macro
stuartarchibald Aug 5, 2020
7fcd8fa
CUDA: Prevent auto-upgrade of atomic intrinsics
gmarkall Aug 5, 2020
3578228
Fix issue with cross drive use and relpath.
stuartarchibald Aug 5, 2020
eff0bad
Use more primive drive letter check.
stuartarchibald Aug 5, 2020
c36a7b4
Fix copy paste error.
stuartarchibald Aug 5, 2020
bd3008a
Fix bug in initial value unify.
stuartarchibald Aug 5, 2020
2d49e4d
Add note about macro version
stuartarchibald Aug 5, 2020
f49d415
Update CHANGE_LOG for 0.51.0
stuartarchibald Aug 5, 2020
9444ddb
Merge pull request #5962 from PokhodenkoSA/fix/llvm-prefer-256-bit-fo…
sklam Aug 5, 2020
a1ed6b7
Merge pull request #6078 from stuartarchibald/fix/6041
sklam Aug 5, 2020
ff51b75
Merge pull request #6080 from gmarkall/grm-fix-atomics
sklam Aug 5, 2020
5e9d723
Merge pull request #6081 from stuartarchibald/fix/relpath
sklam Aug 5, 2020
aac6565
Merge pull request #6083 from stuartarchibald/fix/6082
sklam Aug 5, 2020
833c590
Merge pull request #6084 from stuartarchibald/wip/change_log_051
sklam Aug 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reduce overhead in objmode function
- remove unnecessary unpickling of OmittedArg.
  • Loading branch information
sklam committed Jun 24, 2020
commit 831d5bf62dfa20006d68c05a3673cf0b4e6c754e
48 changes: 31 additions & 17 deletions numba/core/pylowering.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import builtins
import operator
import inspect

from llvmlite.llvmpy.core import Type, Constant
import llvmlite.llvmpy.core as lc
Expand Down Expand Up @@ -75,10 +76,6 @@ def init(self):
def pre_lower(self):
super(PyLower, self).pre_lower()
self.init_pyapi()
# Pre-computed for later use
from numba.core.dispatcher import OmittedArg
self.omitted_typobj = self.pyapi.unserialize(
self.pyapi.serialize_object(OmittedArg))

def post_lower(self):
pass
Expand Down Expand Up @@ -170,6 +167,15 @@ def lower_inst(self, inst):
else:
raise NotImplementedError(type(inst), inst)

@utils.cached_property
def _omitted_typobj(self):
"""Return a `OmittedArg` type instance in LLVM value suitable for
testing at runtime.
"""
from numba.core.dispatcher import OmittedArg
return self.pyapi.unserialize(
self.pyapi.serialize_object(OmittedArg))

def lower_assign(self, inst):
"""
The returned object must have a new reference
Expand All @@ -188,21 +194,29 @@ def lower_assign(self, inst):
elif isinstance(value, ir.Yield):
return self.lower_yield(value)
elif isinstance(value, ir.Arg):
# TODO: check why value.name may not exist
param = self.func_ir.func_id.pysig.parameters.get(value.name)

obj = self.fnargs[value.index]
# When an argument is omitted, the dispatcher hands it as
# _OmittedArg(<default value>)
typobj = self.pyapi.get_type(obj)
slot = cgutils.alloca_once_value(self.builder, obj)
is_omitted = self.builder.icmp_unsigned('==', typobj,
self.omitted_typobj)
with self.builder.if_else(is_omitted, likely=False) as (omitted, present):
with present:
self.incref(obj)
self.builder.store(obj, slot)
with omitted:
# The argument is omitted => get the default value
obj = self.pyapi.object_getattr_string(obj, 'value')
self.builder.store(obj, slot)
# Don't check for OmittedArg unless the argument has a default
if param is not None and param.default is inspect.Parameter.empty:
self.incref(obj)
self.builder.store(obj, slot)
else:
# When an argument is omitted, the dispatcher hands it as
# _OmittedArg(<default value>)
typobj = self.pyapi.get_type(obj)
is_omitted = self.builder.icmp_unsigned('==', typobj,
self._omitted_typobj)
with self.builder.if_else(is_omitted, likely=False) as (omitted, present):
with present:
self.incref(obj)
self.builder.store(obj, slot)
with omitted:
# The argument is omitted => get the default value
obj = self.pyapi.object_getattr_string(obj, 'value')
self.builder.store(obj, slot)

return self.builder.load(slot)
else:
Expand Down