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

build[next]: switch dace version to main branch from git repo #1835

Merged
merged 36 commits into from
Feb 5, 2025

Conversation

edopao
Copy link
Contributor

@edopao edopao commented Jan 29, 2025

Change version of dace dependency in gt4py-next to the main branch of the dace git repository. The version used in gt4py-cartesian remains as before, dace v1.0.1 from the v1/maintenance branch.

This PR includes some changes that were needed to comply with the new API of latest dace:

  • update usage of ConditionalBlock and LoopRegion
  • update SDFG transformations
  • workaround to deal with changes to CFG-tree in SDFG pattern matching

noxfile.py Outdated Show resolved Hide resolved
@egparedes egparedes mentioned this pull request Jan 30, 2025
2 tasks
edopao and others added 14 commits February 3, 2025 07:47
The main issue with the change to DaCe main is that now hierarchical control flow blocks are used.
Although we do not (yet) generate them simplify might create them.
It started in the `DistributedBufferRelocator` which used the `AccessSets` analysis pass.
Which now had become unusable, because it merges all accesses in a hierarchical block together.
So we switched to the `AccessStates` pass, but now we have to scan the states.

However, the main issue was the `is_accessed_downstream()`, because we can no longer simply explore the state machine, we now depend on the `ReachableStates` pass.
The downside is that this changed the meaning of the `states_to_ignore`.
For now we will life with that but we have to address that in the future.
@edopao edopao marked this pull request as ready for review February 4, 2025 14:46
The main important changes are:
- I added some instance checkes (just to make sure that we do the right thing) that the type checker can never verify.
- I also removed most of the accesses to `_pipeline_results` with regards to `StateReachability` as I realized that it was not working anyway.
	Instead I turned them into TODOs that we must address at some point.
	However, I think they are not so pressing because our state machines are usually quite small.
Copy link
Contributor

@philip-paul-mueller philip-paul-mueller left a comment

Choose a reason for hiding this comment

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

For me it looks good, but I would like to sync with you before, to ask some questions to assess everything.
However, since a lot of changes inside the optimizer were done by me I am not sure if I am the best to review them.
As a side note, most of them are hot fixes and we should fix them, but doing it the proper way would result in several PRs.

Copy link
Contributor Author

@edopao edopao left a comment

Choose a reason for hiding this comment

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

@philip-paul-mueller Only some minor comments.

prevously_seen_data.add(access_node.data)

# Now we are collecting all symbols that interstate edges read from.
if not data.desc(sdfg).transient:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not understand, these checks are already made outside by the caller.

Copy link
Contributor

Choose a reason for hiding this comment

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

They are supposed to handle the case if the function was used on its own, as it should still reprot a correct result.

@edopao
Copy link
Contributor Author

edopao commented Feb 5, 2025

LGTM

Copy link
Contributor

@philip-paul-mueller philip-paul-mueller left a comment

Choose a reason for hiding this comment

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

LGTM

prevously_seen_data.add(access_node.data)

# Now we are collecting all symbols that interstate edges read from.
if not data.desc(sdfg).transient:
Copy link
Contributor

Choose a reason for hiding this comment

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

They are supposed to handle the case if the function was used on its own, as it should still reprot a correct result.

@edopao edopao merged commit 14d18b3 into GridTools:main Feb 5, 2025
31 checks passed
@edopao edopao deleted the dace-main branch February 5, 2025 15:14
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.

3 participants