-
Notifications
You must be signed in to change notification settings - Fork 130
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
issue a warning when to_sdfg() ignores auto_optimize flag #1380
Comments
Hi, thanks for the bug report, good catch 👍 |
I will take care of this, as my first assignment. |
I am not fully sure if it is a bug or just unexpected behaviour. I see two solutions for this:
In my opinion we should adopt the second option, since it is intuitive. I will soon^{(R)} made a suggestion. |
However, what should the |
There isn't a bug here, however, the workflow is unclear and inconsistent. The decorator's My suggestion would be to (1) write down what exactly happens with all the different ways leading to a CompiledSDFG (including having a nested SDFG, perhaps by calling another DaCeProgram), (2) discuss in the DaCe weekly meeting whether these workflows need amendments, and (3) update the documentation to provide clarifications to the users. |
After looking a bit in the issue I think the best thing we could do is output a warning as it was originally suggested by @rohanrayan. But I will bring this up at the next meeting. |
As it was discussed the ignoring of the `auto_optimize` flag in `to_sdfg()` is intentional. To make it clear to the user the function now issues a warning in this case.
…#1380). (#1395) As it was discussed the ignoring of the `auto_optimize` flag in `to_sdfg()` is intentional. To make it clear to the user the function now issues a warning in this case. --------- Co-authored-by: Philip Mueller, KY <philip.paul.mueller@bluemail.ch> Co-authored-by: Tal Ben-Nun <tbennun@users.noreply.github.com>
Describe the bug
dace to issue a warning when to_sdfg() ignores the auto_optimize flag
To Reproduce
I am not sure if this is a bug or a misunderstanding from my part, I have tested this on v0.14.4 of dace.
I have a simple function below:
@dace.program(auto_optimize=True)
def madd(A, B, m, n):
for i in range(0, m):
for j in range(0, n):
A[i][j] += B[i][j]
return A
I define example numpy matrices as follows:
m = 200
n = 250
vA = np.random.rand(m, n)
vB = np.random.rand(m, n)
When I try to generate the SDFG using the following commands:
madd_dace_sdfg = madd.to_sdfg(vA, vB, m, n)
madd_dace_compiled = madd_dace_sdfg.compile()
I see that the auto_optimize flag for the function gets ignored i.e. it produces the same graph regardless of whether the auto_optimize flag is set to True or False.
On the other hand, if I generate the graph using the following command (without going through the intermediate to_sdfg():
madd_dace_compiled = madd.compile(vA, vB, m, n)
I see that the graph changes based on the auto_optimize flag.
Is there something I am missing?
Thanks in advance!
The text was updated successfully, but these errors were encountered: