Skip to content

Commit bc413b6

Browse files
lamikrScottTodd
andauthored
Update description how Triton version string is constructed (ROCm#1240)
- Updated the description how Triton version is constructed in setup.py. - This change originates from the comments on ROCm#1208 --------- Signed-off-by: Mika Laitio <mika.laitio@amd.com> Co-authored-by: Scott Todd <scott.todd0@gmail.com>
1 parent b45814f commit bc413b6

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

external-builds/pytorch/build_prod_wheels.py

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -469,14 +469,30 @@ def do_build_triton(
469469
) -> str:
470470
version_suffix = env.get("TRITON_WHEEL_VERSION_SUFFIX", "")
471471

472-
# If TRITON_WHEEL_VERSION_SUFFIX is not set, version format
473-
# for the build that is based on ROCm to 7.0.0rc20250728
474-
# will not be just a `3.3.1`.
475-
# If we are doing a Pytorch release/2.7 related Triton build,
476-
# then Triton version format will be:
472+
# Triton's setup.py constructs the final version string by using
473+
# a few components:
474+
# * Base version: `3.3.1`
475+
# * Version suffix
476+
#
477+
# Version suffix itself consist of from following two parts:
478+
# * git hash suffix:
479+
# * "+git<githash>" for development builds
480+
# * empty string "" for builds made from git release branches
481+
# * Additional version information is passed by using environment variable
482+
# TRITON_WHEEL_VERSION_SUFFIX
483+
# For example:
484+
# env["TRITON_WHEEL_VERSION_SUFFIX"] = "+rocm7.0.0rc20250728"
485+
#
486+
# Version suffix part of the version is allowed to have only a single
487+
# "+"-character. Therefore if there are multiple suffixes,
488+
# they are joined togeher with `-` characters
489+
# instead of `+` characters in Triton's setup.py so that
490+
# there is only a single `+` character after the base version.
491+
#
492+
# For example:
493+
# * PyTorch release/2.7 builds use Triton versions like:
477494
# 3.3.1+rocm7.0.0rc20250728
478-
# If we are doing a Pytorch nightly related Triton build,
479-
# then Triton version format will be:
495+
# * PyTorch nightly builds use Triton versions like:
480496
# 3.4.0+git12345678-rocm7.0.0rc20250728
481497
version_suffix += str(args.version_suffix)
482498
env["TRITON_WHEEL_VERSION_SUFFIX"] = version_suffix

0 commit comments

Comments
 (0)