# [GT4Py] ITIR pass for field domain offsets ###### tags: `cycle 18` <!-- Change to the current cycle number --> - Shaped by: Edoardo - Appetite (FTEs, weeks): 2 - Developers: <!-- Filled in at the betting table unless someone is specifically required here --> ## Problem <!-- The raw idea, a use case, or something we’ve seen that motivates us to work on this --> The ITIR pass for elimination of lifts by inserting temporaries (`LiftMode.FORCE_TEMPORARIES`) will create some temporary fields. The domain of temporaries is defined based on the access pattern in the program closure, so the index range in each dimension does not necessarily start from zero. In order to translate GT4Py temporaries to DaCe transient arrays, an initial approach was to use array offsets in DaCe to define the value of start index. However, array offsets have been deprecated in DaCe, because offsets are difficult to translate across nested-SDFG boundaries, and therefore error-prone during SDFG transformation. ## Appetite <!-- Explain how much time we want to spend and how that constrains the solution --> No matter who is assigned to this task, some form of support from Till is probably needed, because he implemented the ITIR temporary pass. ## Solution <!-- The core elements we came up with, presented in a form that’s easy for people to immediately understand --> The proposal is to implement an ITIR pass that will normalize all field accesses to 0-based index range, se we can eliminate array offsets. ## Rabbit holes <!-- Details about the solution worth calling out to avoid problems --> ## No-gos <!-- Anything specifically excluded from the concept: functionality or use cases we intentionally aren’t covering to fit the ## appetite or make the problem tractable -->