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 to llvm/llvm-project@95d993a #19811

Merged
merged 4 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -96,7 +96,7 @@ struct FlattenMemRefTypeConverter final : public TypeConverter {
addConversion([](MemRefType type) -> std::optional<Type> {
int64_t offset;
SmallVector<int64_t> strides;
if (failed(getStridesAndOffset(type, strides, offset))) {
if (failed(type.getStridesAndOffset(strides, offset))) {
return nullptr;
}
// Since the memref gets linearized, use a stride 1, offset 0.
Expand Down Expand Up @@ -354,7 +354,7 @@ static Value linearizeIndices(Value sourceValue, ValueRange indices,
// dynamic.
SmallVector<int64_t> strides;
int64_t offset;
if (succeeded(getStridesAndOffset(sourceType, strides, offset))) {
if (succeeded(sourceType.getStridesAndOffset(strides, offset))) {
// The memref itself might have an offset, but we should not account for it
// when computing the linearization. The original memref might be
// `memref<?x?xf32, strided<[?, ?], offset: ?>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ MemRefDescriptor HALDispatchABI::loadBinding(Operation *forOp, int64_t ordinal,
// Construct the MemRefDescriptor type based on the information we have.
// NOTE: we could use the binding length to clamp this/check that the
// requested range is valid.
auto [strides, offset] = getStridesAndOffset(memRefType);
auto [strides, offset] = memRefType.getStridesAndOffset();
if (memRefType.hasStaticShape() &&
!llvm::any_of(strides, ShapedType::isDynamic) &&
!ShapedType::isDynamic(offset)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class ConvertIREEBindingSubspanOp : public ConvertToLLVMPattern {
// Add the byte offset.
Value llvmBufferBasePtr = llvmBufferArg;

auto [strides, offset] = getStridesAndOffset(memrefType);
auto [strides, offset] = memrefType.getStridesAndOffset();
if (memrefType.hasStaticShape() &&
!llvm::any_of(strides, ShapedType::isDynamic) &&
!ShapedType::isDynamic(offset)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ bool verifyMemRefInnerDimsContiguousRowMajor(MemRefType type) {
return true;
}

if (failed(mlir::getStridesAndOffset(type, strides, offset))) {
if (failed(type.getStridesAndOffset(strides, offset))) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static Value getByteOffsetForIndices(OpBuilder &builder, Location loc,
}
SmallVector<int64_t> strides;
int64_t offset;
if (failed(getStridesAndOffset(memrefType, strides, offset)) ||
if (failed(memrefType.getStridesAndOffset(strides, offset)) ||
strides[0] != 1) {
emitError(loc, "expected memref stride 1");
return {};
Expand Down
6 changes: 3 additions & 3 deletions compiler/src/iree/compiler/Dialect/Util/IR/UtilOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,12 @@ def Util_AlignOp : Util_PureOp<"align", [
}];

let arguments = (ins
SignlessIntegerLike:$value,
SignlessIntegerLike:$alignment
Index:$value,
Index:$alignment
);

let results = (outs
SignlessIntegerLike:$result
Index:$result
);

let assemblyFormat = [{
Expand Down
2 changes: 1 addition & 1 deletion third_party/llvm-project
Submodule llvm-project updated 3053 files
2 changes: 1 addition & 1 deletion third_party/torch-mlir
Submodule torch-mlir updated 40 files
+2 −2 build_tools/python_deploy/build_linux_packages.sh
+2 −2 docs/development.md
+11 −0 include/torch-mlir/Conversion/TorchToTosa/TosaLegalizeUtils.h
+28 −0 include/torch-mlir/Dialect/Torch/IR/GeneratedTorchOps.td
+45 −4 lib/Conversion/TorchOnnxToTorch/DefaultDomainGtoP.cpp
+44 −23 lib/Conversion/TorchToTosa/TorchToTosa.cpp
+4 −2 lib/Conversion/TorchToTosa/TosaLegalizeCommon.cpp
+77 −13 lib/Conversion/TorchToTosa/TosaLegalizeUtils.cpp
+49 −1 lib/Dialect/TMTensor/Transforms/Bufferize.cpp
+1 −2 lib/Dialect/TMTensor/Transforms/ConvertToLoops.cpp
+48 −0 lib/Dialect/Torch/IR/TorchOps.cpp
+30 −0 lib/Dialect/Torch/Transforms/AbstractInterpLibrary.cpp
+2 −2 lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp
+2 −2 lib/Dialect/Torch/Transforms/FuseQuantizedOps.cpp
+2 −2 lib/Dialect/Torch/Transforms/MatchQuantizedOps.cpp
+1 −1 lib/Dialect/Torch/Transforms/MaximizeValueSemantics.cpp
+2 −3 lib/Dialect/Torch/Transforms/PrepareForGlobalizeObjectGraph.cpp
+2 −2 lib/Dialect/Torch/Transforms/RecomposeComplexOps.cpp
+2 −2 lib/Dialect/Torch/Transforms/RestructureNonConstantAxes.cpp
+2 −2 lib/Dialect/Torch/Transforms/ScalarizeShapes.cpp
+2 −2 lib/Dialect/Torch/Transforms/SimplifyDtypeCalculations.cpp
+2 −2 lib/Dialect/Torch/Transforms/SimplifyShapeCalculations.cpp
+5 −4 lib/Dialect/Torch/Utils/Utils.cpp
+1 −1 lib/Dialect/TorchConversion/Transforms/BackendTypeConversionPasses.cpp
+1 −2 lib/Dialect/TorchConversion/Transforms/UnpackQuantTensor.cpp
+4 −7 lib/RefBackend/RefBackend.cpp
+6 −10 projects/pt1/e2e_testing/xfail_sets.py
+6 −3 projects/pt1/python/torch_mlir/jit_ir_importer/build_tools/abstract_interp_lib_gen.py
+4 −0 projects/pt1/python/torch_mlir/jit_ir_importer/build_tools/torch_ods_gen.py
+1 −1 projects/pt1/python/torch_mlir_e2e_test/linalg_on_tensors_backends/refbackend.py
+39 −0 projects/pt1/python/torch_mlir_e2e_test/test_suite/type_conversion.py
+27 −3 python/torch_mlir/fx.py
+1 −1 pytorch-hash.txt
+1 −1 pytorch-requirements.txt
+4 −0 setup.py
+69 −0 test/Conversion/TorchOnnxToTorch/simple_ops_g_to_p.mlir
+158 −25 test/Conversion/TorchToTosa/basic.mlir
+15 −15 test/Dialect/TMTensor/bufferize.mlir
+2 −2 test/RefBackend/mlprogram-bufferize.mlir
+1 −1 torchvision-requirements.txt
Loading