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

Method check_exec

dnn/src/common/batched_matrix_mul.cpp:77–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void BatchedMatrixMulForward::check_exec(
78 const TensorLayout& A, const TensorLayout& B, const TensorLayout& C,
79 size_t workspace_in_bytes) {
80 TensorLayout C_expect;
81 deduce_layout(A, B, C_expect);
82 megdnn_assert(
83 C_expect.eq_layout(C), "bad layout for C: expect=%s got=%s",
84 C_expect.to_string().c_str(), C.to_string().c_str());
85 auto required_workspace_in_bytes = get_workspace_in_bytes(A, B, C);
86 megdnn_assert(
87 workspace_in_bytes >= required_workspace_in_bytes,
88 "needed workspace: %zu; got: %zu", required_workspace_in_bytes,
89 workspace_in_bytes);
90}
91} // namespace megdnn
92
93// vim: syntax=cpp.doxygen

Callers

nothing calls this directly

Calls 4

deduce_layoutFunction · 0.85
eq_layoutMethod · 0.80
get_workspace_in_bytesFunction · 0.70
to_stringMethod · 0.45

Tested by

no test coverage detected