kparzysz-quic commented on code in PR #12509:
URL: https://github.com/apache/tvm/pull/12509#discussion_r953776108
##########
src/target/target.cc:
##########
@@ -1042,6 +1049,9 @@
TVM_REGISTER_GLOBAL("target.TargetExitScope").set_body_typed(TargetInternal::Exi
TVM_REGISTER_GLOBAL("target.TargetCurrent").set_body_typed(Target::Current);
TVM_REGISTER_GLOBAL("target.TargetExport").set_body_typed(TargetInternal::Export);
TVM_REGISTER_GLOBAL("target.WithHost").set_body_typed(TargetInternal::WithHost);
+TVM_REGISTER_GLOBAL("target.TargetGetDeviceType").set_body_typed([](const
Target& target) {
Review Comment:
This function will check the attribute first, and if it's not set, it will
return the default. It also shortens the invocation of `GetAttr`. Let me know
what you'd prefer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]