# Rust module "tvm\_graph\_rt": can it run on cuda device? can I iterate over its output without copying from gpu to cpu?

**URL:** <https://discuss.tvm.apache.org/t/rust-module-tvm-graph-rt-can-it-run-on-cuda-device-can-i-iterate-over-its-output-without-copying-from-gpu-to-cpu/17668>\
**Category:** Questions\
**Created:** [August 31, 2024, 2:59pm UTC](https://discuss.tvm.apache.org/t/rust-module-tvm-graph-rt-can-it-run-on-cuda-device-can-i-iterate-over-its-output-without-copying-from-gpu-to-cpu/17668 "2024-08-31T14:59:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tempmac](https://discuss.tvm.apache.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@tempmac](https://discuss.tvm.apache.org/u/tempmac)\
**Post date:** [August 31, 2024, 2:59pm UTC](https://discuss.tvm.apache.org/t/rust-module-tvm-graph-rt-can-it-run-on-cuda-device-can-i-iterate-over-its-output-without-copying-from-gpu-to-cpu/17668/1 "2024-08-31T14:59:57Z")

</div>

context: [how do I use dlpackrs with apache TVM for zero-copy?](https://discuss.tvm.apache.org/t/how-do-i-use-dlpackrs-with-apache-tvm-for-zero-copy/17658)

I’ve found that using `tvm_graph_rt` crate, the output is of `Tensor`, which has `as_slice` function that returns… `[u8]`.

So… is it possible to iterate over output rows using `as_slice` without a full gpu-to-cpu copy? Also, there seems to be no option to specify device ('eg. cuda(0) etc) with `tvm_graph_rt`… is this module 100% cpu-only?
