-
Notifications
You must be signed in to change notification settings - Fork 48
PyTorch Feature Branch
To compile the feature/py branch you need to parse an additional argument (CMAKE_PREFIX_PATH) when building LArContent via cmake. To do this alter the CMakeLists.txt file in PandoraPFA as follows:
CMAKE_ARGS ${COMMON_CMAKE_ARGS} ${MONITORING_CMAKE_ARGS} -DLAR_CONTENT_LIBRARY_NAME=${LAR_CONTENT_LIBRARY_NAME} -DEigen3_DIR=${CMAKE_CURRENT_SOURCE_DIR}/Eigen3-${Eigen3_version}/share/eigen3/cmake/ -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}
Then when building via cmake the additional command line option needed is:
cmake -DCMAKE_PREFIX_PATH="${PATH_TO_TORCH}/share/cmake" -DPANDORA_MONITORING=ON -DPANDORA_EXAMPLE_CONTENT=OFF -DPANDORA_LAR_CONTENT=ON -DPANDORA_LC_CONTENT=OFF -DCMAKE_CXX_FLAGS="-std=c++17 -Wno-implicit-fallthrough" ..
Where PATH_TO_TORCH="/cvmfs/uboone.opensciencegrid.org/products/libtorch/v1_0_1/Linux64bit+3.10-2.17-e17-prof/lib/python2.7/site-packages/torch" (or similar depending on version).