Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
raikonenfnu authored Dec 18, 2024
1 parent ce65948 commit 3614f69
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
5 changes: 5 additions & 0 deletions compiler/src/iree/compiler/Codegen/LLVMCPU/ConvertToLLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,13 @@ void ConvertToLLVMPass::runOnOperation() {
// unroll them to 1-D before converting to the LLVM dialect.
vector::populateVectorBitCastLoweringPatterns(patterns);
populateVectorToLLVMMatrixConversionPatterns(typeConverter, patterns);
vector::populateVectorRankReducingFMAPattern(patterns);
vector::populateVectorInsertExtractStridedSliceTransforms(patterns);
vector::populateVectorStepLoweringPatterns(patterns);
populateVectorToLLVMConversionPatterns(typeConverter, patterns,
reassociateFpReductions);
vector::populateVectorTransferLoweringPatterns(patterns,
/*maxTransferRank=*/1);

if (isAArch64(targetAttr) &&
(hasAnySVEFeature(targetAttr) || hasSMEFeature(targetAttr))) {
Expand Down
6 changes: 6 additions & 0 deletions compiler/src/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "mlir/Dialect/NVGPU/IR/NVGPUDialect.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Dialect/Vector/Transforms/LoweringPatterns.h"
#include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

namespace mlir::iree_compiler {
Expand Down Expand Up @@ -150,7 +151,12 @@ struct ConvertToNVVMPass final
cf::populateControlFlowToLLVMConversionPatterns(converter, llvmPatterns);
arith::populateCeilFloorDivExpandOpsPatterns(llvmPatterns);
arith::populateArithToLLVMConversionPatterns(converter, llvmPatterns);
vector::populateVectorRankReducingFMAPattern(llvmPatterns);
vector::populateVectorInsertExtractStridedSliceTransforms(llvmPatterns);
vector::populateVectorStepLoweringPatterns(llvmPatterns);
populateVectorToLLVMConversionPatterns(converter, llvmPatterns);
vector::populateVectorTransferLoweringPatterns(llvmPatterns,
/*maxTransferRank=*/1);
populateGpuToNVVMConversionPatterns(converter, llvmPatterns);
populateNVGPUToNVVMConversionPatterns(converter, llvmPatterns);
populateGpuWMMAToNVVMConversionPatterns(converter, llvmPatterns);
Expand Down
6 changes: 6 additions & 0 deletions compiler/src/iree/compiler/Codegen/LLVMGPU/ConvertToROCDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "mlir/Dialect/MemRef/Transforms/Transforms.h"
#include "mlir/Dialect/Vector/IR/VectorOps.h"
#include "mlir/Dialect/Vector/Transforms/LoweringPatterns.h"
#include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"

#define DEBUG_TYPE "iree-convert-to-rocdl"
Expand Down Expand Up @@ -221,7 +222,12 @@ struct ConvertToROCDLPass final
FailureOr<amdgpu::Chipset> maybeChipset = amdgpu::Chipset::parse(chipset);
populateAMDGPUToROCDLConversionPatterns(
converter, llvmPatterns, maybeChipset.value_or(amdgpu::Chipset()));
vector::populateVectorRankReducingFMAPattern(llvmPatterns);
vector::populateVectorInsertExtractStridedSliceTransforms(llvmPatterns);
vector::populateVectorStepLoweringPatterns(llvmPatterns);
populateVectorToLLVMConversionPatterns(converter, llvmPatterns);
vector::populateVectorTransferLoweringPatterns(llvmPatterns,
/*maxTransferRank=*/1);
populateGpuToROCDLConversionPatterns(converter, llvmPatterns,
gpu::amd::Runtime::Unknown);
LLVMConversionTarget target(getContext());
Expand Down
2 changes: 1 addition & 1 deletion third_party/llvm-project
Submodule llvm-project updated 489 files

0 comments on commit 3614f69

Please sign in to comment.