Hi Mark, thank you for clarifying.

If I'm not interested in using the virtual_device feature, is there a way to 
disable it? The issue is that without the patch above, it is not possible to 
use any pass that is based on the ExprMutator in Python, because the TE 
Compiler complains with the above assert. If it cannot be disabled, I'd be 
interested to contribute a patch that fixes the issue.

Actually the first line of the patch is not required in my case, so the only 
missing copy for my use-case is in the Python ExprMutator. The WithFields 
construct does not seem to be available in Python and copying the 
`virtual_device_` property with `func.virtual_device_ = fn.virtual_device_` 
(like here: 
https://github.com/apache/tvm/blob/553eb1acd0c115adea0c7d04ce36e26332339769/tests/python/relay/test_pass_fold_constant.py#L102)
 produces the same assert. Changing the Function() API would probably touch a 
ton of code, so I'd like to avoid that. If I can figure out a way to solve the 
circular import, would the above patch be fine?





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/relay-function-virtual-device-property/12958/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/013eb77731a6e2ce8aa93e7c4554215e11b56886afcb5c4aedd5e8e9b329365b).

Reply via email to