Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Integrate LLVM at llvm/llvm-project@676d3baf
Browse files Browse the repository at this point in the history
Updates LLVM usage to match llvm/llvm-project@676d3baf. Further updates
the StableHLO submodule to openxla/stablehlo@5217297.
  • Loading branch information
marbre committed Apr 29, 2024
1 parent ebd07b3 commit a7e7a1a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build_tools/llvm_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20ed5b1f45871612570d3bd447121ac43e083c6a
676d3bafc09d0c331a04b813804407334de12917
21 changes: 8 additions & 13 deletions lib/Conversion/StablehloToEmitC/StablehloToEmitC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,9 @@ class SliceOpConversion : public OpConversionPattern<stablehlo::SliceOp> {
SmallVector<Attribute, 2> arguments =
indexSequence(adaptor.getOperands().size(), sliceOp.getContext());

arguments.push_back(
rewriter.getI64TensorAttr(sliceOp.getStartIndicesAttr()));
arguments.push_back(
rewriter.getI64TensorAttr(sliceOp.getLimitIndicesAttr()));
arguments.push_back(rewriter.getI64TensorAttr(sliceOp.getStridesAttr()));
arguments.push_back(rewriter.getI64TensorAttr(sliceOp.getStartIndices()));
arguments.push_back(rewriter.getI64TensorAttr(sliceOp.getLimitIndices()));
arguments.push_back(rewriter.getI64TensorAttr(sliceOp.getStrides()));

ArrayAttr args = rewriter.getArrayAttr(arguments);

Expand Down Expand Up @@ -338,7 +336,7 @@ class DynamicSliceOpConversion
adaptor.getOperands().size(), dynamicSliceOp.getContext());

arguments.push_back(
rewriter.getI64TensorAttr(dynamicSliceOp.getSliceSizesAttr()));
rewriter.getI64TensorAttr(dynamicSliceOp.getSliceSizes()));

ArrayAttr args = rewriter.getArrayAttr(arguments);

Expand Down Expand Up @@ -402,12 +400,9 @@ class PadOpConversion : public OpConversionPattern<stablehlo::PadOp> {
SmallVector<Attribute, 2> arguments =
indexSequence(adaptor.getOperands().size(), padOp.getContext());

arguments.push_back(
rewriter.getI64TensorAttr(padOp.getEdgePaddingLowAttr()));
arguments.push_back(
rewriter.getI64TensorAttr(padOp.getEdgePaddingHighAttr()));
arguments.push_back(
rewriter.getI64TensorAttr(padOp.getInteriorPaddingAttr()));
arguments.push_back(rewriter.getI64TensorAttr(padOp.getEdgePaddingLow()));
arguments.push_back(rewriter.getI64TensorAttr(padOp.getEdgePaddingHigh()));
arguments.push_back(rewriter.getI64TensorAttr(padOp.getInteriorPadding()));

ArrayAttr args = rewriter.getArrayAttr(arguments);

Expand Down Expand Up @@ -441,7 +436,7 @@ class TransposeOpConversion
indexSequence(adaptor.getOperands().size(), transposeOp.getContext());

arguments.push_back(
rewriter.getI64TensorAttr(transposeOp.getPermutationAttr()));
rewriter.getI64TensorAttr(transposeOp.getPermutation()));
ArrayAttr args = rewriter.getArrayAttr(arguments);

Type resultType = transposeOp.getResult().getType();
Expand Down

0 comments on commit a7e7a1a

Please sign in to comment.