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]: as_offset implementation in embedded #1397

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5b6b8b7
as_offset implementation in embedded
nfarabullini Dec 13, 2023
81c0141
Merge branch 'main' into as_offset_embedded
nfarabullini Dec 13, 2023
1acb1d8
edit to exclusion_matrices
nfarabullini Dec 13, 2023
b94e81c
edit to exclusion_matrices
nfarabullini Dec 13, 2023
f815712
resolved some pre-commit errors
nfarabullini Dec 13, 2023
67f8117
resolved some pre-commit errors
nfarabullini Dec 13, 2023
e17ff41
implemented EXPERIMENTAL_FUN_BUILTIN_NAMES
nfarabullini Dec 14, 2023
0e61be2
edits for as_offset
nfarabullini Jan 4, 2024
0219e72
additional cleanup
nfarabullini Jan 4, 2024
762d7eb
additional cleanup
nfarabullini Jan 4, 2024
fa1c588
reverted a couple of edits
nfarabullini Jan 4, 2024
38c052c
ran pre-commit
nfarabullini Jan 4, 2024
e8d6e5e
edit to test
nfarabullini Jan 4, 2024
782375b
edit for md dimensional field
nfarabullini Jan 5, 2024
654b14d
replaced connectivity with restricted
nfarabullini Jan 5, 2024
186b81d
edit to as_offset in experimental
nfarabullini Jan 5, 2024
e50eb64
small clenaup
nfarabullini Jan 5, 2024
09a4c44
updated code to checked vars
nfarabullini Jan 5, 2024
9f2bcc6
ran pre-commit
nfarabullini Jan 5, 2024
90f6796
removed [0][0] indexing
nfarabullini Jan 5, 2024
b19ba78
edits for tests and others for as_offset
nfarabullini Jan 9, 2024
c5464f3
edits to test
nfarabullini Jan 15, 2024
7c3e9cb
ran pre-commit
nfarabullini Jan 15, 2024
2ea83f1
edits
nfarabullini Jan 15, 2024
6387049
edits for other offsets
nfarabullini Jan 15, 2024
1e892b4
changes to path
nfarabullini Jan 15, 2024
2f3d9f6
edit for dace backend
nfarabullini Jan 16, 2024
b941b92
update with main
nfarabullini Jan 16, 2024
81fc838
trout attempt for fieldoffset in cache
nfarabullini Jan 16, 2024
7261ae7
edit suggested by Edoardo
nfarabullini Jan 16, 2024
ba1a91f
edit to offset_invariants
nfarabullini Jan 16, 2024
e074b10
edits following Hannes' review
nfarabullini Jan 17, 2024
ea7f20f
ran pre-commit
nfarabullini Jan 17, 2024
c483a0f
commented test out
nfarabullini Jan 18, 2024
b363cc2
placed test back
nfarabullini Jan 18, 2024
391508b
edit to failing test
nfarabullini Jan 18, 2024
c668dc8
Update tests/next_tests/integration_tests/feature_tests/ffront_tests/…
nfarabullini Jan 18, 2024
83a4b38
Merge branch 'main' of https://github.com/nfarabullini/gt4py into as_…
nfarabullini Jan 18, 2024
7e26c20
edits to dimensions refactoring
nfarabullini Jan 22, 2024
8bc6725
minor cleanup
nfarabullini Jan 22, 2024
e3e8db8
edit to test
nfarabullini Jan 23, 2024
5b6e553
Merge branch 'ruff-config' into as_offset_embedded
egparedes Mar 4, 2024
dacc6d5
Merge new style lint config
egparedes Mar 4, 2024
34fdeb7
Merge branch 'ruff-config' into as_offset_embedded
egparedes Mar 4, 2024
84abf3d
Recover deleted pieces after merging with main
egparedes Mar 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor cleanup
  • Loading branch information
nfarabullini committed Jan 22, 2024
commit 8bc6725c831153f881f6da09bab8299e382d6831
6 changes: 3 additions & 3 deletions src/gt4py/next/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,11 +498,11 @@ def replace(self, index: int | Dimension, *named_ranges: NamedRange) -> Domain:
)
if index < 0:
index += len(self.dims)
new_dims, _ = zip(*named_ranges) if len(named_ranges) > 0 else ((), ())
dims = self.dims[:index] + new_dims + self.dims[index + 1 :]

ranges_dict = dict(named_ranges)
dims = self.dims[:index] + tuple(ranges_dict.keys()) + self.dims[index + 1 :]
# remove duplicate dims
unique_dims = dict.fromkeys(dims)
ranges_dict = dict(named_ranges)
# extract ranges in equivalent order as unique_dims from either named_ranges or self.ranges
ranges = map(
lambda r: ranges_dict[r] if r in ranges_dict else self.ranges[self.dims.index(r)],
Expand Down