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

Method check_exec

dnn/src/common/non_zero.cpp:5–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3
4namespace megdnn {
5void NonZero::check_exec(
6 const TensorLayout& src, const TensorLayout& dst, size_t workspace_in_bytes) {
7 dst.dtype.assert_is(infer_type(src.dtype));
8
9 if (!src.is_empty())
10 megdnn_assert(src.is_physical_contiguous());
11 auto require_workspace_in_bytes = get_workspace_in_bytes(src);
12 megdnn_assert(workspace_in_bytes >= require_workspace_in_bytes);
13}
14
15DType NonZero::infer_type(DType /*input*/) {
16 return dtype::Int32();

Callers

nothing calls this directly

Calls 5

infer_typeFunction · 0.85
assert_isMethod · 0.80
get_workspace_in_bytesFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected