How to convenient print DLTensor values?
Like
DLTensor* a;
I have to using ((float*)a->data)[0] any better way to print one value out?
How to convenient print DLTensor values?
Like
DLTensor* a;
I have to using ((float*)a->data)[0] any better way to print one value out?
thanks. does there any demo to call these api?
for instance, I have a tvm::runtime::NDArray a
can I using cout << a
to print values?
Maybe no (need to confirm) but you can use NDArrayToTIR<float>(a, std::cout)
from here:
I note that this is from source file so maybe just copy and paste the implementation to your project.