Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
q10 committed Jan 9, 2025
1 parent c5a7077 commit e5c84d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/fbgemm_gpu_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ __configure_fbgemm_gpu_build_nvcc () {
}

__configure_fbgemm_gpu_cuda_home () {
if [[ "$BUILD_CUDA_VERSION" =~ ^12.6.*$ ]]; then
if ! [[ "$BUILD_CUDA_VERSION" =~ ^11.*$ ]]; then
# shellcheck disable=SC2155,SC2086
local conda_prefix=$(conda run ${env_prefix} printenv CONDA_PREFIX)
local new_cuda_home="${conda_prefix}/targets/${MACHINE_NAME_LC}-linux"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/utils_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ __remove_gcc_activation_scripts () {
# https://stackoverflow.com/questions/64289376/how-to-circumvent-anaconda-gcc-compiler
#
# shellcheck disable=SC2155,SC2086
if [[ "$BUILD_CUDA_VERSION" =~ ^12.6.*$ ]]; then
if ! [[ "$BUILD_CUDA_VERSION" =~ ^11.*$ ]]; then
echo "[INSTALL] Removing GCC package activation scripts ..."
local conda_prefix=$(conda run ${env_prefix} printenv CONDA_PREFIX)
print_exec ls -la ${conda_prefix}/etc/conda/activate.d
Expand Down
14 changes: 7 additions & 7 deletions .github/scripts/utils_cuda.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ __set_cuda_symlinks_envvars () {
local conda_prefix=$(conda run ${env_prefix} printenv CONDA_PREFIX)
local new_cuda_home="${conda_prefix}/targets/${MACHINE_NAME_LC}-linux"

if [[ "$BUILD_CUDA_VERSION" =~ ^12.6.*$ ]]; then
if ! [[ "$BUILD_CUDA_VERSION" =~ ^11.*$ ]]; then
# CUDA 12.6 installation has a very different package layout than previous
# CUDA versions - notably, NVTX has been moved elsewhere, which causes
# PyTorch CMake scripts to complain.
Expand Down Expand Up @@ -89,7 +89,7 @@ __set_nvcc_prepend_flags () {
# which overrides whatever `-ccbin` flag we set manually, so remove this
# unwanted hook
print_exec ls -la "${conda_prefix}/etc/conda/activate.d"
if [[ "$BUILD_CUDA_VERSION" =~ ^12.6.*$ ]]; then
if ! [[ "$BUILD_CUDA_VERSION" =~ ^11.*$ ]]; then
echo "[INSTALL] Removing the -ccbin=CXX hook from NVCC activation scripts ..."
print_exec sed -i '/-ccbin=/d' "${conda_prefix}/etc/conda/activate.d/*cuda-nvcc_activate.sh"
fi
Expand Down Expand Up @@ -192,14 +192,14 @@ install_cuda () {
# in the future, we will be using conda-forge for installing all CUDA versions
# (except for versions 11.8 and below, which are only available through
# nvidia/label/cuda-*)
if [[ "$BUILD_CUDA_VERSION" =~ ^12.6.*$ ]]; then
# shellcheck disable=SC2086
(exec_with_retries 3 conda install --force-reinstall ${env_prefix} -c conda-forge --override-channels -y \
cuda=${cuda_version}) || return 1
else
if [[ "$BUILD_CUDA_VERSION" =~ ^11.*$ ]]; then
# shellcheck disable=SC2086
(exec_with_retries 3 conda install --force-reinstall ${env_prefix} -c "nvidia/label/cuda-${cuda_version}" -y \
cuda) || return 1
else
# shellcheck disable=SC2086
(exec_with_retries 3 conda install --force-reinstall ${env_prefix} -c conda-forge --override-channels -y \
cuda=${cuda_version}) || return 1
fi

# Set the symlinks and environment variables not covered by conda install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fbgemm_gpu_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,5 @@ jobs:
run: . $PRELUDE; install_fbgemm_gpu_pip $BUILD_ENV ${{ github.event.inputs.fbgemm_gpu_channel_version || 'nightly' }} rocm/${{ matrix.rocm-version }}

- name: Test with PyTest
timeout-minutes: 20
timeout-minutes: 40
run: . $PRELUDE; test_all_fbgemm_gpu_modules $BUILD_ENV

0 comments on commit e5c84d7

Please sign in to comment.