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

Function create_layout

imperative/src/impl/ops/io_remote.cpp:81–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81TensorLayout create_layout(const std::vector<int32_t>& shape, DType dtype) {
82 TensorShape tshape;
83 tshape.ndim = shape.size();
84 mgb_assert(tshape.ndim <= TensorLayout::MAX_NDIM);
85 std::copy(shape.begin(), shape.end(), tshape.shape);
86 return TensorLayout(tshape, dtype);
87}
88
89std::tuple<SmallVector<LogicalTensorDesc>, bool> infer_output_attrs_fallible_remote_send(
90 const OpDef& def, const SmallVector<LogicalTensorDesc>& input_descs) {

Calls 5

TensorLayoutClass · 0.85
copyFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected