@@ -45,20 +45,44 @@ jobs:
45
45
conda info
46
46
python --version
47
47
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
+
48
72
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
50
74
conda run -n build_binary \
51
- python -c "import torch"
75
+ python -c "import torch; print(torch.__version__, torch.version.cuda); "
52
76
echo "torch succeeded"
53
77
conda run -n build_binary \
54
78
python -c "import torch.distributed"
55
79
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
57
81
conda run -n build_binary \
58
- python -c "import fbgemm_gpu"
82
+ python -c "import torch; import fbgemm_gpu; print(fbgemm_gpu.__version__) "
59
83
echo "fbgemm_gpu succeeded"
60
84
conda run -n build_binary \
61
- pip install -r requirements.txt
85
+ pip install --pre - r requirements.txt
62
86
conda run -n build_binary \
63
87
python setup.py bdist_wheel \
64
88
--python-tag=${{ matrix.python-tag }}
73
97
python -m pytest torchrec -v -s -W ignore::pytest.PytestCollectionWarning --continue-on-collection-errors \
74
98
--ignore-glob=**/test_utils/
75
99
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
79
100
conda install -n build_binary -c anaconda redis -y
80
101
conda run -n build_binary redis-server --daemonize yes
81
102
mkdir cpp-build
0 commit comments