@@ -118,7 +118,7 @@ do_lightweight_build() {
118118 else
119119 BUILD_SCRIPT=build_libtorch.sh
120120 fi
121- export WHEELNAME_MARKER=" ${LIGHTWEIGHT_WHEELNAME_MARKER} "
121+ export WHEELNAME_MARKER=" ${LIGHTWEIGHT_WHEELNAME_MARKER} "
122122 source " $SCRIPTPATH /${BUILD_SCRIPT} "
123123
124124 echo " === Done building LIGHTWEIGHT variant ==="
@@ -152,7 +152,7 @@ do_heavyweight_build() {
152152 " libroctracer64.so"
153153 " libroctx64.so"
154154 )
155-
155+
156156 # Adjust list based on ROCm version
157157 if [[ $ROCM_INT -ge 60100 ]]; then
158158 HEAVYWEIGHT_ROCM_SO_FILES+=(" librocprofiler-register.so" )
@@ -165,8 +165,8 @@ do_heavyweight_build() {
165165 HEAVYWEIGHT_ROCM_SO_FILES+=(" libhipsparselt.so" )
166166 HEAVYWEIGHT_ROCM_SO_FILES+=(" librocprofiler-sdk.so" )
167167 fi
168-
169-
168+
169+
170170 OS_NAME=` awk -F= ' /^NAME/{print $2}' /etc/os-release`
171171 if [[ " $OS_NAME " == * " CentOS Linux" * || " $OS_NAME " == * " AlmaLinux" * ]]; then
172172 LIBGOMP_PATH=" /usr/lib64/libgomp.so.1"
@@ -246,15 +246,15 @@ do_heavyweight_build() {
246246 file_name=" ${lib##*/ } " # Substring removal of path to get filename
247247 OS_SO_FILES[${# OS_SO_FILES[@]} ]=$file_name # Append lib to array
248248 done
249-
249+
250250 # rocBLAS library files
251251 ROCBLAS_LIB_SRC=$ROCM_HOME /lib/rocblas/library
252252 ROCBLAS_LIB_DST=lib/rocblas/library
253253 ARCH=$( echo $PYTORCH_ROCM_ARCH | sed ' s/;/|/g' ) # Replace ; seperated arch list to bar for grep
254254 ARCH_SPECIFIC_FILES=$( ls $ROCBLAS_LIB_SRC | grep -E $ARCH )
255255 OTHER_FILES=$( ls $ROCBLAS_LIB_SRC | grep -v gfx)
256256 ROCBLAS_LIB_FILES=($ARCH_SPECIFIC_FILES $OTHER_FILES )
257-
257+
258258 # hipblaslt library files
259259 HIPBLASLT_LIB_SRC=$ROCM_HOME /lib/hipblaslt/library
260260 HIPBLASLT_LIB_DST=lib/hipblaslt/library
@@ -354,11 +354,12 @@ if [ ${PYTORCH_VERSION%%\.*} -ge 2 ]; then
354354 TRITON_SHORTHASH=$( cut -c1-8 $PYTORCH_ROOT /.ci/docker/ci_commit_pins/triton-rocm.txt)
355355 fi
356356 TRITON_VERSION=$( cat $PYTORCH_ROOT /.ci/docker/triton_version.txt)
357- # Only linux Python < 3.13 are supported wheels for triton
358- TRITON_CONSTRAINT=" platform_system == 'Linux' and platform_machine == 'x86_64'$( if [[ $( ver " $PYTORCH_VERSION " ) -le $( ver " 2.5" ) ]]; then echo " and python_version < '3.13'" ; fi) "
359-
360- if [[ -z " $PYTORCH_EXTRA_INSTALL_REQUIREMENTS " ]]; then
361- export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" pytorch-triton-rocm==${TRITON_VERSION} +${ROCM_VERSION_WITH_PATCH} .git${TRITON_SHORTHASH} ; ${TRITON_CONSTRAINT} "
357+ # Only linux Python < 3.13 are supported wheels for triton
358+ TRITON_CONSTRAINT=" platform_system == 'Linux' and platform_machine == 'x86_64'$( if [[ $( ver " $PYTORCH_VERSION " ) -le $( ver " 2.5" ) ]]; then echo " and python_version < '3.13'" ; fi) "
359+ # Use "triton" for dev builds, else "pytorch-triton-rocm"
360+ # Temp: Currently enabling for rocm7.1_internal_testing branch only but plan to expand it to other branches
361+ if [[ " $PYTORCH_VERSION_FULL " == * " 2.9.0a0" * ]]; then
362+ PKG=" triton"
362363 else
363364 export PYTORCH_EXTRA_INSTALL_REQUIREMENTS=" ${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | pytorch-triton-rocm==${TRITON_VERSION} +${ROCM_VERSION_WITH_PATCH} .git${TRITON_SHORTHASH} ; ${TRITON_CONSTRAINT} "
364365 fi
@@ -371,7 +372,7 @@ echo "PYTORCH_ROCM_ARCH: ${PYTORCH_ROCM_ARCH}"
371372export LIGHTWEIGHT_WHEELNAME_MARKER=" ${LIGHTWEIGHT_WHEELNAME_MARKER} "
372373SCRIPTPATH=" $( cd " $( dirname " $0 " ) " ; pwd -P ) "
373374if [[ -z " $BUILD_PYTHONLESS " ]]; then
374- BUILD_SCRIPT=build_torch_wheel.sh
375+ BUILD_SCRIPT=build_torch_wheel.sh
375376fi
376377source $SCRIPTPATH /${BUILD_SCRIPT}
377378if [[ " $BUILD_LIGHTWEIGHT " == " 1" ]]; then
0 commit comments