@@ -45,20 +45,44 @@ jobs:
4545 conda info
4646 python --version
4747 conda run -n build_binary python --version
48+
49+ echo "[INSTALL] Installing gcc..."
50+ conda install -n build_binary -c conda-forge -y gxx_linux-64=11.4.0 sysroot_linux-64=2.17
51+
52+ echo "[INSTALL] Setting the C/C++ compiler symlinks ..."
53+ cc_path=$(conda run -n build_binary printenv CC)
54+ cxx_path=$(conda run -n build_binary printenv CXX)
55+ ln -sf "${cc_path}" "$(dirname "$cc_path")/cc"
56+ ln -sf "${cc_path}" "$(dirname "$cc_path")/gcc"
57+ ln -sf "${cxx_path}" "$(dirname "$cxx_path")/c++"
58+ ln -sf "${cxx_path}" "$(dirname "$cxx_path")/g++"
59+
60+ conda_prefix=$(conda run -n build_binary printenv CONDA_PREFIX)
61+ echo "[INSTALL] Enumerating libstdc++.so files ..."
62+ all_libcxx_libs=$(find "${conda_prefix}/lib" -type f -name 'libstdc++.so*' -print | sort)
63+ for f in $all_libcxx_libs; do
64+ echo "$f";
65+ objdump -TC "$f" | grep GLIBCXX_ | sed 's/.*GLIBCXX_\([.0-9]*\).*/GLIBCXX_\1/g' | sort -Vu | cat
66+ echo ""
67+ done
68+
69+ echo "[INSTALL] Appending the Conda-installed libstdc++ to LD_PRELOAD ..."
70+ conda env config vars set -n build_binary LD_PRELOAD="${all_libcxx_libs[0]}"
71+
4872 conda run -n build_binary \
49- pip install torch --index-url https://download.pytorch.org/whl/nightly/cpu
73+ pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu/
5074 conda run -n build_binary \
51- python -c "import torch"
75+ python -c "import torch; print(torch.__version__, torch.version.cuda); "
5276 echo "torch succeeded"
5377 conda run -n build_binary \
5478 python -c "import torch.distributed"
5579 conda run -n build_binary \
56- pip install fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu
80+ pip install --pre fbgemm-gpu --index-url https://download.pytorch.org/whl/nightly/cpu/
5781 conda run -n build_binary \
58- python -c "import fbgemm_gpu"
82+ python -c "import torch; import fbgemm_gpu; print(fbgemm_gpu.__version__) "
5983 echo "fbgemm_gpu succeeded"
6084 conda run -n build_binary \
61- pip install -r requirements.txt
85+ pip install --pre - r requirements.txt
6286 conda run -n build_binary \
6387 python setup.py bdist_wheel \
6488 --python-tag=${{ matrix.python-tag }}
7397 python -m pytest torchrec -v -s -W ignore::pytest.PytestCollectionWarning --continue-on-collection-errors \
7498 --ignore-glob=**/test_utils/
7599 echo "Starting C++ Tests"
76- conda install -n build_binary -y gxx_linux-64
77- conda run -n build_binary \
78- x86_64-conda-linux-gnu-g++ --version
79100 conda install -n build_binary -c anaconda redis -y
80101 conda run -n build_binary redis-server --daemonize yes
81102 mkdir cpp-build
0 commit comments