提交 a025ac02 编写于 作者: 李寅

Optimize gemm v7

上级 dad3d11a
此差异已折叠。
...@@ -38,7 +38,9 @@ void TestShapeOp(const std::vector<index_t> &input_shape) { ...@@ -38,7 +38,9 @@ void TestShapeOp(const std::vector<index_t> &input_shape) {
std::vector<int32_t> expected_input_shape(input_shape.begin(), std::vector<int32_t> expected_input_shape(input_shape.begin(),
input_shape.end()); input_shape.end());
if (!expected_input_shape.empty()) { if (!expected_input_shape.empty()) {
net.AddInputFromArray<CPU, int32_t>("ExpectedOutput", {input_shape.size()}, net.AddInputFromArray<CPU, int32_t>("ExpectedOutput",
{static_cast<int32_t>(
input_shape.size())},
expected_input_shape); expected_input_shape);
} else { } else {
net.AddInputFromArray<CPU, int32_t>("ExpectedOutput", {}, {0}); net.AddInputFromArray<CPU, int32_t>("ExpectedOutput", {}, {0});
......
...@@ -37,11 +37,18 @@ void TestSlice(const std::vector<index_t> &input_shape, ...@@ -37,11 +37,18 @@ void TestSlice(const std::vector<index_t> &input_shape,
const std::vector<float> &output) { const std::vector<float> &output) {
OpsTestNet net; OpsTestNet net;
net.AddInputFromArray<CPU, float>("Input", input_shape, input); net.AddInputFromArray<CPU, float>("Input", input_shape, input);
net.AddInputFromArray<CPU, int32_t>("BeginIndices", {input_shape.size()}, net.AddInputFromArray<CPU, int32_t>("BeginIndices",
{static_cast<int32_t>(
input_shape.size())},
begin_indices); begin_indices);
net.AddInputFromArray<CPU, int32_t>("EndIndices", {input_shape.size()}, net.AddInputFromArray<CPU, int32_t>("EndIndices",
{static_cast<int32_t>(
input_shape.size())},
end_indices); end_indices);
net.AddInputFromArray<CPU, int32_t>("Strides", {input_shape.size()}, strides); net.AddInputFromArray<CPU, int32_t>("Strides",
{static_cast<int32_t>(
input_shape.size())},
strides);
OpDefBuilder("StridedSlice", "StridedSliceOpTest") OpDefBuilder("StridedSlice", "StridedSliceOpTest")
.Input("Input") .Input("Input")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册