Skip to content

Commit

Permalink
Bump to llvm commit 8b76aea8d8b1b71f6220bc2845abc749f18a19b7 (#2366)
Browse files Browse the repository at this point in the history
* bump to llvm commit 8b76aea8d8b1b71f6220bc2845abc749f18a19b7

Signed-off-by: Ferdinand Lemaire <[email protected]>

* Update calls to affine::normalizeMemRefType function.

Signed-off-by: Tiago Trevisan Jost <[email protected]>

* clang-format ZHighToZLow.cpp

Signed-off-by: Tiago Trevisan Jost <[email protected]>

* Removes llvm.sext in KrnlMemcpyOpLowering that was failing in the IR verifier.

Signed-off-by: Tiago Trevisan Jost <[email protected]>

---------

Signed-off-by: Ferdinand Lemaire <[email protected]>
Signed-off-by: Tiago Trevisan Jost <[email protected]>
Co-authored-by: Tiago Trevisan Jost <[email protected]>
Co-authored-by: Philip Lassen <[email protected]>
Co-authored-by: maxbartel <[email protected]>
Co-authored-by: Alexandre Eichenberger <[email protected]>
  • Loading branch information
5 people authored Jul 20, 2023
1 parent 7b92fbc commit ab4fa45
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/BuildOnLinuxOSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Firstly, install MLIR (as a part of LLVM-Project):
``` bash
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout ec89cb9a81529fd41fb37b8e62203a2e9f23bd54 && cd ..
cd llvm-project && git checkout 8b76aea8d8b1b71f6220bc2845abc749f18a19b7 && cd ..
```

[same-as-file]: <> (utils/build-mlir.sh)
Expand Down
2 changes: 1 addition & 1 deletion docs/BuildOnWindows.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Install MLIR (as a part of LLVM-Project):
```shell
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout ec89cb9a81529fd41fb37b8e62203a2e9f23bd54 && cd ..
cd llvm-project && git checkout 8b76aea8d8b1b71f6220bc2845abc749f18a19b7 && cd ..
```

[same-as-file]: <> (utils/build-mlir.cmd)
Expand Down
8 changes: 4 additions & 4 deletions src/Accelerators/NNPA/Conversion/ZHighToZLow/ZHighToZLow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ Value insertAllocOrEmitZeroConstant(ArrayRef<IndexExpr> dims,
RankedTensorType::get(shape, rewriter.getF32Type(),
ZTensorEncodingAttr::get(op->getContext(), layout));
ZMemRefType zMemRefType = convertZTensorToMemRefType(tensorType);
MemRefType resType = affine::normalizeMemRefType(
zMemRefType.value.cast<MemRefType>(), /*numSymbolicOperands=*/0);
MemRefType resType =
affine::normalizeMemRefType(zMemRefType.value.cast<MemRefType>());

// Create a ZHighStickifiedConstantOp.
ZHighStickifiedConstantOp stickifiedConstant =
Expand Down Expand Up @@ -660,8 +660,8 @@ struct ZHighToZLowStickifiedConstantOpLowering : public ConversionPattern {
// Normalize MemRefType to get a static shape.
assert(zMemRefType.value.cast<MemRefType>().getNumDynamicDims() == 0 &&
"MemRefType has dynamic dimensions");
MemRefType normalizedType = affine::normalizeMemRefType(
zMemRefType.value.cast<MemRefType>(), /*numSymbolicOperands=*/0);
MemRefType normalizedType =
affine::normalizeMemRefType(zMemRefType.value.cast<MemRefType>());
ArrayRef<int64_t> normalizedShape = normalizedType.getShape();

// Get dense resource attribute.
Expand Down
1 change: 0 additions & 1 deletion src/Conversion/KrnlToLLVM/KrnlMemcpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class KrnlMemcpyOpLowering : public ConversionPattern {

// Size.
Value sizeInBytes = create.llvm.mul(elemsToCopy, eltSizeInBytes);
sizeInBytes = create.llvm.sext(i64Ty, sizeInBytes);

// Is volatile (set to false).
Value isVolatile = create.llvm.constant(i1Ty, (int64_t)0);
Expand Down
3 changes: 1 addition & 2 deletions src/Dialect/ONNX/ONNXOps/Additional/ShapeTransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ LogicalResult ONNXShapeTransformOpShapeHelper::computeShape() {
// TODO: support dynamic shape.
MemRefType affineMemRefType =
MemRefType::get(inputDims, elementType, AffineMapAttr::get(indexMap));
MemRefType flatMemRefType =
affine::normalizeMemRefType(affineMemRefType, /*numSymbols=*/0);
MemRefType flatMemRefType = affine::normalizeMemRefType(affineMemRefType);
assert((flatMemRefType.getRank() == outputRank) && "Normalization failed");

DimsExpr outputIEs(outputRank);
Expand Down
2 changes: 1 addition & 1 deletion third_party/mlir-hlo
Submodule mlir-hlo updated 175 files
2 changes: 1 addition & 1 deletion utils/clone-mlir.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout ec89cb9a81529fd41fb37b8e62203a2e9f23bd54 && cd ..
cd llvm-project && git checkout 8b76aea8d8b1b71f6220bc2845abc749f18a19b7 && cd ..

0 comments on commit ab4fa45

Please sign in to comment.