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

Method check_exec

dnn/src/common/rng.cpp:12–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 indices = TensorLayout(TensorShape({src.shape[0]}), dtype::Int32());
11}
12void ShuffleRNGForward::check_exec(
13 const TensorLayout& src, const TensorLayout& dst, const TensorLayout& indices,
14 size_t workspace_in_bytes) {
15 TensorLayout dst_expected, indices_expected;
16 megdnn_assert_contiguous(src);
17 deduce_layout(src, dst_expected, indices_expected);
18
19 megdnn_assert_eq_layout(dst_expected, dst);
20 megdnn_assert_eq_layout(indices_expected, indices);
21 megdnn_assert_contiguous(indices);
22 megdnn_assert(src.dtype == dst.dtype);
23 megdnn_assert(indices.dtype == dtype::Int32());
24
25 auto required_workspace_in_bytes = get_workspace_in_bytes(src, dst, indices);
26 megdnn_assert(workspace_in_bytes >= required_workspace_in_bytes);
27}
28
29void ShuffleRNGBackward::check_exec(
30 const TensorLayout& diff, const TensorLayout& indices, const TensorLayout& grad,

Callers

nothing calls this directly

Calls 8

deduce_layoutFunction · 0.85
categoryMethod · 0.80
get_workspace_in_bytesFunction · 0.70
paramFunction · 0.50
is_contiguousMethod · 0.45
to_stringMethod · 0.45
enumvMethod · 0.45
total_nr_elemsMethod · 0.45

Tested by

no test coverage detected