-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated llvm version: * Restore old bufferization passes removed from mlir upstream * Fix `ShapeIntegerPropagationPass`: * Upstream `IntegerRangeAnalysys` incorrectly process `SelectOp` in case of uninitialized operands * Correctly propagate tensor output shape from out operand to result * Fix loops without results which incorrectly processed by mlir upstream `IntegerRangeAnalysys` * Update `GPUToLLVMPass` according to updated upstream GPU dialect: * Added `EraseGpuModuleOpPattern` to pass since it was removed from mlir upstream version.
- Loading branch information
1 parent
8373d7b
commit 9392a43
Showing
26 changed files
with
628 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6bbccd2516c3a843809a8303da48abce58a88855 | ||
d58637219463924185614f18911c5f01a1c20aa9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
mlir/include/legacy/Dialect/Arith/Transforms/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-FileCopyrightText: 2023 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
include_directories(${MLIR_INCLUDE_DIRS}) | ||
|
||
set(LLVM_TARGET_DEFINITIONS Passes.td) | ||
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Transforms) | ||
mlir_tablegen(Transforms.capi.h.inc -gen-pass-capi-header --prefix Transforms) | ||
mlir_tablegen(Transforms.capi.cpp.inc -gen-pass-capi-impl --prefix Transforms) | ||
add_public_tablegen_target(MLIRArithLegacyIncGen) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include "mlir/Pass/Pass.h" | ||
|
||
namespace mlir { | ||
namespace arith { | ||
namespace legacy { | ||
/// Create a pass to bufferize arith.constant ops. | ||
std::unique_ptr<Pass> createConstantBufferizePass(uint64_t alignment = 0); | ||
|
||
} // namespace legacy | ||
} // namespace arith | ||
} // namespace mlir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
//===-- Passes.td - Arith pass definition file --------*- tablegen -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#ifndef MLIR_DIALECT_ARITH_TRANSFORMS_LEGACY_PASSES | ||
#define MLIR_DIALECT_ARITH_TRANSFORMS_LEGACY_PASSES | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def ArithBufferizePass : Pass<"arith-bufferize", "ModuleOp"> { | ||
let summary = "Bufferize Arith dialect ops."; | ||
let description = [{ | ||
This pass bufferizes arith dialect ops. | ||
|
||
This pass needs to be a module pass because it inserts memref.global | ||
ops into the module, which cannot be done safely from a function pass due to | ||
multi-threading. Most other bufferization passes can run in parallel at | ||
function granularity. | ||
}]; | ||
let options = [ | ||
Option<"alignment", "alignment", "unsigned", /*default=*/"0", | ||
"Create global memrefs with a specified alignment">, | ||
]; | ||
} | ||
|
||
#endif // MLIR_DIALECT_ARITH_TRANSFORMS_LEGACY_PASSES |
11 changes: 11 additions & 0 deletions
11
mlir/include/legacy/Dialect/Bufferization/Transforms/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-FileCopyrightText: 2023 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
include_directories(${MLIR_INCLUDE_DIRS}) | ||
|
||
set(LLVM_TARGET_DEFINITIONS Passes.td) | ||
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Transforms) | ||
mlir_tablegen(Transforms.capi.h.inc -gen-pass-capi-header --prefix Transforms) | ||
mlir_tablegen(Transforms.capi.cpp.inc -gen-pass-capi-impl --prefix Transforms) | ||
add_public_tablegen_target(MLIRBufferizationLegacyIncGen) |
13 changes: 13 additions & 0 deletions
13
mlir/include/legacy/Dialect/Bufferization/Transforms/Passes.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include "mlir/Pass/Pass.h" | ||
|
||
namespace mlir { | ||
namespace bufferization { | ||
namespace legacy { | ||
/// Create a pass that bufferizes ops from the bufferization dialect. | ||
std::unique_ptr<Pass> createBufferizationBufferizePass(); | ||
|
||
} // namespace legacy | ||
} // namespace bufferization | ||
} // namespace mlir |
18 changes: 18 additions & 0 deletions
18
mlir/include/legacy/Dialect/Bufferization/Transforms/Passes.td
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//===-- Passes.td - Bufferization pass definition file --------*- tablegen -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
#ifndef MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_LEGACY_PASSES | ||
#define MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_LEGACY_PASSES | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def BufferizationBufferize : Pass<"bufferization-bufferize", "func::FuncOp"> { | ||
let summary = "Bufferize the `bufferization` dialect"; | ||
let constructor = "mlir::bufferization::createBufferizationBufferizePass()"; | ||
} | ||
|
||
#endif // MLIR_DIALECT_BUFFERIZATION_TRANSFORMS_LEGACY_PASSES |
11 changes: 11 additions & 0 deletions
11
mlir/include/legacy/Dialect/Linalg/Transforms/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-FileCopyrightText: 2023 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
include_directories(${MLIR_INCLUDE_DIRS}) | ||
|
||
set(LLVM_TARGET_DEFINITIONS Passes.td) | ||
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Transforms) | ||
mlir_tablegen(Transforms.capi.h.inc -gen-pass-capi-header --prefix Transforms) | ||
mlir_tablegen(Transforms.capi.cpp.inc -gen-pass-capi-impl --prefix Transforms) | ||
add_public_tablegen_target(MLIRLinalgLegacyIncGen) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include "mlir/Pass/Pass.h" | ||
|
||
namespace mlir { | ||
namespace linalg { | ||
namespace legacy { | ||
/// Creates an instance of the `linalg` dialect bufferization pass. | ||
std::unique_ptr<Pass> createLinalgBufferizePass(); | ||
|
||
} // namespace legacy | ||
} // namespace linalg | ||
} // namespace mlir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//===-- Passes.td - Linalg pass definition file ------------*- tablegen -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef MLIR_DIALECT_LINALG_LEGACY_PASSES | ||
#define MLIR_DIALECT_LINALG_LEGACY_PASSES | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def LinalgBufferizePass : Pass<"linalg-bufferize"> { | ||
let summary = "Bufferize the linalg dialect"; | ||
let dependentDialects = [ | ||
"affine::AffineDialect", | ||
"bufferization::BufferizationDialect", | ||
"linalg::LinalgDialect", | ||
"memref::MemRefDialect", | ||
]; | ||
} | ||
|
||
#endif // MLIR_DIALECT_LINALG_LEGACY_PASSES |
11 changes: 11 additions & 0 deletions
11
mlir/include/legacy/Dialect/Tensor/Transforms/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-FileCopyrightText: 2023 Intel Corporation | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
include_directories(${MLIR_INCLUDE_DIRS}) | ||
|
||
set(LLVM_TARGET_DEFINITIONS Passes.td) | ||
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Transforms) | ||
mlir_tablegen(Transforms.capi.h.inc -gen-pass-capi-header --prefix Transforms) | ||
mlir_tablegen(Transforms.capi.cpp.inc -gen-pass-capi-impl --prefix Transforms) | ||
add_public_tablegen_target(MLIRTensorLegacyIncGen) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#pragma once | ||
|
||
#include "mlir/Pass/Pass.h" | ||
|
||
namespace mlir { | ||
namespace tensor { | ||
namespace legacy { | ||
/// Creates an instance of the `tensor` dialect bufferization pass. | ||
std::unique_ptr<Pass> createTensorBufferizePass(); | ||
|
||
} // namespace legacy | ||
} // namespace tensor | ||
} // namespace mlir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//===-- Passes.td - pass definition file -------------------*- tablegen -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef MLIR_DIALECT_TENSOR_TRANSFORMS_PASSES | ||
#define MLIR_DIALECT_TENSOR_TRANSFORMS_PASSES | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def TensorBufferize : Pass<"tensor-bufferize", "func::FuncOp"> { | ||
let summary = "Bufferize the `tensor` dialect"; | ||
let constructor = "mlir::tensor::createTensorBufferizePass()"; | ||
} | ||
|
||
#endif // MLIR_DIALECT_TENSOR_TRANSFORMS_PASSES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.