-
Notifications
You must be signed in to change notification settings - Fork 49
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[cartesian]: K offset write #1452
feat[cartesian]: K offset write #1452
Conversation
@@ -1417,9 +1417,14 @@ def visit_Assign(self, node: ast.Assign) -> list: | |||
for t in node.targets[0].elts if isinstance(node.targets[0], ast.Tuple) else node.targets: | |||
name, spatial_offset, data_index = self._parse_assign_target(t) | |||
if spatial_offset: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these the only changes to make it work? that's nice. It means we "only" have to sort out the conceptual problems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was expecting more too! So far though, it's all it takes. Next I'll put in some integration tests with conditionals and I'll simplify Oliver's dual for-loop example he pulled from SHiELD microphysics to bring something we've encountered in the wild.
I've added a test that mimics the usage seen in the wild (column physics) |
tests/cartesian_tests/integration_tests/multi_feature_tests/test_code_generation.py
Outdated
Show resolved
Hide resolved
B = gt_storage.zeros( | ||
backend=backend, aligned_index=(0, 0, 0), shape=(2, 2, 4), dtype=np.float64 | ||
) | ||
simple(A, B) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit confused. Why is this not an oob write?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extent calculation is doing the right job by excluding the first element from the loop
tests/cartesian_tests/integration_tests/multi_feature_tests/test_code_generation.py
Show resolved
Hide resolved
tests/cartesian_tests/integration_tests/multi_feature_tests/test_code_generation.py
Outdated
Show resolved
Hide resolved
Back to Draft PR:
|
|
Restrict the test to the working backends
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: think about k-caching, double-check that off-center write is taken into account for extent
Rename connector for better tracking in SDFG var_offset_fields -> offset_in_K_fields
|
cscs-ci run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! looks good.
cscs-ci run |
Summary of what I did so far:
|
Back at this:
|
Poke @havogt :
I think I don't want to fix CUDA < 12 for |
Adapt backend_name to `run` on frontend
Can't reproduce the |
@havogt Can you cscs-run again, the ci died on a TIME LIMIT |
cscs-ci run |
Description
Looking at enabling offset write in K to help with physics.
Write is allowed on
FORWARD
andBACKWARD
, disallowed forPARALLEL
.TODO:
conditional
extend
calculationdace:X
backendsLink to #131
Discussion happened on GridTools concept
Requirements