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
0a5016b1
Commit
0a5016b1
authored
Dec 03, 2025
by
wenjh
Browse files
Merge nv release_v2.9
Signed-off-by:
wenjh
<
wenjh@sugon.com
>
parents
063ef88d
70f53666
Changes
61
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
transformer_engine/pytorch/setup.py
transformer_engine/pytorch/setup.py
+12
-2
No files found.
transformer_engine/pytorch/setup.py
View file @
0a5016b1
...
@@ -145,15 +145,25 @@ if __name__ == "__main__":
...
@@ -145,15 +145,25 @@ if __name__ == "__main__":
)
)
]
]
# Setup version and requirements.
# Having the framework extension depend on the core lib allows
# us to detect CUDA version dynamically during compilation and
# choose the correct wheel for te core lib.
__version__
=
te_version
()
cuda_major_version
=
parse
(
torch
.
version
.
cuda
).
major
assert
cuda_major_version
in
(
12
,
13
),
f
"Unsupported cuda version
{
torch
.
version
.
cuda
}
."
te_core
=
f
"transformer_engine_cu
{
cuda_major_version
}
==
{
__version__
}
"
install_requires
=
install_requirements
()
+
[
te_core
]
# Configure package
# Configure package
setuptools
.
setup
(
setuptools
.
setup
(
name
=
PACKAGE_NAME
,
name
=
PACKAGE_NAME
,
version
=
te
_version
()
,
version
=
_
_version
__
,
description
=
"Transformer acceleration library - Torch Lib"
,
description
=
"Transformer acceleration library - Torch Lib"
,
ext_modules
=
ext_modules
,
ext_modules
=
ext_modules
,
cmdclass
=
{
"build_ext"
:
CMakeBuildExtension
,
"bdist_wheel"
:
CachedWheelsCommand
},
cmdclass
=
{
"build_ext"
:
CMakeBuildExtension
,
"bdist_wheel"
:
CachedWheelsCommand
},
python_requires
=
f
">=
{
min_python_version_str
()
}
"
,
python_requires
=
f
">=
{
min_python_version_str
()
}
"
,
install_requires
=
install_require
ments
()
,
install_requires
=
install_require
s
,
tests_require
=
test_requirements
(),
tests_require
=
test_requirements
(),
)
)
if
any
(
x
in
sys
.
argv
for
x
in
(
"."
,
"sdist"
,
"bdist_wheel"
)):
if
any
(
x
in
sys
.
argv
for
x
in
(
"."
,
"sdist"
,
"bdist_wheel"
)):
...
...
Prev
1
2
3
4
Next
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