Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementations of type hashing. #3703

Merged
merged 28 commits into from Feb 14, 2019
Merged

Conversation

stuartarchibald
Copy link
Contributor

As title.

@stuartarchibald stuartarchibald added this to the Numba 0.43 RC milestone Jan 22, 2019
@stuartarchibald stuartarchibald changed the title WIP: Implementations of Number type hashing. WIP: Implementations of type hashing. Jan 22, 2019
@sklam sklam added this to In Progress in Active Jan 22, 2019
@seibert
Copy link
Contributor

seibert commented Jan 22, 2019

Looks like Python 2.7 is complaining about lack of sys.hash_info and Python 3 is failing with errors like:

2019-01-22T16:39:03.8456650Z ======================================================================
2019-01-22T16:39:03.8456930Z ERROR: test_constructor (numba.tests.test_sets.TestFloatSets)
2019-01-22T16:39:03.8457950Z ----------------------------------------------------------------------
2019-01-22T16:39:03.8458020Z Traceback (most recent call last):
2019-01-22T16:39:03.8458160Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/errors.py", line 620, in new_error_context
2019-01-22T16:39:03.8458220Z     yield
2019-01-22T16:39:03.8458270Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/lowering.py", line 258, in lower_block
2019-01-22T16:39:03.8458410Z     self.lower_inst(inst)
2019-01-22T16:39:03.8458650Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/lowering.py", line 301, in lower_inst
2019-01-22T16:39:03.8458700Z     val = self.lower_assign(ty, inst)
2019-01-22T16:39:03.8458840Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/lowering.py", line 447, in lower_assign
2019-01-22T16:39:03.8458900Z     return self.lower_expr(ty, value)
2019-01-22T16:39:03.8458950Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/lowering.py", line 894, in lower_expr
2019-01-22T16:39:03.8459070Z     res = self.lower_call(resty, expr)
2019-01-22T16:39:03.8459120Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/lowering.py", line 699, in lower_call
2019-01-22T16:39:03.8459170Z     res = self._lower_call_normal(fnty, expr, signature)
2019-01-22T16:39:03.8459290Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/lowering.py", line 866, in _lower_call_normal
2019-01-22T16:39:03.8459350Z     res = impl(self.builder, argvals, self.loc)
2019-01-22T16:39:03.8459400Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/targets/base.py", line 1132, in __call__
2019-01-22T16:39:03.8459530Z     res = self._imp(self._context, builder, self._sig, args, loc=loc)
2019-01-22T16:39:03.8459590Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/targets/base.py", line 1157, in wrapper
2019-01-22T16:39:03.8459790Z     return fn(*args, **kwargs)
2019-01-22T16:39:03.8459930Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/targets/setobj.py", line 1181, in set_add
2019-01-22T16:39:03.8459990Z     inst.add(item)
2019-01-22T16:39:03.8460040Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/targets/setobj.py", line 474, in add
2019-01-22T16:39:03.8460150Z     h = get_hash_value(context, builder, self._ty.dtype, item)
2019-01-22T16:39:03.8460220Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/targets/setobj.py", line 62, in get_hash_value
2019-01-22T16:39:03.8460260Z     fn = context.get_function(hash, sig)
2019-01-22T16:39:03.8460370Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/targets/base.py", line 551, in get_function
2019-01-22T16:39:03.8460440Z     return self.get_function(fn, sig, _firstcall=False)
2019-01-22T16:39:03.8460500Z   File "/Users/vsts/agent/2.144.2/work/1/s/numba/targets/base.py", line 553, in get_function
2019-01-22T16:39:03.8460620Z     raise NotImplementedError("No definition for lowering %s%s" % (key, sig))
2019-01-22T16:39:03.8461190Z NotImplementedError: No definition for lowering <built-in function hash>(Literal[int](1),) -> int64

@stuartarchibald
Copy link
Contributor Author

Python 2 problem was anticipated. Seems like the problem with sets is due to a reliance on lowering function registration ordering, I think I know at least part of the fix for this.

@stuartarchibald stuartarchibald changed the title WIP: Implementations of type hashing. Implementations of type hashing. Jan 31, 2019
Copy link
Member

@sklam sklam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's my first pass review.

numba/_helperlib.c Outdated Show resolved Hide resolved
numba/targets/hashing.py Outdated Show resolved Hide resolved
numba/targets/hashing.py Outdated Show resolved Hide resolved
numba/targets/hashing.py Show resolved Hide resolved
@stuartarchibald stuartarchibald added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 3 - Ready for Review labels Feb 1, 2019
numba/_helperlib.c Outdated Show resolved Hide resolved
@stuartarchibald stuartarchibald added the Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm label Feb 11, 2019
@sklam sklam moved this from In Progress to Reviewed... discussion/fixes taking place in Active Feb 12, 2019
@sklam sklam added BuildFarm Passed For PRs that have been through the buildfarm and passed 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm labels Feb 14, 2019
@seibert seibert merged commit 1f8292d into numba:master Feb 14, 2019
Active automation moved this from Reviewed... discussion/fixes taking place to Done Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to merge Review and testing done, is ready to merge BuildFarm Passed For PRs that have been through the buildfarm and passed
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants