Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump LLVM #958

Merged
merged 1 commit into from
Jun 23, 2022
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 @@ -11,18 +11,18 @@ add_mlir_library(TorchMLIRTMTensorDialect
TorchMLIRTMTensorOpsIncGen

LINK_LIBS PUBLIC
MLIRAffine
MLIRAffineDialect
MLIRDialectUtils
MLIRIR
MLIRLinalg
MLIRMath
MLIRMemRef
MLIRLinalgDialect
MLIRMathDialect
MLIRMemRefDialect
MLIRPass
MLIRSideEffectInterfaces
MLIRSupport
MLIRSCF
MLIRFunc
MLIRTensor
MLIRSCFDialect
MLIRFuncDialect
MLIRTensorDialect
MLIRViewLikeInterface
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Math/IR/Math.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Utils/StructuredOpsUtils.h"
#include "mlir/IR/Attributes.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ add_mlir_library(TorchMLIRTMTensorPasses

LINK_LIBS PUBLIC
TorchMLIRTMTensorDialect
MLIRAffine
MLIRAffineDialect
MLIRIR
MLIRLinalg
MLIRLinalgDialect
MLIRLinalgTransforms
MLIRMath
MLIRMemRef
MLIRMathDialect
MLIRMemRefDialect
MLIRPass
MLIRSCF
MLIRFunc
MLIRSCFDialect
MLIRFuncDialect
MLIRSupport
MLIRTensor
MLIRTensorDialect
MLIRTransforms
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Math/IR/Math.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Pass/Pass.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
set(LIBS
MLIRArithmetic
MLIRArithmeticDialect
MLIRDialect
MLIRLinalg
MLIRMemRef
MLIRLinalgDialect
MLIRMemRefDialect
MLIROptLib
MLIRSCF
MLIRSCFDialect
MLIRSCFTransforms
MLIRFunc
MLIRTensor
MLIRFuncDialect
MLIRTensorDialect
MLIRTransforms
TorchMLIRTMTensorDialect
TorchMLIRTMTensorPasses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/SCF/Passes.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/Transforms/Passes.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/AsmState.h"
#include "mlir/IR/Dialect.h"
Expand Down
2 changes: 1 addition & 1 deletion externals/llvm-project
Submodule llvm-project updated 13832 files
4 changes: 2 additions & 2 deletions lib/Conversion/TorchToLinalg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ add_mlir_conversion_library(TorchMLIRTorchToLinalg
LINK_LIBS PUBLIC
MLIRIR
MLIRPass
MLIRLinalg
MLIRMath
MLIRLinalgDialect
MLIRMathDialect
TorchMLIRTorchDialect
)

Expand Down
4 changes: 2 additions & 2 deletions lib/Conversion/TorchToSCF/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ add_mlir_conversion_library(TorchMLIRTorchToSCF
LINK_LIBS PUBLIC
MLIRIR
MLIRPass
MLIRSCF
MLIRFunc
MLIRSCFDialect
MLIRFuncDialect
TorchMLIRTorchDialect
TorchMLIRTorchConversionDialect
)
Expand Down
2 changes: 1 addition & 1 deletion lib/Conversion/TorchToSCF/TorchToSCF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "../PassDetail.h"
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/Transforms/DialectConversion.h"
#include "torch-mlir/Dialect/Torch/IR/TorchDialect.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/Conversion/TorchToStd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ add_mlir_conversion_library(TorchMLIRTorchToStd
LINK_LIBS PUBLIC
MLIRIR
MLIRPass
MLIRFunc
MLIRFuncDialect
TorchMLIRTorchDialect
)

Expand Down
4 changes: 2 additions & 2 deletions lib/Conversion/TorchToTMTensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ TorchToTMTensor.cpp
LINK_LIBS PUBLIC
MLIRIR
MLIRPass
MLIRLinalg
MLIRMath
MLIRLinalgDialect
MLIRMathDialect
TorchMLIRTorchDialect
TorchMLIRTMTensorDialect
)
Expand Down
2 changes: 1 addition & 1 deletion lib/Conversion/TorchToTosa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ add_mlir_conversion_library(TorchMLIRTorchToTosa
LINK_LIBS PUBLIC
MLIRIR
MLIRPass
MLIRTosa
MLIRTosaDialect
TorchMLIRTorchDialect
)

