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

progam.sdfg Does Not Lead to Reproducibility #1947

Open
philip-paul-mueller opened this issue Feb 21, 2025 · 0 comments
Open

progam.sdfg Does Not Lead to Reproducibility #1947

philip-paul-mueller opened this issue Feb 21, 2025 · 0 comments

Comments

@philip-paul-mueller
Copy link
Collaborator

When DaCe generates the code for an SDFG it also creates the program.sdfg file which is the SDFG that was actually compiled.
This is not the SDFG on which .compile() was called, but one that further transformed (such as CopyToMap or the expansion of library node).
However, for some SDFG it was noticed that this does not lead to the same code (this only refers to the .cu file).
Consider the following:

sdfg1 = make_sdfg()
sdfg1.name = "my_sdfg1"
csdfg1 = sdfg1.compile()

# Now load the SDFG from the folder
sdfg2 = dace.SDFG.from_file(".dacecache/my_sdfg1/program.sdfg")
sdfg2.name = "my_sdfg2"
csdfg2 = sdfg2.compile()

We would now expect that the two folders .dacecache/my_sdfg1/src/cuda/ and .dacecache/my_sdfg2/src/cuda/ contains the same code, beside the changes due to the renaming from my_sdfg1 to my_sdfg2.

However, we currently have an SDFG for which this is not true.
The code, especially the order is significantly different for the two version, see attached files.

However, if we would now do the same with sdfg2, i.e. if we would construct sdfg3 = dace.SDFG.from_file(".dacecache/my_sdfg2/program.sdfg") then we would get a stable behaviour.

sdfg_compile_instability.tar.gz

I am not 100% sure, but I am pretty sure that there is no relation to issue #1946

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

No branches or pull requests

1 participant