MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / XLA_TEST_P

Function XLA_TEST_P

tensorflow/compiler/xla/tests/reduce_window_test.cc:108–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106};
107
108XLA_TEST_P(ReduceWindowTest, MismatchedRanksGivesErrorStatus) {
109 const auto input = CreateConstantFromLiteral(
110 LiteralUtil::CreateR1<float>({1, 1, 1, 1}), &builder_);
111 const auto init_value =
112 CreateConstantFromLiteral(LiteralUtil::CreateR0<float>(0), &builder_);
113 TF_ASSERT_OK(builder_.first_error());
114 ReduceWindow(input, init_value,
115 CreateScalarAddComputation(FloatType(), &builder_),
116 /*window_dimensions=*/{1, 2},
117 /*window_strides=*/{1}, Padding::kValid);
118 ASSERT_EQ(builder_.first_error().code(), tensorflow::error::INVALID_ARGUMENT)
119 << builder_.first_error();
120 ASSERT_THAT(builder_.first_error().error_message(),
121 ::testing::HasSubstr("Want input dimensions size"));
122}
123
124// Regression test for b/68964348.
125XLA_TEST_P(ReduceWindowTest, R0ReduceWindow) {

Callers

nothing calls this directly

Calls 15

ReduceWindowFunction · 0.85
MakeShapeFunction · 0.85
BroadcastFunction · 0.85
TestNameFunction · 0.85
GetParamFunction · 0.85
FillWithMinorDimNumMethod · 0.80
CreateSubBuilderMethod · 0.80
BuildAndNoteErrorMethod · 0.80
PopulateWithValueMethod · 0.80

Tested by

no test coverage detected