Integrate LLVM at llvm/llvm-project@b25546a4b4
Updates LLVM usage to match [b25546a4b406](https://github.com/llvm/llvm-project/commit/b25546a4b406) PiperOrigin-RevId: 377077163
This commit is contained in:
parent
75a1c450ea
commit
4620410f18
|
@ -15,9 +15,9 @@
|
||||||
|
|
||||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||||
|
|
||||||
LLVM_COMMIT = "97d234935f1514af128277943f30efc469525371"
|
LLVM_COMMIT = "b25546a4b40675b596dcfdbfd491b10fa12d88e6"
|
||||||
|
|
||||||
LLVM_SHA256 = "168d75d00d50c3e4a09f18b096495bc924074b133c9916716daaf0cbe4c10abd"
|
LLVM_SHA256 = "e82cc57ee8b6232124459fad521bf7a0b5dbb1d479f528137364b6b1f3b58bc0"
|
||||||
|
|
||||||
LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT)
|
LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT)
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
97d234935f1514af128277943f30efc469525371
|
b25546a4b40675b596dcfdbfd491b10fa12d88e6
|
||||||
|
|
||||||
|
|
|
@ -1820,10 +1820,9 @@ struct DepthwiseConvOpOnTensorsConversion
|
||||||
"non-zero padding unsupported yet");
|
"non-zero padding unsupported yet");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((op.lhs_dilation() && !isSplatValue(*op.lhs_dilation(), 1)) ||
|
if ((op.lhs_dilation() && !isSplatValue(*op.lhs_dilation(), 1))) {
|
||||||
(op.rhs_dilation() && !isSplatValue(*op.rhs_dilation(), 1))) {
|
return rewriter.notifyMatchFailure(
|
||||||
return rewriter.notifyMatchFailure(op,
|
op, "non-one lhs- dialation unsupported yet");
|
||||||
"non-one dialation unsupported yet");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (const mhlo::ConvDimensionNumbers& dimension_numbers =
|
if (const mhlo::ConvDimensionNumbers& dimension_numbers =
|
||||||
|
@ -1858,6 +1857,13 @@ struct DepthwiseConvOpOnTensorsConversion
|
||||||
window_strides = rewriter.getI64VectorAttr({1, 1});
|
window_strides = rewriter.getI64VectorAttr({1, 1});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DenseIntElementsAttr rhs_dilation;
|
||||||
|
if (op.rhs_dilation()) {
|
||||||
|
rhs_dilation = op.rhs_dilation().getValue();
|
||||||
|
} else {
|
||||||
|
rhs_dilation = rewriter.getI64VectorAttr({1, 1});
|
||||||
|
}
|
||||||
|
|
||||||
mhlo::ConvOp::Adaptor adaptor(args);
|
mhlo::ConvOp::Adaptor adaptor(args);
|
||||||
Location loc = op.getLoc();
|
Location loc = op.getLoc();
|
||||||
Value input = adaptor.lhs();
|
Value input = adaptor.lhs();
|
||||||
|
@ -1895,7 +1901,7 @@ struct DepthwiseConvOpOnTensorsConversion
|
||||||
reshaped_output_dims, result_type.getElementType());
|
reshaped_output_dims, result_type.getElementType());
|
||||||
auto conv = rewriter.create<linalg::DepthwiseConvInputNHWCFilterHWCFOp>(
|
auto conv = rewriter.create<linalg::DepthwiseConvInputNHWCFilterHWCFOp>(
|
||||||
op.getLoc(), reshaped_output_type, ValueRange{input, filter},
|
op.getLoc(), reshaped_output_type, ValueRange{input, filter},
|
||||||
ValueRange{zero_tensor}, window_strides);
|
ValueRange{zero_tensor}, rhs_dilation, window_strides);
|
||||||
|
|
||||||
// Create a Linalg reshape op that converts the output from 5 dimensions
|
// Create a Linalg reshape op that converts the output from 5 dimensions
|
||||||
// into 4 dimensions (by collapsing the last two dimensions). This is
|
// into 4 dimensions (by collapsing the last two dimensions). This is
|
||||||
|
@ -1935,7 +1941,7 @@ struct DepthwiseConvOpOnTensorsConversion
|
||||||
|
|
||||||
rewriter.replaceOpWithNewOp<linalg::DepthwiseConvInputNHWCFilterHWCOp>(
|
rewriter.replaceOpWithNewOp<linalg::DepthwiseConvInputNHWCFilterHWCOp>(
|
||||||
op, result_type, ValueRange{input, reshaped_filter},
|
op, result_type, ValueRange{input, reshaped_filter},
|
||||||
ValueRange{zero_tensor}, window_strides);
|
ValueRange{zero_tensor}, rhs_dilation, window_strides);
|
||||||
}
|
}
|
||||||
|
|
||||||
return success();
|
return success();
|
||||||
|
|
|
@ -2059,7 +2059,7 @@ func @depthwise_conv(%arg0: tensor<2x4x5x2xf32>,
|
||||||
// CHECK: %[[CST:.+]] = constant 0.000000e+00 : f32
|
// CHECK: %[[CST:.+]] = constant 0.000000e+00 : f32
|
||||||
// CHECK: %[[FILL:.+]] = linalg.fill(%[[INIT]], %[[CST]]) : tensor<2x3x4x2x3xf32>, f32 -> tensor<2x3x4x2x3xf32>
|
// CHECK: %[[FILL:.+]] = linalg.fill(%[[INIT]], %[[CST]]) : tensor<2x3x4x2x3xf32>, f32 -> tensor<2x3x4x2x3xf32>
|
||||||
// CHECK: %[[OUT:.+]] = linalg.depthwise_conv_2d_input_nhwc_filter_hwcf
|
// CHECK: %[[OUT:.+]] = linalg.depthwise_conv_2d_input_nhwc_filter_hwcf
|
||||||
// CHECK-SAME: {strides = dense<1> : tensor<2xi64>}
|
// CHECK-SAME: {dilations = dense<1> : tensor<2xi64>, strides = dense<1> : tensor<2xi64>}
|
||||||
// CHECK-SAME: ins(%[[IN]], %[[FILTER]] : tensor<2x4x5x2xf32>, tensor<2x2x2x3xf32>)
|
// CHECK-SAME: ins(%[[IN]], %[[FILTER]] : tensor<2x4x5x2xf32>, tensor<2x2x2x3xf32>)
|
||||||
// CHECK-SAME: outs(%[[FILL]] : tensor<2x3x4x2x3xf32>) -> tensor<2x3x4x2x3xf32>
|
// CHECK-SAME: outs(%[[FILL]] : tensor<2x3x4x2x3xf32>) -> tensor<2x3x4x2x3xf32>
|
||||||
// CHECK: %{{.+}} = linalg.tensor_reshape %[[OUT]]
|
// CHECK: %{{.+}} = linalg.tensor_reshape %[[OUT]]
|
||||||
|
@ -2099,7 +2099,7 @@ func @depthwise_conv_multiplier_1(%arg0: tensor<1x113x113x96xf32>,
|
||||||
// CHECK-SAME: [0], [1], [2, 3]
|
// CHECK-SAME: [0], [1], [2, 3]
|
||||||
// CHECK-SAME: : tensor<3x3x1x96xf32> into tensor<3x3x96xf32>
|
// CHECK-SAME: : tensor<3x3x1x96xf32> into tensor<3x3x96xf32>
|
||||||
// CHECK: %{{.+}} = linalg.depthwise_conv_2d_input_nhwc_filter_hwc
|
// CHECK: %{{.+}} = linalg.depthwise_conv_2d_input_nhwc_filter_hwc
|
||||||
// CHECK-SAME: {strides = dense<2> : tensor<2xi64>}
|
// CHECK-SAME: {dilations = dense<1> : tensor<2xi64>, strides = dense<2> : tensor<2xi64>}
|
||||||
// CHECK-SAME: ins(%[[IN]], %[[RESHAPED_FILTER]] : tensor<1x113x113x96xf32>, tensor<3x3x96xf32>)
|
// CHECK-SAME: ins(%[[IN]], %[[RESHAPED_FILTER]] : tensor<1x113x113x96xf32>, tensor<3x3x96xf32>)
|
||||||
// CHECK-SAME: outs(%[[FILL]] : tensor<1x56x56x96xf32>) -> tensor<1x56x56x96xf32>
|
// CHECK-SAME: outs(%[[FILL]] : tensor<1x56x56x96xf32>) -> tensor<1x56x56x96xf32>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue