You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by Akhil via TVM Discuss <no...@discuss.tvm.ai> on 2020/08/22 17:02:19 UTC

[TVM Discuss] [Questions] How does TVM choose the platform and device


When generating opencl code using tvm how exactly does tvm choose the platform and device during the build ?.





---
[Visit Topic](https://discuss.tvm.ai/t/how-does-tvm-choose-the-platform-and-device/7695/1) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/0350d8d4073a0ecc6cb9ccdcc5789f257a79ef1bcb4ee8558b976cf261bce45d).

[TVM Discuss] [Questions] How does TVM choose the platform and device

Posted by Chenfan via TVM Discuss <no...@discuss.tvm.ai>.

In design, TVM requires users to manually choose their target device. The `TVMContext` object has two structure members that are `device_type` and `device_id`.

If not specified, it's natural to choose the first one in default.





---
[Visit Topic](https://discuss.tvm.ai/t/how-does-tvm-choose-the-platform-and-device/7695/4) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/a36ff6a6c48068e997001d2ba6b880243fc358f3fe910d6969c52e6820846cf2).

[TVM Discuss] [Questions] How does TVM choose the platform and device

Posted by Akhil via TVM Discuss <no...@discuss.tvm.ai>.

Hey thanks, I found the file it seems as though TVM chooses the first platform available from my understanding.





---
[Visit Topic](https://discuss.tvm.ai/t/how-does-tvm-choose-the-platform-and-device/7695/3) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/a81dcbd1df61614198d3c88c468c76127c3922af4f15c8daa04709a3551e980d).

[TVM Discuss] [Questions] How does TVM choose the platform and device

Posted by Chenfan via TVM Discuss <no...@discuss.tvm.ai>.

In `src/runtime/opencl/opencl_device_api.cc`, we can find some runtime functions that check the device information.





---
[Visit Topic](https://discuss.tvm.ai/t/how-does-tvm-choose-the-platform-and-device/7695/2) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.ai/email/unsubscribe/3bffdc45fc8ea0973655db4068f915e2ef69d63f14f7a1603f107f73c257f2f8).