diff --git a/.github/scripts/fbgemm_gpu_install.bash b/.github/scripts/fbgemm_gpu_install.bash index 9dca7427d..c081c7e4c 100644 --- a/.github/scripts/fbgemm_gpu_install.bash +++ b/.github/scripts/fbgemm_gpu_install.bash @@ -180,8 +180,8 @@ install_fbgemm_gpu_pip () { echo "Usage: ${FUNCNAME[0]} ENV_NAME FBGEMM_GPU_CHANNEL[/VERSION] FBGEMM_GPU_VARIANT_TYPE[/VARIANT_VERSION]" echo "Example(s):" echo " ${FUNCNAME[0]} build_env 0.8.0 cpu # Install the CPU variant, specific version from release channel" - echo " ${FUNCNAME[0]} build_env release cuda/12.4.1 # Install the CUDA variant, latest version from release channel" - echo " ${FUNCNAME[0]} build_env test/0.8.0 cuda/12.4.1 # Install the CUDA 12.4 variant, specific version from test channel" + echo " ${FUNCNAME[0]} build_env release cuda/12.6.3 # Install the CUDA 12.3 variant, latest version from release channel" + echo " ${FUNCNAME[0]} build_env test/0.8.0 cuda/12.6.3 # Install the CUDA 12.3 variant, specific version from test channel" echo " ${FUNCNAME[0]} build_env nightly rocm/6.2 # Install the ROCM 6.2 variant, latest version from nightly channel" return 1 else diff --git a/.github/scripts/fbgemm_gpu_test.bash b/.github/scripts/fbgemm_gpu_test.bash index ff34f4791..7b0a788b3 100644 --- a/.github/scripts/fbgemm_gpu_test.bash +++ b/.github/scripts/fbgemm_gpu_test.bash @@ -336,10 +336,10 @@ test_setup_conda_environment () { local pytorch_channel_version="$5" local pytorch_variant_type="$6" local pytorch_variant_version="$7" - if [ "$pytorch_variant_type" == "" ]; then - echo "Usage: ${FUNCNAME[0]} ENV_NAME COMPILER PYTHON_VERSION PYTORCH_INSTALLER PYTORCH_CHANNEL[/VERSION] PYTORCH_VARIANT_TYPE [PYTORCH_VARIANT_VERSION]" + if [ "$pytorch_variant_version" == "" ]; then + echo "Usage: ${FUNCNAME[0]} ENV_NAME COMPILER PYTHON_VERSION PYTORCH_INSTALLER PYTORCH_CHANNEL[/VERSION] PYTORCH_VARIANT_TYPE PYTORCH_VARIANT_VERSION" echo "Example(s):" - echo " ${FUNCNAME[0]} build_env clang 3.13 pip test/1.0.0 cuda 12.4.1 # Setup environment with pytorch-test 1.0.0 for Clang + Python 3.13 + CUDA 12.4.1" + echo " ${FUNCNAME[0]} build_env clang 3.13 pip test/1.0.0 cuda 12.6.3 # Setup environment with pytorch-test 1.0.0 for Clang + Python 3.13 + CUDA 12.6.3" return 1 else echo "################################################################################" @@ -350,16 +350,13 @@ test_setup_conda_environment () { echo "" fi - if [ "$env_name" == "" ]; then - local env_name="test_py${python_version}_${pytorch_installer}_pytorch_${pytorch_channel_version}_${pytorch_variant_type}" - if [ "$pytorch_variant_version" != "" ]; then - local env_name="${env_name}_${pytorch_variant_version}" - fi - fi - echo "Creating the Build Environment: ${env_name} ..." create_conda_environment "${env_name}" "${python_version}" || return 1 + if [ "$pytorch_variant_type" == "cuda" ] || [ "$pytorch_variant_type" == "genai" ]; then + print_exec conda env config vars set -n "${env_name}" BUILD_CUDA_VERSION="${pytorch_variant_version}" + fi + # Install C++ compiler and build tools (all FBGEMM_GPU variants) if [ "$compiler" == "gcc" ] || [ "$compiler" == "clang" ]; then install_cxx_compiler "${env_name}" "${compiler}" || return 1 @@ -503,6 +500,7 @@ test_fbgemm_gpu_setup_and_pip_install () { local variant_versions=( 11.8.0 12.4.1 + 12.6.3 ) elif [ "$variant_type" == "rocm" ]; then local variant_versions=( diff --git a/.github/scripts/test_torchrec.bash b/.github/scripts/test_torchrec.bash index a9dbb6424..7d406ed40 100644 --- a/.github/scripts/test_torchrec.bash +++ b/.github/scripts/test_torchrec.bash @@ -84,7 +84,7 @@ setup_miniconda "$miniconda_prefix" echo "## 2. Create Conda environment" ################################################################################ -if [ "${cuda_version}" == "" ]; then +if [ "${cuda_version}" != "" ]; then pytorch_variant="cuda ${cuda_version}" else pytorch_variant="cpu" diff --git a/.github/scripts/utils_build.bash b/.github/scripts/utils_build.bash index 9fc88e449..d48601856 100644 --- a/.github/scripts/utils_build.bash +++ b/.github/scripts/utils_build.bash @@ -357,8 +357,8 @@ install_build_tools () { local conda_prefix=$(conda run ${env_prefix} printenv CONDA_PREFIX) (print_exec ln -s "${conda_prefix}/lib/librhash.so" "${conda_prefix}/lib/librhash.so.0") || return 1 - # For some reason, the build package for Python 3.12 is missing from Conda, so - # we have to install through PyPI instead. + # For some reason, the build package for Python 3.12+ is missing from conda, + # so we have to install through pip instead. # # LibMambaUnsatisfiableError: Encountered problems while solving: # - package build-0.10.0-py310h06a4308_0 requires python >=3.10,<3.11.0a0, but none of the providers can be installed diff --git a/.github/workflows/fbgemm_gpu_docs.yml b/.github/workflows/fbgemm_gpu_docs.yml index 126269fac..f1bb9e64f 100644 --- a/.github/workflows/fbgemm_gpu_docs.yml +++ b/.github/workflows/fbgemm_gpu_docs.yml @@ -42,7 +42,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.12" ] + python-version: [ "3.13" ] steps: - name: Setup Build Container diff --git a/.github/workflows/fbgemm_gpu_pip.yml b/.github/workflows/fbgemm_gpu_pip.yml index 2b3c3c5e8..65a0f4fd7 100644 --- a/.github/workflows/fbgemm_gpu_pip.yml +++ b/.github/workflows/fbgemm_gpu_pip.yml @@ -26,12 +26,12 @@ on: workflow_dispatch: inputs: pytorch_version: - description: PyTorch Version (e.g. '2.1.0', 'nightly', 'test') + description: PyTorch Version (e.g. '2.6.0', 'nightly', 'test') type: string required: true default: "nightly" fbgemm_gpu_channel_version: - description: FBGEMM-GPU Channel + Version (e.g. '0.5.0', 'nightly', 'test/0.8.0r0') + description: FBGEMM-GPU Channel + Version (e.g. '1.1.0', 'nightly', 'test/1.0.0r1') type: string required: true default: "nightly" @@ -85,6 +85,9 @@ jobs: - name: Create Conda Environment run: . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }} + - name: Install C/C++ Compilers for Updated LIBGCC + run: . $PRELUDE; install_cxx_compiler $BUILD_ENV ${{ matrix.compiler }} + - name: Install Build Tools run: . $PRELUDE; install_build_tools $BUILD_ENV @@ -113,6 +116,7 @@ jobs: PRELUDE: .github/scripts/setup_env.bash BUILD_ENV: test_install BUILD_VARIANT: cuda + BUILD_CUDA_VERSION: ${{ matrix.cuda-version }} ENFORCE_CUDA_DEVICE: 1 strategy: fail-fast: false @@ -143,6 +147,13 @@ jobs: - name: Create Conda Environment run: . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }} + - name: Install C/C++ Compilers for Updated LIBGCC + # NOTE: gcc is required for torch dynamo to work properly, as some of + # the compilation flags used by torch dynamo are gcc-specific: + # + # clang-16: error: unknown argument: '-fno-tree-loop-vectorize' + run: . $PRELUDE; install_cxx_compiler $BUILD_ENV gcc + - name: Install Build Tools run: . $PRELUDE; install_build_tools $BUILD_ENV @@ -213,6 +224,9 @@ jobs: - name: Create Conda Environment run: . $PRELUDE; create_conda_environment $BUILD_ENV ${{ matrix.python-version }} + - name: Install ROCm AMD-SMI + run: . $PRELUDE; install_rocm_amdsmi_ubuntu $BUILD_ENV + - name: Install Build Tools run: . $PRELUDE; install_build_tools $BUILD_ENV diff --git a/cmake/modules/CxxCompilerSetup.cmake b/cmake/modules/CxxCompilerSetup.cmake index 11fb3f891..c46a4ae57 100644 --- a/cmake/modules/CxxCompilerSetup.cmake +++ b/cmake/modules/CxxCompilerSetup.cmake @@ -43,14 +43,6 @@ endif() set(CMAKE_C_EXTENSIONS OFF) set(CMAKE_C_STANDARD_REQUIRED ON) -if(DEFINED GLIBCXX_USE_CXX11_ABI) - if(${GLIBCXX_USE_CXX11_ABI} EQUAL 1) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=1") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0") - endif() -endif() - BLOCK_PRINT( "Default C compiler flags" "(values may be overridden by CMAKE_CXX_STANDARD and CXX_STANDARD):" diff --git a/fbgemm_gpu/docs/src/fbgemm_gpu-development/InstallationInstructions.rst b/fbgemm_gpu/docs/src/fbgemm_gpu-development/InstallationInstructions.rst index 3a89fa319..ca68c3010 100644 --- a/fbgemm_gpu/docs/src/fbgemm_gpu-development/InstallationInstructions.rst +++ b/fbgemm_gpu/docs/src/fbgemm_gpu-development/InstallationInstructions.rst @@ -25,8 +25,8 @@ older than the one that the FBGEMM release corresponds to. | FBGEMM Release | Corresponding | Supported | Supported | (Experimental) Supported | | | PyTorch Release | Python Versions | CUDA Versions | ROCm Versions | +=================+==================+==================+================+===========================+ -| 1.1.0 | 2.6.x | 3.9, 3.10, 3.11, | 11.8, 12.4 | 6.0, 6.1 | -| | | 3.12, 3.13 | | | +| 1.1.0 | 2.6.x | 3.9, 3.10, 3.11, | 11.8, 12.4, | 6.0, 6.1 | +| | | 3.12, 3.13 | 12.6 | | +-----------------+------------------+------------------+----------------+---------------------------+ | 1.0.0 | 2.5.x | 3.9, 3.10, 3.11, | 11.8, 12.1, | 6.0, 6.1 | | | | 3.12 | 12.4 | | diff --git a/fbgemm_gpu/setup.py b/fbgemm_gpu/setup.py index e1ce32031..7dc172cb1 100644 --- a/fbgemm_gpu/setup.py +++ b/fbgemm_gpu/setup.py @@ -237,7 +237,9 @@ def _get_cxx11_abi(): value = int(torch._C._GLIBCXX_USE_CXX11_ABI) except ImportError: value = 0 - return "-DGLIBCXX_USE_CXX11_ABI=" + str(value) + # NOTE: The correct spelling for the flag is + # `_GLIBCXX_USE_CXX11_ABI`, not `GLIBCXX_USE_CXX11_ABI` + return f"-D_GLIBCXX_USE_CXX11_ABI={value}" torch_root = os.path.dirname(torch.__file__) os.environ["CMAKE_BUILD_PARALLEL_LEVEL"] = str(os.cpu_count() // 2) diff --git a/netlify.toml b/netlify.toml index 7e06c3e6b..940b1acdd 100644 --- a/netlify.toml +++ b/netlify.toml @@ -18,7 +18,7 @@ # Set up Conda environment setup_miniconda $HOME/miniconda - create_conda_environment $BUILD_ENV 3.12 + create_conda_environment $BUILD_ENV 3.13 # Install tools install_cxx_compiler $BUILD_ENV