Skip to content

Commit d04d34c

Browse files
committed
Make PyTorch depend on TorchTrition
Remove me when Triton is properly released elsewhere
1 parent 17f7826 commit d04d34c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

conda/build_pytorch.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ retry () {
3131
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
3232
}
3333

34-
# Parse arguments and determmine version
34+
# Parse arguments and determine version
3535
###########################################################
3636
if [[ -n "$DESIRED_CUDA" && -n "$PYTORCH_BUILD_VERSION" && -n "$PYTORCH_BUILD_NUMBER" ]]; then
3737
desired_cuda="$DESIRED_CUDA"
@@ -245,7 +245,7 @@ fi
245245
meta_yaml="$build_folder/meta.yaml"
246246
echo "Using conda-build folder $build_folder"
247247

248-
# Switch between CPU or CUDA configerations
248+
# Switch between CPU or CUDA configurations
249249
###########################################################
250250
build_string_suffix="$PYTORCH_BUILD_NUMBER"
251251
if [[ -n "$cpu_only" ]]; then
@@ -279,6 +279,11 @@ else
279279
echo "unhandled desired_cuda: $desired_cuda"
280280
exit 1
281281
fi
282+
if [[ "$OSTYPE" != "msys" ]]; then
283+
# TODO: Remove me when Triton has a proper release channel
284+
TRITON_SHORTHASH=$(cut -c1-10 $pytorch_rootdir/.github/ci_commit_pins/triton.txt)
285+
export CONDA_CUDATOOLKIT_CONSTRAINT="${CONDA_CUDATOOLKIT_CONSTRAINT}\n - torchtriton==2.0.0+${TRITON_SHORTHASH}"
286+
fi
282287

283288
build_string_suffix="cuda${CUDA_VERSION}_cudnn${CUDNN_VERSION}_${build_string_suffix}"
284289
fi

0 commit comments

Comments
 (0)