Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
TransformerEngine
Commits
98cb5ac7
Unverified
Commit
98cb5ac7
authored
Oct 20, 2022
by
Przemyslaw Tredak
Committed by
GitHub
Oct 20, 2022
Browse files
Add link to the documentation archives in the docs (#14)
Signed-off-by:
Przemek Tredak
<
ptredak@nvidia.com
>
parent
6a2161bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
docs/conf.py
docs/conf.py
+25
-2
No files found.
docs/conf.py
View file @
98cb5ac7
...
...
@@ -31,8 +31,31 @@ else:
project
=
u
'Transformer Engine'
copyright
=
u
'{}, NVIDIA CORPORATION & AFFILIATES. All rights reserved.'
.
format
(
copyright_year
)
author
=
u
'NVIDIA CORPORATION & AFFILIATES'
version
=
te_version
release
=
version
git_sha
=
os
.
getenv
(
"GIT_SHA"
)
if
not
git_sha
:
try
:
git_sha
=
subprocess
.
check_output
([
"git"
,
"log"
,
"--pretty=format:'%h'"
,
"-n1"
]).
decode
(
'ascii'
).
replace
(
"'"
,
""
).
strip
()
except
:
git_sha
=
u
'0000000'
git_sha
=
git_sha
[:
7
]
if
len
(
git_sha
)
>
7
else
git_sha
version
=
str
(
te_version
+
u
"-"
+
git_sha
)
release
=
te_version
# hack: version is used for html creation, so put the version picker
# link here as well:
option_on
=
" selected"
option_off
=
""
release_opt
=
option_on
option_nr
=
0
version
=
version
+
"""<br/>
Version select: <select onChange="window.location.href = this.value" onFocus="this.selectedIndex = {0}">
<option value="https://docs.nvidia.com/deeplearning/transformer-engine/user-guide/index.html"{1}>Current release</option>
<option value="https://docs.nvidia.com/deeplearning/transformer-engine/archives/index.html">Older releases</option>
</select>"""
.
format
(
option_nr
,
release_opt
)
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment