junrushao1994 edited a comment on pull request #9599: URL: https://github.com/apache/tvm/pull/9599#issuecomment-981978677
Aha I got it now. Thanks @leandron for the explanation! The problem could go away if we do not create dummy `Target`s in TVMC if users don't specify them explicitly, and to make this happen, we could improve the implementation of the API `ListTargetKindOptions`: https://github.com/apache/tvm/blob/f32042f98b1948d7be468969d705acc44b9b1cbe/src/target/target_kind.cc#L52-L58 Right now it takes a TargetKind object and returns its `key2vtype_` member. And to construct a `TargetKind` object, TVMC has to create dummy Targets and then extract its `kind` field. https://github.com/apache/tvm/blob/515fc88e71c8df94ed7bd6eae42103f34ac1f570/python/tvm/driver/tvmc/target.py#L56 Alternatively, it's possible to avoid doing so by wrapping it with a method that takes a string: ```C++ Map<String, String> ListTargetKindOptions(const String& target_kind_name) { return TargetKindRegEntry::ListTargetKindOptions(TargetKind::Get(target_kind_name).value()); } ``` -- 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]