Expand Down
4 changes: 2 additions & 2 deletions lib/Dialect/Torch/IR/TorchOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ LogicalResult ClassTypeOp::verify() {
// PrimLoopOp
//===----------------------------------------------------------------------===//

OperandRange PrimLoopOp::getSuccessorEntryOperands(unsigned index) {
assert(index == 0);
OperandRange PrimLoopOp::getSuccessorEntryOperands(Optional<unsigned int> index) {
assert(index.hasValue() && index.value() == 0);
makslevental marked this conversation as resolved.
Show resolved Hide resolved
return iterArgsInit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/Math/IR/Math.h"
#include "mlir/Dialect/SCF/SCF.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/Transforms/DialectConversion.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def invoke(*args):
# Bufferize.
"func.func(scf-bufferize)",
"func.func(tm-tensor-bufferize)",
"func.func(linalg-init-tensor-to-alloc-tensor)",
"func.func(linalg-bufferize)",
"func-bufferize",
"arith-bufferize",
Expand Down
8 changes: 4 additions & 4 deletions test/Dialect/Torch/canonicalize.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// CHECK-LABEL: func.func @torch.aten.__range_length$fold() -> (!torch.int, !torch.int, !torch.int, !torch.int) {
// CHECK: %[[INT1:.*]] = torch.constant.int 1
// CHECK: %[[INT2:.*]] = torch.constant.int 2
// CHECK: %[[INTM1:.*]] = torch.constant.int -1
// CHECK: %[[INT3:.*]] = torch.constant.int 3
// CHECK: %[[INTM1:.*]] = torch.constant.int -1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure what would lead to an inversion in the ordering here but don't think it's significant.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happens from time to time as the pattern rewriters change under the hood

// CHECK: %[[NEG_STEP:.*]] = torch.aten.__range_length %[[INT1]], %[[INT3]], %[[INTM1]] : !torch.int, !torch.int, !torch.int -> !torch.int
// CHECK: return %[[INT2]], %[[INT2]], %[[INT1]], %[[NEG_STEP]] : !torch.int, !torch.int, !torch.int, !torch.int
func.func @torch.aten.__range_length$fold() -> (!torch.int, !torch.int, !torch.int, !torch.int) {
Expand Down Expand Up @@ -559,8 +559,8 @@ func.func @torch.aten.__getitem__.t() -> !torch.int {

// Not canonicalized because of passed in index
// CHECK-LABEL: func.func @torch.aten.__getitem__.t$no_change_test0(
// CHECK: %[[C4:.*]] = torch.constant.int 4
// CHECK: %[[C5:.*]] = torch.constant.int 5
// CHECK: %[[C4:.*]] = torch.constant.int 4
// CHECK: %[[LIST:.*]] = torch.prim.ListConstruct %[[C4]], %[[C5]] : (!torch.int, !torch.int) -> !torch.list<int>
// CHECK: %[[ITEM:.*]] = torch.aten.__getitem__.t %[[LIST]], %arg0 : !torch.list<int>, !torch.int -> !torch.int
// CHECK: return %[[ITEM]] : !torch.int
Expand Down Expand Up @@ -673,8 +673,8 @@ func.func @torch.constant.none$constantlike() -> (!torch.none, !torch.none) {
}

// CHECK-LABEL: func.func @torch.constant.str$constantlike() -> (!torch.str, !torch.str, !torch.str) {
// CHECK: %[[T:.*]] = torch.constant.str "t"
// CHECK: %[[S:.*]] = torch.constant.str "s"
// CHECK: %[[T:.*]] = torch.constant.str "t"
// CHECK: return %[[S]], %[[S]], %[[T]] : !torch.str, !torch.str, !torch.str
func.func @torch.constant.str$constantlike() -> (!torch.str, !torch.str, !torch.str) {
%0 = torch.constant.str "s"
Expand All @@ -684,8 +684,8 @@ func.func @torch.constant.str$constantlike() -> (!torch.str, !torch.str, !torch.
}

// CHECK-LABEL: func.func @torch.constant.bool$constantlike() -> (!torch.bool, !torch.bool, !torch.bool) {
// CHECK: %[[F:.*]] = torch.constant.bool false
// CHECK: %[[T:.*]] = torch.constant.bool true
// CHECK: %[[F:.*]] = torch.constant.bool false
// CHECK: return %[[T]], %[[T]], %[[F]] : !torch.bool, !torch.bool, !torch.bool
func.func @torch.constant.bool$constantlike() -> (!torch.bool, !torch.bool, !torch.bool) {
%0 = torch.constant.bool true
Expand Down