junrushao1994 commented on a change in pull request #6369:
URL: https://github.com/apache/incubator-tvm/pull/6369#discussion_r485830761
##########
File path: python/tvm/target/tag.py
##########
@@ -57,14 +60,14 @@ def register_tag(name: str, config: Dict[str, Any],
override: bool = False) -> T
"arch": "sm_61",
})
"""
- return _ffi_api.TargetTagAddTag(name, config, override)
+ if hasattr(_ffi_api, "TargetTagAddTag"):
+ return _ffi_api.TargetTagAddTag(name, config, override)
+ return None
-# We do a round of tag listing on loading time to verify all tag information
-if hasattr(_ffi_api, "TargetTagAddTag"):
- list_tags()
+list_tags()
- register_tag("nvidia/gtx1080ti", config={
- "kind": "cuda",
- "arch": "sm_61",
- })
+register_tag("nvidia/gtx1080ti", config={
+ "kind": "cuda",
+ "arch": "sm_61",
+})
Review comment:
I will add this sentence to the code comments.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]