-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cannot clone_in() two different functions. #6476
Comments
I kinda think that the second Line 1954 in fb305fd
which goes to this line in Line 358 in fb305fd
Copying over the wrapper schedule inserted by: Lines 980 to 991 in fb305fd
Called from: Lines 1977 to 1988 in fb305fd
|
I don't understand why a (Although, me not understand why, might be due to the fact that I don't know what the purpose of the registering is whatsoever. It just seems odd that a deep copy of a function still has a reference/connection/link to the original function.) |
I think it's more that the list of wrappers is also used to store the list of clones. When lowering, consumers should call the appropriate clone instead of the original Func. If your diagnosis is correct, then using the schedule of the first wrapper definitely seems like the wrong thing. |
As extra info: the use case is to preload two buffers (length n and k) into shared memory of GPU that will do computations on the outer product of those two buffers (yielding a function with Currently I just duplicated the "outer product" function just 3 times. One instance per call site. |
Gives:
Stack trace, right before assertion:
Analyzing which one of the two
clone_in()
s it is:Reveals that it's the second
clone_in()
call, i.e.: the one onoutput2
, yet the error message is talking aboutintermediate_clone_in_output1
(noticeoutput1
!). So it seems that the first call toclone_in(output1)
seems to changeintermediate
globally, instead of only in the context ofoutput1
.The text was updated successfully, but these errors were encountered: