Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/docker/ci_commit_pins/triton.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4ed888920c5a0871957f1cf912e557bc79fbe56c
0f380657dbf3ee86eb57558ff71df24f03b5d4e7
8 changes: 6 additions & 2 deletions .ci/docker/common/install_triton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ else
fi

# The logic here is copied from .ci/pytorch/common_utils.sh
TRITON_PINNED_COMMIT=$(get_pinned_commit ${TRITON_TEXT_FILE})
if [ "${TRITON_TEXT_FILE}" = "triton" ]; then
TRITON_REF="release/internal/3.6.x"
else
TRITON_REF=$(get_pinned_commit ${TRITON_TEXT_FILE})
fi

if [ -n "${UBUNTU_VERSION}" ];then
apt update
Expand All @@ -49,7 +53,7 @@ pushd /var/lib/jenkins/

as_jenkins git clone --recursive ${TRITON_REPO} triton
cd triton
as_jenkins git checkout ${TRITON_PINNED_COMMIT}
as_jenkins git checkout ${TRITON_REF}
as_jenkins git submodule update --init --recursive

# Old versions of python have setup.py in ./python; newer versions have it in ./
Expand Down
17 changes: 12 additions & 5 deletions .github/scripts/build_triton_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,24 +101,31 @@ def build_triton(
triton_basedir = Path(tmpdir) / "triton"
triton_pythondir = triton_basedir / "python"

triton_repo = "https://github.com/openai/triton"
triton_repo = "https://github.com/ROCm/triton"
if device == "rocm":
triton_repo = "https://github.com/ROCm/triton"
triton_pkg_name = "triton"
elif device == "xpu":
triton_pkg_name = "triton-xpu"
triton_repo = "https://github.com/intel/intel-xpu-backend-for-triton"
else:
triton_pkg_name = "triton"
check_call(["git", "clone", triton_repo, "triton"], cwd=tmpdir)
if release:
if device == "xpu" and release:
ver, rev, patch = version.split(".")
# XPU uses the patch version in the release branch name
check_call(
["git", "checkout", f"release/{ver}.{rev}.x"], cwd=triton_basedir
["git", "checkout", f"release/{ver}.{rev}.{patch}"],
cwd=triton_basedir,
)
else:
elif device == "xpu":
check_call(["git", "fetch", "origin", commit_hash], cwd=triton_basedir)
check_call(["git", "checkout", commit_hash], cwd=triton_basedir)
else:
ver, rev, _patch = version.split(".")
check_call(
["git", "checkout", f"release/internal/{ver}.{rev}.x"],
cwd=triton_basedir,
)

# change built wheel name and version
env["TRITON_WHEEL_NAME"] = triton_pkg_name
Expand Down