You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/04/29 17:33:59 UTC

[GitHub] [tvm] tqchen opened a new pull request #7948: [DOCS] Update to show github version

tqchen opened a new pull request #7948:
URL: https://github.com/apache/tvm/pull/7948


   


-- 
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:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on a change in pull request #7948: [DOCS] Update to show github version

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #7948:
URL: https://github.com/apache/tvm/pull/7948#discussion_r624273784



##########
File path: docs/conf.py
##########
@@ -47,18 +47,32 @@
 # General information about the project.
 project = "tvm"
 author = "Apache Software Foundation"
-copyright = "2020, %s" % author
+copyright = "2020 - 2021, %s" % author
 github_doc_root = "https://github.com/apache/tvm/tree/main/docs/"
 
 os.environ["TVM_BUILD_DOC"] = "1"
+
+
+def git_describe_version(original_version):
+    """Get git describe version."""
+    ver_py = os.path.join(curr_path, "..", "version.py")
+    libver = {"__file__": ver_py}
+    exec(compile(open(ver_py, "rb").read(), ver_py, "exec"), libver, libver)
+    _, gd_version = libver["git_describe_version"]()
+    if gd_version != original_version:
+        print("Use git describe based version %s" % gd_version)
+    return gd_version
+
+
 # Version information.
 import tvm
 from tvm import topi
 from tvm import te
 from tvm import testing
 
-version = tvm.__version__
-release = tvm.__version__
+version = git_describe_version(tvm.__version__)
+version = version

Review comment:
       Good catch. should be release = version




-- 
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:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on pull request #7948: [DOCS] Update to show github version

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #7948:
URL: https://github.com/apache/tvm/pull/7948#issuecomment-830697859


   THanks @jcf94 please take another look


-- 
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:
users@infra.apache.org



[GitHub] [tvm] jcf94 commented on a change in pull request #7948: [DOCS] Update to show github version

Posted by GitBox <gi...@apache.org>.
jcf94 commented on a change in pull request #7948:
URL: https://github.com/apache/tvm/pull/7948#discussion_r623566715



##########
File path: docs/conf.py
##########
@@ -47,18 +47,32 @@
 # General information about the project.
 project = "tvm"
 author = "Apache Software Foundation"
-copyright = "2020, %s" % author
+copyright = "2020 - 2021, %s" % author
 github_doc_root = "https://github.com/apache/tvm/tree/main/docs/"
 
 os.environ["TVM_BUILD_DOC"] = "1"
+
+
+def git_describe_version(original_version):
+    """Get git describe version."""
+    ver_py = os.path.join(curr_path, "..", "version.py")
+    libver = {"__file__": ver_py}
+    exec(compile(open(ver_py, "rb").read(), ver_py, "exec"), libver, libver)
+    _, gd_version = libver["git_describe_version"]()
+    if gd_version != original_version:
+        print("Use git describe based version %s" % gd_version)
+    return gd_version
+
+
 # Version information.
 import tvm
 from tvm import topi
 from tvm import te
 from tvm import testing
 
-version = tvm.__version__
-release = tvm.__version__
+version = git_describe_version(tvm.__version__)
+version = version

Review comment:
       Duplicate code ?




-- 
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:
users@infra.apache.org



[GitHub] [tvm] junrushao1994 merged pull request #7948: [DOCS] Update to show github version

Posted by GitBox <gi...@apache.org>.
junrushao1994 merged pull request #7948:
URL: https://github.com/apache/tvm/pull/7948


   


-- 
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:
users@infra.apache.org



[GitHub] [tvm] jcf94 commented on a change in pull request #7948: [DOCS] Update to show github version

Posted by GitBox <gi...@apache.org>.
jcf94 commented on a change in pull request #7948:
URL: https://github.com/apache/tvm/pull/7948#discussion_r623566715



##########
File path: docs/conf.py
##########
@@ -47,18 +47,32 @@
 # General information about the project.
 project = "tvm"
 author = "Apache Software Foundation"
-copyright = "2020, %s" % author
+copyright = "2020 - 2021, %s" % author
 github_doc_root = "https://github.com/apache/tvm/tree/main/docs/"
 
 os.environ["TVM_BUILD_DOC"] = "1"
+
+
+def git_describe_version(original_version):
+    """Get git describe version."""
+    ver_py = os.path.join(curr_path, "..", "version.py")
+    libver = {"__file__": ver_py}
+    exec(compile(open(ver_py, "rb").read(), ver_py, "exec"), libver, libver)
+    _, gd_version = libver["git_describe_version"]()
+    if gd_version != original_version:
+        print("Use git describe based version %s" % gd_version)
+    return gd_version
+
+
 # Version information.
 import tvm
 from tvm import topi
 from tvm import te
 from tvm import testing
 
-version = tvm.__version__
-release = tvm.__version__
+version = git_describe_version(tvm.__version__)
+version = version

Review comment:
       `version = version` Duplicate code ?




-- 
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:
users@infra.apache.org