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

Method check_exec

dnn/src/common/cross.cpp:53–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void Cross::check_exec(
54 const TensorLayout& A, const TensorLayout& B, const TensorLayout& C,
55 size_t workspace_in_bytes) {
56 megdnn_assert_eq_dtype(A, B);
57 megdnn_assert_eq_dtype(B, C);
58 TensorLayout c_expected;
59 deduce_layout(A, B, c_expected);
60 megdnn_assert_eq_layout(c_expected, C);
61
62 megdnn_assert_contiguous(A);
63 megdnn_assert_contiguous(B);
64 megdnn_assert_contiguous(C);
65 auto required_workspace_in_bytes = get_workspace_in_bytes(A, B, C);
66 megdnn_assert(workspace_in_bytes >= required_workspace_in_bytes);
67}
68
69void Cross::get_ABC(
70 const TensorShape& shape, size_t& A, size_t& B, size_t& C, int32_t axis) {

Callers

nothing calls this directly

Calls 2

deduce_layoutFunction · 0.85
get_workspace_in_bytesFunction · 0.70

Tested by

no test coverage detected