MCPcopy Create free account
hub / github.com/MegEngine/MegCC / layout_to_string

Function layout_to_string

runtime/test/common/common.cpp:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22static std::string layout_to_string(const Layout& layout) {
23 std::stringstream ss;
24 ss << "Layout: dims[";
25 for (int32_t i = 0; i < layout.nr_dim; i++) {
26 ss << layout.dims[i] << ",";
27 }
28 ss << "], strides[";
29 for (int32_t i = 0; i < layout.nr_dim; i++) {
30 ss << layout.stride[i] << ",";
31 }
32 ss << "]";
33 return ss.str();
34}
35
36static inline float diff(float x, float y) {
37 return x - y;

Callers 2

assert_tensor_eqFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected