Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gcc version for FBGEMM install in CI #2654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/scripts/install_fbgemm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ echo "CHANNEL"
echo "$CHANNEL"

if [ "$CHANNEL" = "nightly" ]; then
${CONDA_RUN} pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/"$CU_VERSION"
${CONDA_RUN} pip install --pre fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/"$CU_VERSION"
elif [ "$CHANNEL" = "test" ]; then
${CONDA_RUN} pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/test/"$CU_VERSION"
${CONDA_RUN} pip install --pre fbgemm-gpu --index-url https://download.pytorch.org/whl/test/"$CU_VERSION"
fi
34 changes: 27 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
- name: Setup conda
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda
bash ~/miniconda.sh -b -p $HOME/miniconda -u
conda update -n base -c defaults -y conda
- name: setup Path
run: |
echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH
Expand All @@ -51,23 +52,42 @@ jobs:
- name: Install gcc
shell: bash
run: |
sudo apt-get install build-essential
conda install -n build_binary -c conda-forge -y gxx_linux-64=11.4.0 sysroot_linux-64=2.17
echo "[INSTALL] Setting the C/C++ compiler symlinks ..."
cc_path=$(conda run -n build_binary printenv CC)
cxx_path=$(conda run -n build_binary printenv CXX)
ln -sf "${cc_path}" "$(dirname "$cc_path")/cc"
ln -sf "${cc_path}" "$(dirname "$cc_path")/gcc"
ln -sf "${cxx_path}" "$(dirname "$cxx_path")/c++"
ln -sf "${cxx_path}" "$(dirname "$cxx_path")/g++"

conda_prefix=$(conda run -n build_binary printenv CONDA_PREFIX)
echo "[TEST] Enumerating libstdc++.so files ..."
all_libcxx_libs=$(find "${conda_prefix}/lib" -type f -name 'libstdc++.so*' -print | sort)
for f in $all_libcxx_libs; do
echo "$f";
objdump -TC "$f" | grep GLIBCXX_ | sed 's/.*GLIBCXX_\([.0-9]*\).*/GLIBCXX_\1/g' | sort -Vu | cat
echo ""
done

echo "[TEST] Appending the Conda-installed libstdc++ to LD_PRELOAD ..."
conda env config vars set -n build_binary LD_PRELOAD="${all_libcxx_libs[0]}"
- name: setup Path
run: |
echo /usr/local/bin >> $GITHUB_PATH
- name: Install PyTorch
shell: bash
run: |
conda install -n build_binary --yes pytorch cpuonly -c pytorch-nightly
conda run -n build_binary pip install --pre pytorch --index-url https://download.pytorch.org/whl/nightly/cpu/
- name: Install fbgemm
run: |
conda run -n build_binary pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu
conda run -n build_binary pip install --pre fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu/
- name: Install torchmetrics
run: |
conda run -n build_binary pip install torchmetrics==1.0.3
conda run -n build_binary pip install --pre torchmetrics
- name: Install TorchRec
run: |
conda run -n build_binary pip install -r requirements.txt
conda run -n build_binary pip install --pre -r requirements.txt
conda run -n build_binary python setup.py bdist_wheel --python-tag=${{ matrix.python-tag }}
- name: Test fbgemm_gpu and torchrec installation
shell: bash
Expand All @@ -78,7 +98,7 @@ jobs:
python -c "import torchrec"
- name: Build the docset
run: |
conda run -n build_binary python -m pip install -r docs/requirements.txt
conda run -n build_binary python -m pip install --pre -r docs/requirements.txt
cd ./docs
conda run -n build_binary make html
cd ..
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pyre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
uses: actions/checkout@v2
- name: Install dependencies
run: >
pip install torch --index-url https://download.pytorch.org/whl/nightly/cpu &&
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu &&
pip install -r requirements.txt &&
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu/ &&
pip install --pre fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu/ &&
pip install --pre -r requirements.txt &&
pip install pyre-check-nightly==$(cat .pyre_configuration | grep version | awk '{print $2}' | sed 's/\"//g')
- name: Pyre check
run: pyre check
26 changes: 23 additions & 3 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
bash ~/miniconda.sh -b -p $HOME/miniconda -u
conda update -n base -c defaults -y conda
- name: setup Path
run: |
echo "/home/ec2-user/miniconda/bin" >> $GITHUB_PATH
Expand All @@ -62,9 +63,28 @@ jobs:
- name: check python version
run: |
conda run -n build_binary python --version
- name: Install C/C++ compilers
run: |
sudo yum install -y gcc gcc-c++
- name: Install gcc
run: |
conda install -n build_binary -c conda-forge -y gxx_linux-64=11.4.0 sysroot_linux-64=2.17
echo "[INSTALL] Setting the C/C++ compiler symlinks ..."
cc_path=$(conda run -n build_binary printenv CC)
cxx_path=$(conda run -n build_binary printenv CXX)
ln -sf "${cc_path}" "$(dirname "$cc_path")/cc"
ln -sf "${cc_path}" "$(dirname "$cc_path")/gcc"
ln -sf "${cxx_path}" "$(dirname "$cxx_path")/c++"
ln -sf "${cxx_path}" "$(dirname "$cxx_path")/g++"

