Skip to content

Commit

Permalink
[fbsync] dont reinstall CUDA in CMake / Windows workflow (#7648)
Browse files Browse the repository at this point in the history
Summary: Co-authored-by: Andrey Talman <atalman@fb.com>

Reviewed By: vmoens

Differential Revision: D46724122

fbshipit-source-id: 3f602fcbf7be96420502c2c847e29361a742a5df
  • Loading branch information
NicolasHug authored and facebook-github-bot committed Jun 14, 2023
1 parent 6bf287b commit 80337bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 144 deletions.
8 changes: 8 additions & 0 deletions .github/scripts/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ fi

echo '::endgroup::'

if [[ "${OS_TYPE}" == windows && "${GPU_ARCH_TYPE}" == cuda ]]; then
echo '::group::Install VisualStudio CUDA extensions on Windows'
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160/BuildCustomizations"
mkdir -p "${TARGET_DIR}"
cp -r "${CUDA_HOME}/MSBuildExtensions/"* "${TARGET_DIR}"
echo '::endgroup::'
fi

echo '::group::Install PyTorch'
# TODO: Can we maybe have this as environment variable in the job template? For example, `IS_RELEASE`.
if [[ (${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/build-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,6 @@ jobs:
source packaging/windows/internal/vc_install_helper.sh
# FIXME: Basically, we are reinstalling CUDA here. We only need this, because we need to copy some files that
# can be extracted from the CUDA installer, but are not available on our Windows AMI.
# See https://github.com/pytorch/test-infra/pull/4189
if [[ ${{ matrix.gpu-arch-type }} == cuda ]]; then
export CU_VERSION=cu$(echo ${{ matrix.gpu-arch-version }} | sed 's/\.//')
echo CU_VERSION="${CU_VERSION}"
packaging/windows/internal/cuda_install.bat
fi
export PYTHON_VERSION=3.8
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
Expand Down
135 changes: 0 additions & 135 deletions packaging/windows/internal/cuda_install.bat

This file was deleted.

0 comments on commit 80337bf

Please sign in to comment.