-
Notifications
You must be signed in to change notification settings - Fork 873
[CPU] Incorrect results depending on native_vector_size for fusion of 2 generics. #23952
Copy link
Copy link
Open
llvm/llvm-project
#189477Labels
bug 🐞Something isn't workingSomething isn't workingcodegen/llvmLLVM code generation compiler backendLLVM code generation compiler backend
Description
See attached reproduction. Unzip, cd into that directory and run ./repro.sh
repro.sh is just compiling, running, and print the number of NaNs. The expected result is 0 (even though NaNs occur as intermediate results, they should not occur in the final outputs). The actual value is 311. If you edit the testcase to change native_vector_size from 32 to 64, then the printed value changes from 311 to 0, which confirms that there is a bug: the outputs should not depend on the value of native_vector_size.
This testcase is already minimal in the following sense:
- The source has to be post Flow. If we just make the source be pure linalg, it doesn't reproduce anymore, presumably because it is essential to have one dispatch fusing the two generics here.
- If we try pre-evaluating the first generic (reduction) and feeding its output to just the second generic, this stops reproducing too. Again, this seems to show that the problem is specifically about the fusion.
- The testcase also stops reproducing if I try removing any of the remaining ops in the second generic.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug 🐞Something isn't workingSomething isn't workingcodegen/llvmLLVM code generation compiler backendLLVM code generation compiler backend