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

Method check_layout_fwd

dnn/src/common/lsq.cpp:10–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10void LSQBase::check_layout_fwd(
11 const TensorLayout& input, const TensorLayout& scale,
12 const TensorLayout& zero_point, const TensorLayout& grad_scale,
13 const TensorLayout& output) {
14 megdnn_assert(input.dtype == dtype::Float32());
15 megdnn_assert(scale.dtype == dtype::Float32());
16 megdnn_assert(zero_point.dtype == dtype::Float32());
17 megdnn_assert(grad_scale.dtype == dtype::Float32());
18 TensorLayout expected;
19 deduce_layout_fwd(input, expected);
20 megdnn_assert_eq_layout(expected, output);
21}
22
23void LSQForward::deduce_layout(
24 const TensorLayout& input, const TensorLayout& /* scale */,

Callers 5

SizeArgsMethod · 0.45
SizeArgsMethod · 0.45
SizeArgsMethod · 0.45
SizeArgsMethod · 0.45
SizeArgsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected