MCPcopy Create free account
hub / github.com/apache/tvm-ffi / ExampleTensor

Function ExampleTensor

tests/cpp/test_example.cc:131–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129};
130
131void ExampleTensor() {
132 namespace ffi = tvm::ffi;
133 ffi::Shape shape = {1, 2, 3};
134 DLDataType dtype = {kDLFloat, 32, 1};
135 DLDevice device = {kDLCPU, 0};
136 ffi::Tensor tensor = ffi::Tensor::FromNDAlloc(CPUNDAlloc(), shape, dtype, device);
137}
138
139void ExampleTensorDLPack() {
140 namespace ffi = tvm::ffi;

Callers 1

TESTFunction · 0.85

Calls 1

CPUNDAllocClass · 0.70

Tested by

no test coverage detected