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

Method assert_tensor_equal

imperative/src/impl/transformations/trace.cpp:596–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

594}
595
596void CompiledTransformation::assert_tensor_equal(ValueRef lhs, ValueRef rhs) {
597 if (!lhs.is<HostValue>()) {
598 lhs = lhs.numpy();
599 }
600 if (!rhs.is<HostValue>()) {
601 rhs = rhs.numpy();
602 }
603 trace_assert(m_value_comparator(lhs, rhs), "tensors not equals");
604}
605
606ValueRef CompiledTransformation::trace_input(size_t id, ValueRef value) {
607 try {

Callers

nothing calls this directly

Calls 1

numpyMethod · 0.45

Tested by

no test coverage detected