File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -262,19 +262,20 @@ else
262
262
exit 1
263
263
fi
264
264
265
- # TODO: Remove me when Triton has a proper release channel
266
- # No triton dependency for now on 3.12 since we don't have binaries for it
267
- # and torch.compile doesn't work.
268
- if [[ $( uname) == " Linux" && " $DESIRED_PYTHON " != " 3.12" ]]; then
265
+
266
+ TRITON_VERSION=$( cat $PYTORCH_ROOT /.ci/docker/triton_version.txt)
267
+ # Only linux Python < 3.12 are supported wheels for triton
268
+ TRITON_CONSTRAINT=" platform_system == 'Linux' and platform_machine == 'x86_64' and python_version < '3.12'"
269
+ TRITON_REQUIREMENT=" pytorch-triton==${TRITON_VERSION} ; ${TRITON_CONSTRAINT} "
270
+ if [[ -n " $OVERRIDE_PACKAGE_VERSION " && " $OVERRIDE_PACKAGE_VERSION " =~ .* dev.* ]]; then
269
271
TRITON_SHORTHASH=$( cut -c1-10 $PYTORCH_ROOT /.github/ci_commit_pins/triton.txt)
270
- TRITON_VERSION= $( cat $PYTORCH_ROOT /.ci/docker/triton_version.txt )
271
- TRITON_REQUIREMENT= " pytorch-triton== ${TRITON_VERSION} + ${TRITON_SHORTHASH} ; platform_system == 'Linux' and platform_machine == 'x86_64' "
272
+ TRITON_REQUIREMENT= " pytorch-triton== ${TRITON_VERSION} + ${TRITON_SHORTHASH} ; ${TRITON_CONSTRAINT} "
273
+ fi
272
274
273
- if [[ -z " $PYTORCH_EXTRA_INSTALL_REQUIREMENTS " ]]; then
274
- export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" ${TRITON_REQUIREMENT} "
275
- else
276
- export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" ${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${TRITON_REQUIREMENT} "
277
- fi
275
+ if [[ -z " $PYTORCH_EXTRA_INSTALL_REQUIREMENTS " ]]; then
276
+ export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" ${TRITON_REQUIREMENT} "
277
+ else
278
+ export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" ${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${TRITON_REQUIREMENT} "
278
279
fi
279
280
280
281
# builder/test.sh requires DESIRED_CUDA to know what tests to exclude
You can’t perform that action at this time.
0 commit comments