| 129 | }; |
| 130 | |
| 131 | void 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 | |
| 139 | void ExampleTensorDLPack() { |
| 140 | namespace ffi = tvm::ffi; |