MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / __assert_tensor_equal

Method __assert_tensor_equal

test/src/helper.cpp:210–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210::testing::AssertionResult mgb::__assert_tensor_equal(
211 const char* expr0, const char* expr1, const char* /*expr_maxerr*/,
212 const HostTensorND& v0, const HostTensorND& v1, float maxerr) {
213 auto ret = debug::compare_tensor_value(v0, expr0, v1, expr1, maxerr);
214 if (ret.valid())
215 return ::testing::AssertionFailure() << ret.val();
216 return ::testing::AssertionSuccess();
217}
218
219::testing::AssertionResult mgb::__assert_shape_equal(
220 const TensorShape& v0, const TensorShape& v1) {

Callers

nothing calls this directly

Calls 1

validMethod · 0.45

Tested by

no test coverage detected