From 3dea957dcff51e0702711ae40bde4982994dc3ad Mon Sep 17 00:00:00 2001 From: Benson Ma Date: Thu, 2 Jan 2025 16:16:12 -0800 Subject: [PATCH] Fix release workflows (#3536) Summary: X-link: https://github.com/facebookresearch/FBGEMM/pull/617 - Add env vars to release workflows to get CUDA 12.6 building correctly - Install GCC for updated LIBGCC in the release workflows Pull Request resolved: https://github.com/pytorch/FBGEMM/pull/3536 Reviewed By: sryap Differential Revision: D67774510 Pulled By: q10 fbshipit-source-id: ecf09ae72ba383aa81e5dca02dc46a9b6f5bbea1 --- .github/workflows/fbgemm_gpu_release_cuda.yml | 9 +++++++++ .github/workflows/fbgemm_gpu_release_genai.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/fbgemm_gpu_release_cuda.yml b/.github/workflows/fbgemm_gpu_release_cuda.yml index 0234c1da19..4a09693f43 100644 --- a/.github/workflows/fbgemm_gpu_release_cuda.yml +++ b/.github/workflows/fbgemm_gpu_release_cuda.yml @@ -62,6 +62,7 @@ jobs: PRELUDE: .github/scripts/setup_env.bash BUILD_ENV: build_binary BUILD_VARIANT: cuda + BUILD_CUDA_VERSION: ${{ matrix.cuda-version }} continue-on-error: true strategy: # Don't fast-fail all the other builds if one of the them fails @@ -136,6 +137,7 @@ jobs: PRELUDE: .github/scripts/setup_env.bash BUILD_ENV: build_binary BUILD_VARIANT: cuda + BUILD_CUDA_VERSION: ${{ matrix.cuda-version }} ENFORCE_CUDA_DEVICE: 1 strategy: fail-fast: false @@ -171,6 +173,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 CUDA run: . $PRELUDE; install_cuda $BUILD_ENV ${{ matrix.cuda-version }} diff --git a/.github/workflows/fbgemm_gpu_release_genai.yml b/.github/workflows/fbgemm_gpu_release_genai.yml index 238cf556d1..1e33070e54 100644 --- a/.github/workflows/fbgemm_gpu_release_genai.yml +++ b/.github/workflows/fbgemm_gpu_release_genai.yml @@ -62,6 +62,7 @@ jobs: PRELUDE: .github/scripts/setup_env.bash BUILD_ENV: build_binary BUILD_VARIANT: genai + BUILD_CUDA_VERSION: ${{ matrix.cuda-version }} continue-on-error: true strategy: # Don't fast-fail all the other builds if one of the them fails @@ -136,6 +137,7 @@ jobs: PRELUDE: .github/scripts/setup_env.bash BUILD_ENV: build_binary BUILD_VARIANT: genai + BUILD_CUDA_VERSION: ${{ matrix.cuda-version }} ENFORCE_CUDA_DEVICE: 1 strategy: fail-fast: false @@ -171,6 +173,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 CUDA run: . $PRELUDE; install_cuda $BUILD_ENV ${{ matrix.cuda-version }}