Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ struct EmulateNarrowTypePass final
}

RewritePatternSet sinkBroadcast(ctx);
vector::populateSinkVectorBroadcastPatterns(sinkBroadcast);
vector::populateSinkVectorOpsPatterns(sinkBroadcast);
if (failed(applyPatternsAndFoldGreedily(getOperation(),
std::move(sinkBroadcast)))) {
getOperation()->emitOpError("failed in sinking of broadcasts");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ void GenericVectorizationPass::runOnOperation() {
vector::populateVectorTransferPermutationMapLoweringPatterns(
vectorizationPatterns);
vector::populateVectorReductionToContractPatterns(vectorizationPatterns);
vector::populateSinkVectorOpsPatterns(vectorizationPatterns);
}
if (foldCastIntoContract) {
vector::populateFoldArithExtensionPatterns(vectorizationPatterns);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ struct ConvertToNVVMPass final
LLVM::RoundEvenOp, LLVM::RoundOp, LLVM::SinOp, LLVM::SqrtOp>();

// TODO: Remove once we support replacing non-root ops.
target.addLegalOp<gpu::YieldOp, gpu::GPUModuleOp, gpu::ModuleEndOp>();
target.addLegalOp<gpu::YieldOp, gpu::GPUModuleOp>();

if (failed(applyPartialConversion(m, target, std::move(llvmPatterns)))) {
signalPassFailure();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class LLVMGPUTensorCoreVectorizationPass final
vector::populateVectorTransferPermutationMapLoweringPatterns(
contractionPatterns);
vector::populateVectorReductionToContractPatterns(contractionPatterns);
vector::populateSinkVectorOpsPatterns(contractionPatterns);
if (failed(applyPatternsAndFoldGreedily(
funcOp, std::move(contractionPatterns)))) {
return signalPassFailure();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ class SPIRVInitialLoweringPass final
// cancel them or embed into contract ops. Embedding in the flexible
// contract ops will help to sustain the structure through various
// transformations.
vector::populateSinkVectorOpsPatterns(patterns);
vector::populateVectorReductionToContractPatterns(patterns);
// Pull in patterns to canonicalize transfer ops.
vector::populateVectorTransferPermutationMapLoweringPatterns(patterns);
Expand Down
1 change: 1 addition & 0 deletions compiler/src/iree/compiler/Tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ iree_compiler_cc_library(
"@llvm-project//mlir:GPUTransforms",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:LLVMDialect",
"@llvm-project//mlir:LLVMIRTransforms",
"@llvm-project//mlir:LinalgDialect",
"@llvm-project//mlir:LinalgPassIncGen",
"@llvm-project//mlir:LinalgTransforms",
Expand Down
1 change: 1 addition & 0 deletions compiler/src/iree/compiler/Tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ iree_cc_library(
MLIRGPUToSPIRV
MLIRIR
MLIRLLVMDialect
MLIRLLVMIRTransforms
MLIRLinalgDialect
MLIRLinalgTransforms
MLIRMLProgramDialect
Expand Down
2 changes: 2 additions & 0 deletions compiler/src/iree/compiler/Tools/init_mlir_dialects.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "mlir/Dialect/GPU/IR/GPUDialect.h"
#include "mlir/Dialect/GPU/TransformOps/GPUTransformOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/TransformOps/DialectExtension.h"
#include "mlir/Dialect/MLProgram/IR/MLProgram.h"
Expand Down Expand Up @@ -94,6 +95,7 @@ inline void registerMlirDialects(DialectRegistry &registry) {
// clang-format on
cf::registerBufferizableOpInterfaceExternalModels(registry);
func::registerInlinerExtension(registry);
LLVM::registerInlinerInterface(registry);
tensor::registerInferTypeOpInterfaceExternalModels(registry);
tensor::registerTilingInterfaceExternalModels(registry);

Expand Down
2 changes: 2 additions & 0 deletions llvm-external-projects/iree-dialects/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ cc_binary(
"@llvm-project//mlir:FuncExtensions",
"@llvm-project//mlir:FunctionInterfaces",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:LLVMDialect",
"@llvm-project//mlir:LLVMIRTransforms",
"@llvm-project//mlir:LinalgDialect",
"@llvm-project//mlir:LinalgTransformOps",
"@llvm-project//mlir:LinalgTransforms",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ set(LIBS
MLIRFuncDialect
MLIRFuncInlinerExtension
MLIRIndexToLLVM
MLIRLLVMDialect
MLIRLLVMIRTransforms
MLIRLinalgDialect
MLIRLinalgTransformOps
MLIRMemRefDialect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
#include "mlir/Dialect/Func/Extensions/InlinerExtension.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Linalg/TransformOps/DialectExtension.h"
#include "mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.h"
Expand Down Expand Up @@ -74,6 +75,7 @@ int main(int argc, char **argv) {

// External models.
mlir::func::registerInlinerExtension(registry);
mlir::LLVM::registerInlinerInterface(registry);
mlir::linalg::registerTilingInterfaceExternalModels(registry);

registry.addExtensions<transform_ext::StructuredTransformOpsExtension>();
Expand Down
2 changes: 1 addition & 1 deletion third_party/llvm-project
Submodule llvm-project updated 1585 files