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

Class CPUNDAlloc

tests/cpp/test_example.cc:126–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126struct CPUNDAlloc {
127 void AllocData(DLTensor* tensor) { tensor->data = malloc(tvm::ffi::GetDataSize(*tensor)); }
128 void FreeData(DLTensor* tensor) { free(tensor->data); }
129};
130
131void ExampleTensor() {
132 namespace ffi = tvm::ffi;

Callers 2

ExampleTensorFunction · 0.70
ExampleTensorDLPackFunction · 0.70

Calls

no outgoing calls

Tested by 2

ExampleTensorFunction · 0.56
ExampleTensorDLPackFunction · 0.56