Skip to content

feat[cartesian]: All data dimensions field RHS access needs to be fully defined#2555

Open
FlorianDeconinck wants to merge 3 commits intoGridTools:mainfrom
FlorianDeconinck:feature/ddims_force_full_indexation
Open

feat[cartesian]: All data dimensions field RHS access needs to be fully defined#2555
FlorianDeconinck wants to merge 3 commits intoGridTools:mainfrom
FlorianDeconinck:feature/ddims_force_full_indexation

Conversation

@FlorianDeconinck
Copy link
Copy Markdown
Contributor

@FlorianDeconinck FlorianDeconinck commented Mar 26, 2026

Description

Data dimensions fields can be partially indexed on the LHS and should always be fully defined RHS. Some code path leads to error on the RHS being caught way down in the backends.

We introduced a single behavior of require full indexation for every data field, either with the double subscript F[0, 0, 0][x, y] or via the global indexer F.A[x.y].

Implementation:

  • Add unit tests to test forbidden not full indexation of data dimensions
  • Add a DataDimensionsChecker after the UnrollVectorAssignement

Also:

  • Protect the visit_subscript of DefinitionIR parsing against unexpected nodes sub-scripted

BEFORE MERGE:

  • ADR modifications ?

Requirements

  • All fixes and/or new features come with corresponding tests.
  • Important design decisions have been documented in the appropriate ADR inside the docs/development/ADRs/ folder.

Add unit tests to test forbidden not full indexation of data dimensions
Copy link
Copy Markdown
Contributor

@romanc romanc left a comment

Choose a reason for hiding this comment

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

Looks good to me. Can temporaries have data dimensions? If so, we should pass temp_decls too such that we don't miss checking them.

@FlorianDeconinck
Copy link
Copy Markdown
Contributor Author

Looks good to me. Can temporaries have data dimensions? If so, we should pass temp_decls too such that we don't miss checking them.

I'll check them - good catch

@FlorianDeconinck
Copy link
Copy Markdown
Contributor Author

cscs-ci run

@FlorianDeconinck FlorianDeconinck marked this pull request as ready for review March 27, 2026 19:02
@FlorianDeconinck FlorianDeconinck changed the title feat[cartesian]: All data dimensions field access needs to be fully defined feat[cartesian]: All data dimensions field RHS access needs to be fully defined Mar 27, 2026
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