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 Aakah via Apache TVM Discuss <no...@discuss.tvm.ai> on 2020/10/23 13:14:53 UTC

[Apache TVM Discuss] [Questions] How to use target.list_tags()?


When I use target.list_tags(), It always says cuda. I have however set cuda flag off while making tvm and in the code I've written target='llvm'. What is the possible cause of this?

![Screenshot from 2020-10-23 18-31-45|690x53](upload://cHmRnbPagQzYQxyl0HUqswt0I65.png)





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-to-use-target-list-tags/8261/1) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/624def235351da5557ca164174e970fbf165033d85ab118235ed0c2f6dd8f1d3).

[Apache TVM Discuss] [Questions] How to use target.list_tags()?

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

Thanks for the reply. I'll send a clarification PR once this is more clear to me. I tried Target.current(), but I am still not getting the desired output. It just says none. Am I doing something wrong here? 

![Screenshot from 2020-10-25 19-13-26|690x246](upload://eIUlbAdkuLJUJVaL0sfc3xYa44j.png)





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-to-use-target-list-tags/8261/3) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/c536c02869f92007c793f9df722b953f7926c37db6e9d7c71a726ec21f696c48).

[Apache TVM Discuss] [Questions] How to use target.list_tags()?

Posted by Junru Shao via Apache TVM Discuss <no...@discuss.tvm.ai>.

The output is expected. The API `list_tags` lists the existing tags that have been registered to the system, not the target used in the current scope - in this case, I believe you are looking for Target.current().

If the document of list_tags is confusing, would you like to send a PR to clarify the usage? Thanks!





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-to-use-target-list-tags/8261/2) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/fa7eb9fb4bb989b8abeeeb6516ca0455adbe39859b1dc306f27e4bc051727d7d).

[Apache TVM Discuss] [Questions] How to use target.list_tags()?

Posted by "Cody H. Yu via Apache TVM Discuss" <no...@discuss.tvm.ai>.

You need to call current in a target context, meaning that calling current in the “with” block.





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-to-use-target-list-tags/8261/4) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/50acaf56250e577be42796eaed34f8038fb1f07befc696ebdf22b3988526ab87).

[Apache TVM Discuss] [Questions] How to use target.list_tags()?

Posted by Junru Shao via Apache TVM Discuss <no...@discuss.tvm.ai>.

as Cody said, like this
```python
with tvm.target.Target("llvm"):
  print(tvm.Target.current())
```





---
[Visit Topic](https://discuss.tvm.apache.org/t/how-to-use-target-list-tags/8261/5) to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/715b201e359dac040e4278e1f335912ed3ecb0d7d9d4e5b300f8614aed0a3427).