Skip to content

Commit

Permalink
Integrate LLVM at llvm/llvm-project@956c0707d909
Browse files Browse the repository at this point in the history
  • Loading branch information
abhigunj committed Jan 31, 2025
1 parent 7c6a233 commit 3c5c133
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ workspace(name = "stablehlo")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

LLVM_COMMIT = "4573c857da88b3210d497d9a88a89351a74b5964"
LLVM_COMMIT = "956c0707d9098499a2682297b71f46b0a562eed9"

LLVM_SHA256 = "c5edae60416600e36a3c1cd2c2cd7180cc57c6436f11eb11aac477df9fef4943"
LLVM_SHA256 = "f90b866908daa3c65b74454943e52b59f40ab448f42a13b23e9823045f017066"

http_archive(
name = "llvm-raw",
Expand Down
2 changes: 1 addition & 1 deletion build_tools/llvm_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4573c857da88b3210d497d9a88a89351a74b5964
956c0707d9098499a2682297b71f46b0a562eed9
4 changes: 3 additions & 1 deletion stablehlo/conversions/tosa/tests/unary.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ func.func @negate(%arg : tensor<10xf32>) -> tensor<10xf32> {

// CHECK-LABEL: @slice
func.func @slice(%arg : tensor<4x3xf32>) -> tensor<2x2xf32> {
// CHECK: tosa.slice %arg0 {size = array<i64: 2, 2>, start = array<i64: 2, 1>}
// CHECK: %[[SIZE:.*]] = tosa.const_shape {value = dense<[2, 1]> : tensor<2xindex>} : () -> !tosa.shape<2>
// CHECK: %[[START:.*]] = tosa.const_shape {value = dense<2> : tensor<2xindex>} : () -> !tosa.shape<2>
// CHECK: tosa.slice %arg0, %[[SIZE]], %[[START]]
%0 = "stablehlo.slice"(%arg) {
start_indices = array<i64: 2, 1>,
limit_indices = array<i64: 4, 3>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ limitations under the License.
#include "mlir/Dialect/PDL/IR/PDL.h"
#include "mlir/Dialect/PDLInterp/IR/PDLInterp.h"
#include "mlir/Dialect/Tosa/IR/TosaOps.h"
#include "mlir/Dialect/Tosa/Utils/ConversionUtils.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/BuiltinAttributes.h"
Expand Down Expand Up @@ -435,8 +436,8 @@ struct ConvertStablehloSliceOp : public OpRewritePattern<stablehlo::SliceOp> {

rewriter.replaceOpWithNewOp<tosa::SliceOp>(
op, op.getType(), op.getOperand(),
rewriter.getDenseI64ArrayAttr(startIndicesI64),
rewriter.getDenseI64ArrayAttr(size));
getTosaConstShape(rewriter, op.getLoc(), startIndicesI64),
getTosaConstShape(rewriter, op.getLoc(), size));
return success();
}
};
Expand Down

0 comments on commit 3c5c133

Please sign in to comment.