Repository navigation
Add __name__ attribute to CUDAUFuncDispatcher and test case - #8297
Merged
Merged
Conversation
Contributor
Author
|
gpuci run tests |
gmarkall
approved these changes
Aug 5, 2022
gmarkall
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR - this looks good to me and the reproducer from #8272 now runs with this PR.
Note that it is still broken for GUFuncs. For example, applying:
diff --git a/numba/cuda/tests/cudapy/test_gufunc.py b/numba/cuda/tests/cudapy/test_gufunc.py
index aeda5dac7..0c3952795 100644
--- a/numba/cuda/tests/cudapy/test_gufunc.py
+++ b/numba/cuda/tests/cudapy/test_gufunc.py
@@ -304,6 +304,10 @@ class TestCUDAGufunc(CUDATestCase):
np.asarray((4.5, 5.5, 6.5)))
self.check_tuple_arg(a, b)
+ def test_gufunc_name(self):
+ gufunc = _get_matmulcore_gufunc(max_blocksize=512)
+ self.assertEqual(gufunc.__name__, 'matmulcore')
+
if __name__ == '__main__':
unittest.main()results in a test failure:
======================================================================
ERROR: test_gufunc_name (numba.cuda.tests.cudapy.test_gufunc.TestCUDAGufunc)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/gmarkall/numbadev/numba/numba/cuda/tests/cudapy/test_gufunc.py", line 309, in test_gufunc_name
self.assertEqual(gufunc.__name__, 'matmulcore')
AttributeError: 'CUDAGenerializedUFunc' object has no attribute '__name__'
Perhaps a follow-up to add __name__ to CUDA GUFuncs would be appropriate. (Also, if the follow-up corrected the name of CUDAGenerializedUFunc that would be awesome, that typo is quite annoying! 🙂)
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses issue 8272: #8272.