File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,10 @@ set -e
2525# This wrapper uses the GNU compilers to build
2626# training and inference examples
2727
28-
29- PYPATH=$( find /opt/conda/lib/ -maxdepth 1 -name ' python?.*' -type d)
30- CMAKE_PREFIX_PATH=" ${PYPATH} /site-packages/torch/share/cmake;${PYPATH} /site-packages/pybind11/share/cmake"
28+ # Default Pytorch containers seem to have Pytorch installed through conda
29+ PY_SITE_PATH=$( find /opt/conda/lib/ -maxdepth 1 -name ' python?.*' -type d) /site-packages
30+ CMAKE_PREFIX_PATH=" ${PY_SITE_PATH} /torch/share/cmake;${PY_SITE_PATH} /pybind11/share/cmake"
31+ echo " Trying to use Python libraries from $PY_SITE_PATH "
3132
3233CONFIG=Release
3334OPENACC=0
Original file line number Diff line number Diff line change @@ -29,8 +29,10 @@ set -e
2929# 1. with GCC, build pytorch C++ wrapper lib that exposes things to Fortran
3030# 2. with Intel, build fortran bindings that just bind(c) to built lib from (1)
3131
32- PYPATH=$( find /opt/conda/lib/ -maxdepth 1 -name ' python?.*' -type d)
33- CMAKE_PREFIX_PATH=" ${PYPATH} /site-packages/torch/share/cmake;${PYPATH} /site-packages/pybind11/share/cmake"
32+ # Intel Pytorch containers seem to have Pytorch installed in /usr/local
33+ PY_SITE_PATH=$( find /usr/local/lib/ -maxdepth 1 -name ' python?.*' -type d) /dist-packages
34+ CMAKE_PREFIX_PATH=" ${PY_SITE_PATH} /torch/share/cmake;${PY_SITE_PATH} /pybind11/share/cmake"
35+ echo " Trying to use Python libraries from $PY_SITE_PATH "
3436
3537CONFIG=Release
3638OPENACC=0
Original file line number Diff line number Diff line change @@ -30,8 +30,10 @@ set -e
3030# 2. with NVHPC, build fortran bindings that just bind(c) to built lib from (1)
3131
3232NVPATH=$( ls -d /opt/nvidia/hpc_sdk/Linux_x86_64/?? .? ) /compilers/bin
33- PYPATH=$( find /opt/conda/lib/ -maxdepth 1 -name ' python?.*' -type d)
34- CMAKE_PREFIX_PATH=" ${PYPATH} /site-packages/torch/share/cmake;${PYPATH} /site-packages/pybind11/share/cmake"
33+ # Nvidia Pytorch containers seem to have Pytorch installed in /usr/local
34+ PY_SITE_PATH=$( find /usr/local/lib/ -maxdepth 1 -name ' python?.*' -type d) /dist-packages
35+ CMAKE_PREFIX_PATH=" ${PY_SITE_PATH} /torch/share/cmake;${PY_SITE_PATH} /pybind11/share/cmake"
36+ echo " Trying to use Python libraries from $PY_SITE_PATH "
3537
3638CONFIG=Release
3739OPENACC=1
@@ -44,8 +46,9 @@ INSTALL_PATH=${1:-$BUILD_PATH/install/}
4446mkdir -p $BUILD_PATH /build_proxy $BUILD_PATH /build_fortproxy $BUILD_PATH /build_example
4547# c++ wrappers
4648(
49+ set -x
4750 cd $BUILD_PATH /build_proxy
48- cmake -DOPENACC=$OPENACC -DCMAKE_BUILD_TYPE=$CONFIG -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DCMAKE_CXX_COMPILER=g++ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DTORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST ../../src/proxy_lib
51+ cmake -DOPENACC=$OPENACC -DCMAKE_BUILD_TYPE=$CONFIG -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DCMAKE_CXX_COMPILER=g++ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DTORCH_CUDA_ARCH_LIST=" $TORCH_CUDA_ARCH_LIST " ../../src/proxy_lib
4952 cmake --build . --parallel
5053 make install
5154)
You can’t perform that action at this time.
0 commit comments