Skip to content

CUDA: NumPy and string dtypes for local and shared arrays - #6879

Merged
sklam merged 2 commits into
numba:masterfrom
gmarkall:grm-issue-5901
Apr 19, 2021
Merged

sklam merged 2 commits into
numba:masterfrom
gmarkall:grm-issue-5901

Conversation

@gmarkall

Copy link
Copy Markdown
Member

Issue #5901 identified that at some point local arrays would only accept Numba types for their dtype. It appears that they now accept NumPy and string dtypes.

Since this now seems to work, this commit adds tests for passing string and NumPy types as dtypes to both local and shared array constructors.

Fixes #5901.

Issue numba#5901 identified that at some point local arrays would only accept
Numba types for their dtype. It appears that they now accept NumPy and
string dtypes.

Since this now seems to work, this commit adds tests for passing string
and NumPy types as dtypes to both local and shared array constructors.

Fixes numba#5901.

@stuartarchibald stuartarchibald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the patch, two minor things to resolve else looks good.

@skip_on_cudasim("Can't check typing in simulator")
def test_invalid_string_dtype(self):
# Check that strings of invalid dtypes cause a typing error
with self.assertRaises(TypingError):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps check the error message string?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@skip_on_cudasim("Can't check typing in simulator")
def test_invalid_string_dtype(self):
# Check that strings of invalid dtypes cause a typing error
with self.assertRaises(TypingError):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps check the error message string?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

@stuartarchibald stuartarchibald added 4 - Waiting on author Waiting for author to respond to review and removed 3 - Ready for Review labels Apr 9, 2021
@gmarkall gmarkall added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 4 - Waiting on author Waiting for author to respond to review labels Apr 12, 2021

@stuartarchibald stuartarchibald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the patch and fixes.

@stuartarchibald stuartarchibald added 4 - Waiting on CI Review etc done, waiting for CI to finish Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author labels Apr 14, 2021
@stuartarchibald

Copy link
Copy Markdown
Contributor

Buildfarm ID: numba_smoketest_cuda_yaml_46.

@stuartarchibald

Copy link
Copy Markdown
Contributor

Buildfarm ID: numba_smoketest_cuda_yaml_46.

Passed.

@stuartarchibald stuartarchibald added 5 - Ready to merge Review and testing done, is ready to merge BuildFarm Passed For PRs that have been through the buildfarm and passed and removed 4 - Waiting on CI Review etc done, waiting for CI to finish Pending BuildFarm For PRs that have been reviewed but pending a push through our buildfarm labels Apr 16, 2021
@sklam
sklam merged commit 10ae1e8 into numba:master Apr 19, 2021
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 CUDA CUDA related issue/PR Effort - short Short size effort needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cuda: inconsistency between data type specifications in device_array and local.array

3 participants