conda_prefix=$(conda run -n build_binary printenv CONDA_PREFIX)
echo "[TEST] Enumerating libstdc++.so files ..."
all_libcxx_libs=$(find "${conda_prefix}/lib" -type f -name 'libstdc++.so*' -print | sort)
for f in $all_libcxx_libs; do
echo "$f";
objdump -TC "$f" | grep GLIBCXX_ | sed 's/.*GLIBCXX_\([.0-9]*\).*/GLIBCXX_\1/g' | sort -Vu | cat
echo ""
done

echo "[TEST] Appending the Conda-installed libstdc++ to LD_PRELOAD ..."
conda env config vars set -n build_binary LD_PRELOAD="${all_libcxx_libs[0]}"
- name: Install PyTorch and CUDA
shell: bash
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unittest_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,19 @@ jobs:
python --version
conda run -n build_binary python --version
conda run -n build_binary \
pip install torch --index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda-tag }}
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda-tag }}
conda run -n build_binary \
python -c "import torch"
echo "torch succeeded"
conda run -n build_binary \
python -c "import torch.distributed"
conda run -n build_binary \
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda-tag }}
pip install --pre fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/${{ matrix.cuda-tag }}
conda run -n build_binary \
python -c "import fbgemm_gpu"
echo "fbgemm_gpu succeeded"
conda run -n build_binary \
pip install -r requirements.txt
pip install --pre -r requirements.txt
conda run -n build_binary \
python setup.py bdist_wheel \
--python-tag=${{ matrix.python-tag }}
Expand Down
37 changes: 29 additions & 8 deletions .github/workflows/unittest_ci_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,44 @@ jobs:
conda info
python --version
conda run -n build_binary python --version

echo "[INSTALL] Installing gcc..."
conda install -n build_binary -c conda-forge -y gxx_linux-64=11.4.0 sysroot_linux-64=2.17

echo "[INSTALL] Setting the C/C++ compiler symlinks ..."
cc_path=$(conda run -n build_binary printenv CC)
cxx_path=$(conda run -n build_binary printenv CXX)
ln -sf "${cc_path}" "$(dirname "$cc_path")/cc"
ln -sf "${cc_path}" "$(dirname "$cc_path")/gcc"
ln -sf "${cxx_path}" "$(dirname "$cxx_path")/c++"
ln -sf "${cxx_path}" "$(dirname "$cxx_path")/g++"

conda_prefix=$(conda run -n build_binary printenv CONDA_PREFIX)
echo "[INSTALL] Enumerating libstdc++.so files ..."
all_libcxx_libs=$(find "${conda_prefix}/lib" -type f -name 'libstdc++.so*' -print | sort)
for f in $all_libcxx_libs; do
echo "$f";
objdump -TC "$f" | grep GLIBCXX_ | sed 's/.*GLIBCXX_\([.0-9]*\).*/GLIBCXX_\1/g' | sort -Vu | cat
echo ""
done

echo "[INSTALL] Appending the Conda-installed libstdc++ to LD_PRELOAD ..."
conda env config vars set -n build_binary LD_PRELOAD="${all_libcxx_libs[0]}"

conda run -n build_binary \
pip install torch --index-url https://download.pytorch.org/whl/nightly/cpu
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu/
conda run -n build_binary \
python -c "import torch"
python -c "import torch; print(torch.__version__, torch.version.cuda); "
echo "torch succeeded"
conda run -n build_binary \
python -c "import torch.distributed"
conda run -n build_binary \
pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu
pip install --pre fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu/
conda run -n build_binary \
python -c "import fbgemm_gpu"
python -c "import torch; import fbgemm_gpu; print(fbgemm_gpu.__version__)"
echo "fbgemm_gpu succeeded"
conda run -n build_binary \
pip install -r requirements.txt
pip install --pre -r requirements.txt
conda run -n build_binary \
python setup.py bdist_wheel \
--python-tag=${{ matrix.python-tag }}
Expand All @@ -73,9 +97,6 @@ jobs:
python -m pytest torchrec -v -s -W ignore::pytest.PytestCollectionWarning --continue-on-collection-errors \
--ignore-glob=**/test_utils/
echo "Starting C++ Tests"
conda install -n build_binary -y gxx_linux-64
conda run -n build_binary \
x86_64-conda-linux-gnu-g++ --version
conda install -n build_binary -c anaconda redis -y
conda run -n build_binary redis-server --daemonize yes
mkdir cpp-build
Expand Down
Loading