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

Function tensor2memref

src/jit/impl/mlir/executable_cpu.cpp:46–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void* tensor2memref(const megdnn::TensorND& tensor) {
47 switch (tensor.layout.ndim) {
48#define cb(i) \
49 case i: \
50 return tensor2memref_dim<i>(tensor)
51
52 cb(1);
53 cb(2);
54 cb(3);
55 cb(4);
56 cb(5);
57 default:
58 mgb_throw(InternalError, "Unsupported ndim, got %zu", tensor.layout.ndim);
59#undef cb
60 }
61}
62
63} // namespace
64MLIRCPUExecutable::MLIRCPUExecutable(

Callers 1

executeMethod · 0.85

Calls 1

cbFunction · 0.50

Tested by

no test coverage detected