Closed miladm closed 2 years ago
I suspect the error is arising from the the use of toSymbolicIntNode()
in LazyNativeFunctions::narrow_copy_symint()
, as it is the only location where there is not a check of whether or not the node is symbolic.
Here is the code snippet that produces the error.
@Gamrix are you referring to this this code?
IIUC, you think we are missing a check to determine if a node is symbolic; though the error message suggests the check is done with an incorrect return output. How would a missing check help?
Curious to hear your guidance.
This issue has been addressed by adding the following logic to SymIntElements::SetSymIntNodeElements()
in torch_util.cpp
:
if size->is_symbolic() {
// Handle Symbolic Int
}
else {
// create an IR node representing a constant for concrete int
}
Closing.
In running
TestExpandSymInt
(ref PR, I run into the following error. The error suggestsis_symbolic
returns an incorrect value when callingtoSymbolicIntNode()
method. This seems to suggest the upstream API call needs investigation. @Gamrix wdyt?FWIW,
TestExpand
runs successfully as expected.CC @Krovatkin