Skip to content

Commit

Permalink
fix depthconv test
Browse files Browse the repository at this point in the history
dw_conv can also use workspace that results in a non-zero workspace size. changing it to ASSERT_NE

PiperOrigin-RevId: 593797013
  • Loading branch information
geng-yan authored and xnnpack-bot committed Dec 26, 2023
1 parent 4178a8e commit 9547e12
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/depthwise-convolution-2d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -906,14 +906,14 @@ TEST_F(DepthwiseConvolutionTestF32, matches_operator_api)
ASSERT_NE(nullptr, op);
size_t workspace_size = SIZE_MAX;
size_t workspace_alignment = SIZE_MAX;
ASSERT_EQ(
xnn_status_success, xnn_reshape_convolution2d_nhwc_f32(
op, batch_size, input_height, input_width,
&workspace_size, &workspace_alignment,
/*output_height_out=*/nullptr, /*output_width_out=*/nullptr,
/*threadpool=*/nullptr));
ASSERT_EQ(workspace_size, 0);
ASSERT_EQ(workspace_alignment, 1);
ASSERT_EQ(xnn_status_success,
xnn_reshape_convolution2d_nhwc_f32(
op, batch_size, input_height, input_width, &workspace_size,
&workspace_alignment,
/*output_height_out=*/nullptr, /*output_width_out=*/nullptr,
/*threadpool=*/nullptr));
ASSERT_NE(workspace_size, SIZE_MAX);
ASSERT_NE(workspace_alignment, SIZE_MAX);
ASSERT_EQ(xnn_status_success, xnn_setup_convolution2d_nhwc_f32(op, /*workspace=*/nullptr, input.data(), operator_output.data()));

ASSERT_EQ(xnn_status_success, xnn_run_operator(op, /*threadpool=*/nullptr));
Expand Down

0 comments on commit 9547e12

Please sign in to comment.