# Can we get device\_type from runtime module?

**URL:** <https://discuss.tvm.apache.org/t/can-we-get-device-type-from-runtime-module/11801>\
**Category:** Questions\
**Created:** [December 30, 2021, 10:23am UTC](https://discuss.tvm.apache.org/t/can-we-get-device-type-from-runtime-module/11801 "2021-12-30T10:23:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tremblingbrain](https://discuss.tvm.apache.org/user_avatar/discuss.tvm.apache.org/tremblingbrain/32/5227_2.png) [@tremblingbrain](https://discuss.tvm.apache.org/u/tremblingbrain)\
**Post date:** [December 30, 2021, 10:23am UTC](https://discuss.tvm.apache.org/t/can-we-get-device-type-from-runtime-module/11801/1 "2021-12-30T10:23:16Z")

</div>

Hello,

I compiled my relay graph to a DSO library, json graph and a parameter binary file like below: graph, lib, lowered\_params = relay.build(mod, target=“opencl”, target\_host=“llvm --runtime=c++, params=params) lib.export\_library(os.path.join(build\_dir, name+”.so"))

When I’m deploying this module using C++, I loaded the library with tvm::runtime::Module::LoadFromFile(). Then how can I know the device type that this runtime module was compiled for? I didn’t find any API or attribute that keeps this info.

Can someone land me a hand please?

Thanks a lot!
