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

feat[next]: Enable tests for embedded with cupy #1372

Merged
merged 21 commits into from
Jan 29, 2024

Conversation

havogt
Copy link
Contributor

@havogt havogt commented Nov 28, 2023

Introduces mechanism in tests for having different allocators for the same (None) backend.

Fixes:

  • The resulting buffer for scan is deduced from the buffer type of the arguments, if there are no arguments we fallback to numpy (maybe break). We need to find a mechanism for this corner case. Currently these tests are excluded with pytest.mark.uses_scan_without_field_args for cupy embedded execution.

Refactoring:

  • make common.field and common.connectivity private
  • rename next_tests.exclusion_matrices to definitions

TODOs for later:

  • broadcast of scalar ignores the broadcast

@tehrengruber tehrengruber changed the title feat[next] Enable tests for embedded with cupy and jax feat[next]: Enable tests for embedded with cupy and jax Dec 5, 2023
@havogt havogt changed the title feat[next]: Enable tests for embedded with cupy and jax feat[next]: Enable tests for embedded with cupy Jan 25, 2024
@havogt havogt requested a review from egparedes January 25, 2024 13:04
for arg in utils.flatten_nested_tuple(args):
if hasattr(arg, "array_ns"):
return arg.array_ns
return np
Copy link
Contributor Author

Choose a reason for hiding this comment

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

instead of returning np, maybe the save thing would be to error for now.

Copy link
Contributor

@egparedes egparedes left a comment

Choose a reason for hiding this comment

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

Minor comments and questions. It should be ready to merge in the next iteration.

havogt and others added 3 commits January 29, 2024 12:59
Co-authored-by: Enrique González Paredes <enriqueg@cscs.ch>
Copy link
Contributor

@egparedes egparedes left a comment

Choose a reason for hiding this comment

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

ILGTM

@havogt havogt merged commit f0986bb into GridTools:main Jan 29, 2024
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants