Skip to content

Commit

Permalink
Update gcc version in CI (#5297)
Browse files Browse the repository at this point in the history
* update gcc version in ci image

* use gcc 9

* run bazel clean before compiling xla

* avoid remove nvcc

* do not remove old gcc which also removes nvcc

* change bazel cache key

* remove abslor patch

* update remote cache key for test script

* remove cuda graph patch and triton patch

* use gcc-8 to align with dev container

* update remote cache key for gcc-8

* Revert "update remote cache key for gcc-8"

This reverts commit ecd2964.

* Revert "use gcc-8 to align with dev container"

This reverts commit a93402f.

* try new cache key

* hack libstdc++ version

* hack libstdc++ version in test.sh

* Revert "hack libstdc++ version in test.sh"

This reverts commit dae89e8.

* rm all libstdc++ reference in conda

* Revert "remove cuda graph patch and triton patch"

This reverts commit f5015ff.
  • Loading branch information
lsy323 authored Jul 18, 2023
1 parent 1cb5a52 commit e7e1899
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 768 deletions.
2 changes: 1 addition & 1 deletion .circleci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sccache --show-stats

source $XLA_DIR/xla_env
export GCLOUD_SERVICE_KEY_FILE="$XLA_DIR/default_credentials.json"
export SILO_NAME='cache-silo-ci' # cache bucket for CI
export SILO_NAME='cache-silo-ci-gcc-11' # cache bucket for CI
build_torch_xla $XLA_DIR

popd
16 changes: 16 additions & 0 deletions .circleci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,22 @@ function install_deps_pytorch_xla() {

sudo ln -s "$(command -v bazelisk)" /usr/bin/bazel

# Install gcc-11
sudo apt-get update
# Update ppa for GCC
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update -y
sudo apt install -y gcc-11
sudo apt install -y g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100

export NVCC_PREPEND_FLAGS='-ccbin /usr/bin/g++-11'

# Hack similar to https://github.com/pytorch/pytorch/pull/105227/files#diff-9e59213240d3b55d2ddc53c8c096db9eece0665d64f46473454f9dc0c10fd804
sudo rm /opt/conda/lib/libstdc++.so*

# Symnlink the missing cuda headers if exists
CUBLAS_PATTERN="/usr/include/cublas*"
if ls $CUBLAS_PATTERN 1> /dev/null 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion .circleci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ function install_torchvision() {
install_torchvision

export GCLOUD_SERVICE_KEY_FILE="$XLA_DIR/default_credentials.json"
export SILO_NAME='cache-silo-ci' # cache bucket for CI
export SILO_NAME='cache-silo-ci-gcc-11' # cache bucket for CI
run_torch_xla_tests $PYTORCH_DIR $XLA_DIR $USE_COVERAGE
1 change: 0 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ http_archive(
],
patch_tool = "patch",
patches = [
"//openxla_patches:absl_statusor.diff",
"//openxla_patches:cache_urls.diff",
"//openxla_patches:cuda_graph.diff",
"//openxla_patches:f16_abi_clang.diff",
Expand Down
Loading

0 comments on commit e7e1899

Please sign in to comment.