Skip to content

Commit

Permalink
Improve dependency handling for llvm-install intel-mlperf-inference
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed May 14, 2024
1 parent 0b899a5 commit 184d043
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
14 changes: 14 additions & 0 deletions script/install-llvm-src/_cm.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,20 @@
"+ CXXFLAGS": [ "-Wno-nonnull", "-Wno-maybe-uninitialized", "-Wno-uninitialized", "-Wno-free-nonheap-object" ]
}
},
{
"names": [
"conda-package",
"typing-extensions"
],
"tags": "get,generic,conda-package,_package.typing-extensions,_source.conda-forge"
},
{
"names": [
"conda-package",
"sympy"
],
"tags": "get,generic,conda-package,_package.sympy,_source.conda-forge"
},
{
"tags": "get,generic-python-lib,_custom-python,_package.setuptools",
"env": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/bin/bash

export PATH=${CM_CONDA_BIN_PATH}:${PATH}
export ABI=$(python -c "import torch; print(int(torch._C._GLIBCXX_USE_CXX11_ABI))")
#export LD_LIBRARY_PATH=${CM_CONDA_LIB_PATH}:${LD_LIBRARY_PATH}
ABI=$(python -c "import torch; print(int(torch._C._GLIBCXX_USE_CXX11_ABI))")
test $? -eq 0 || exit $?
export ABI=$ABI
mkdir -p llvm-project && cd llvm-project
wget -nc https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/cmake-16.0.6.src.tar.xz
wget -nc https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.6/llvm-16.0.6.src.tar.xz
Expand All @@ -14,6 +17,8 @@ rm -rf build
mkdir -p build
cd build
export DEB_BUILD_MAINT_OPTIONS=hardening=-format
export CC=${CM_C_COMPILER_WITH_PATH}
export CXX=${CM_CXX_COMPILER_WITH_PATH}
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=${ABI}" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_INCLUDE_BENCHMARKS=OFF ../llvm/

test $? -eq 0 || exit $?
Expand Down

0 comments on commit 184d043

Please sign in to comment.