diff --git a/.ci/docker/ci_commit_pins/triton.txt b/.ci/docker/ci_commit_pins/triton.txt index c3491fd3c6577..396be2dd54aee 100644 --- a/.ci/docker/ci_commit_pins/triton.txt +++ b/.ci/docker/ci_commit_pins/triton.txt @@ -1 +1 @@ -0d4682f073ded4d1a8260dd4208a43d735ae3a2b +6da9e66008b58a7b8553f96c69021cca0d0028f0 diff --git a/.circleci/scripts/binary_populate_env.sh b/.circleci/scripts/binary_populate_env.sh index 037ba979cb10d..d4ee499352e30 100755 --- a/.circleci/scripts/binary_populate_env.sh +++ b/.circleci/scripts/binary_populate_env.sh @@ -71,52 +71,6 @@ fi export PYTORCH_BUILD_NUMBER=1 -# Set triton version as part of PYTORCH_EXTRA_INSTALL_REQUIREMENTS -TRITON_VERSION=$(cat $PYTORCH_ROOT/.ci/docker/triton_version.txt) - -# Here PYTORCH_EXTRA_INSTALL_REQUIREMENTS is already set for the all the wheel builds hence append TRITON_CONSTRAINT -TRITON_CONSTRAINT="platform_system == 'Linux' and platform_machine == 'x86_64' and python_version != '3.13t'" -if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "${PYTORCH_EXTRA_INSTALL_REQUIREMENTS:-}" ]]; then - TRITON_REQUIREMENT="triton==${TRITON_VERSION}; ${TRITON_CONSTRAINT}" - # Only linux Python <= 3.13, not 3.13t are supported wheels for triton - if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then - TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton.txt) - TRITON_REQUIREMENT="pytorch-triton==${TRITON_VERSION}+git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" - fi - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${TRITON_REQUIREMENT}" -fi - -# This part is done in the builder scripts so commenting the duplicate code -: <<'BLOCK_COMMENT' -# Set triton via PYTORCH_EXTRA_INSTALL_REQUIREMENTS for triton rocm package -if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*rocm.* && $(uname) == "Linux" ]]; then - TRITON_REQUIREMENT="pytorch-triton-rocm==${TRITON_VERSION}; ${TRITON_CONSTRAINT}" - if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then - TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton.txt) - TRITON_REQUIREMENT="pytorch-triton-rocm==${TRITON_VERSION}+git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" - fi - if [[ -z "${PYTORCH_EXTRA_INSTALL_REQUIREMENTS:-}" ]]; then - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${TRITON_REQUIREMENT}" - else - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${TRITON_REQUIREMENT}" - fi -fi -BLOCK_COMMENT - -# Set triton via PYTORCH_EXTRA_INSTALL_REQUIREMENTS for triton xpu package -if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*xpu.* && $(uname) == "Linux" ]]; then - TRITON_REQUIREMENT="pytorch-triton-xpu==${TRITON_VERSION}; ${TRITON_CONSTRAINT}" - if [[ -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_BUILD_VERSION" =~ .*dev.* ]]; then - TRITON_SHORTHASH=$(cut -c1-8 $PYTORCH_ROOT/.ci/docker/ci_commit_pins/triton-xpu.txt) - TRITON_REQUIREMENT="pytorch-triton-xpu==${TRITON_VERSION}+git${TRITON_SHORTHASH}; ${TRITON_CONSTRAINT}" - fi - if [[ -z "${PYTORCH_EXTRA_INSTALL_REQUIREMENTS:-}" ]]; then - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${TRITON_REQUIREMENT}" - else - export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${TRITON_REQUIREMENT}" - fi -fi - USE_GLOO_WITH_OPENSSL="ON" if [[ "$GPU_ARCH_TYPE" =~ .*aarch64.* ]]; then USE_GLOO_WITH_OPENSSL="OFF" diff --git a/.github/scripts/build_triton_wheel.py b/.github/scripts/build_triton_wheel.py index 8cb0872a89c02..30af2064a7877 100644 --- a/.github/scripts/build_triton_wheel.py +++ b/.github/scripts/build_triton_wheel.py @@ -94,7 +94,7 @@ def build_triton( # Nightly binaries include the triton commit hash, i.e. 2.1.0+e6216047b8 # while release build should only include the version, i.e. 2.1.0 rocm_version = get_rocm_version() - version_suffix = f"+rocm{rocm_version}_{commit_hash[:10]}" + version_suffix = f"+rocm{rocm_version}.git{commit_hash[:8]}" version += version_suffix with TemporaryDirectory() as tmpdir: @@ -103,6 +103,7 @@ def build_triton( triton_repo = "https://github.com/openai/triton" if device == "rocm": triton_pkg_name = "pytorch-triton-rocm" + triton_repo = "https://github.com/ROCm/triton" elif device == "xpu": triton_pkg_name = "pytorch-triton-xpu" triton_repo = "https://github.com/intel/intel-xpu-backend-for-triton" @@ -168,6 +169,7 @@ def build_triton( # change built wheel name and version env["TRITON_WHEEL_NAME"] = triton_pkg_name + env["TRITON_WHEEL_VERSION_SUFFIX"] = version_suffix if with_clang_ldd: env["TRITON_BUILD_WITH_CLANG_LLD"] = "1" @@ -183,8 +185,6 @@ def build_triton( cwd=triton_basedir, shell=True, ) - cur_rocm_ver = get_rocm_version() - check_call(["scripts/amd/setup_rocm_libs.sh", cur_rocm_ver], cwd=triton_basedir) print("ROCm libraries setup for triton installation...") check_call( diff --git a/CMakeLists.txt b/CMakeLists.txt index c0ad29064c802..5ed6a5c4203d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,11 +54,11 @@ set(CMAKE_C_STANDARD # ---[ Utils include(cmake/public/utils.cmake) -# --- [ Check that minimal gcc version is 9.3+ -if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.3) +# --- [ Check that minimal gcc version is 9.2+ +if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.2) message( FATAL_ERROR - "GCC-9.3 or newer is required to compile PyTorch, but found ${CMAKE_CXX_COMPILER_VERSION}" + "GCC-9.2 or newer is required to compile PyTorch, but found ${CMAKE_CXX_COMPILER_VERSION}" ) endif()