[CPU] Populate to_elements unrolling patterns in LLVM conversion.#22010
[CPU] Populate to_elements unrolling patterns in LLVM conversion.#22010hanhanW merged 4 commits intoiree-org:mainfrom
Conversation
It is a follow-up to iree-org#21851. The CPU backend also needs the patterns, which is not surprising. It was not detected in the first place because a test did not exist. It only happens in dynamic gather+attention cases. The test is failing on VMVX and SPIR-V backend. AMDGPU does not have a test suite, but it can compile the program. Thus, the test is only added to CPU for now. Signed-off-by: hanhanW <hanhan0912@gmail.com>
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Signed-off-by: hanhanW <hanhan0912@gmail.com>
Signed-off-by: hanhanW <hanhan0912@gmail.com>
There was a problem hiding this comment.
Should we also add it to
compiler/src/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp
index 8636d514a7..6bc6e27b5f 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp
@@ -105,6 +105,7 @@ struct ConvertToNVVMPass final
vector::populateVectorGatherLoweringPatterns(patterns);
vector::populateVectorMaskOpLoweringPatterns(patterns);
vector::populateVectorFromElementsLoweringPatterns(patterns);
+ vector::populateVectorToElementsLoweringPatterns(patterns);
// We currently always use 64 bit indices, thus ensure the bit width of
// the mask compare is consistent.
vector::populateVectorMaskMaterializationPatterns(
hmm, that is a mess and in maintenance mode; I don't really want to touch the code if not needed. I even don't know if we have CI for NVGPU or not. A solution may be having a utility that populates all the vector unrolling patterns, but I can see that the backend can diverge at some point. People should revamp the NVGPU codegen if they care about it. Adding new code to those non-active passes may be tech debt; nobody cares. (If someone cares, they'd raise a PR like this or file an issue.) |
|
@hanhanW thanks for the answer! No worries, I was just double checking in case it was necessary :) |
No worries, thanks for asking! I'm happy to share my understanding with reviewers and developers. |
…ee-org#22010) It is a follow-up to iree-org#21851. The CPU backend also needs the patterns, which is not surprising. It was not detected in the first place because a test did not exist. It only happens in dynamic gather+attention cases. The test is failing on VMVX and SPIR-V backend. Thus, the test is only added to CPU and hip for now. Fixes iree-org#22007 --------- Signed-off-by: hanhanW <hanhan0912@gmail.com>
It is a follow-up to #21851. The CPU backend also needs the patterns, which is not surprising. It was not detected in the first place because a test did not exist. It only happens in dynamic gather+attention cases.
The test is failing on VMVX and SPIR-V backend. Thus, the test is only added to CPU and hip for now.
Fixes #22007