File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -262,17 +262,20 @@ else
262
262
exit 1
263
263
fi
264
264
265
- # No triton dependency for now on 3.12 since we don't have binaries for it
266
- # and torch.compile doesn't work.
267
- if [[ $( uname) == " Linux" && " $DESIRED_PYTHON " != " 3.12" ]]; then
268
- TRITON_VERSION=$( cat $PYTORCH_ROOT /.ci/docker/triton_version.txt)
269
- TRITON_REQUIREMENT=" triton==${TRITON_VERSION} ; platform_system == 'Linux' and platform_machine == 'x86_64'"
270
265
271
- if [[ -z " $PYTORCH_EXTRA_INSTALL_REQUIREMENTS " ]]; then
272
- export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" ${TRITON_REQUIREMENT} "
273
- else
274
- export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" ${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${TRITON_REQUIREMENT} "
275
- fi
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
271
+ TRITON_SHORTHASH=$( cut -c1-10 $PYTORCH_ROOT /.github/ci_commit_pins/triton.txt)
272
+ TRITON_REQUIREMENT=" pytorch-triton==${TRITON_VERSION} +${TRITON_SHORTHASH} ; ${TRITON_CONSTRAINT} "
273
+ fi
274
+
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} "
276
279
fi
277
280
278
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