Repository navigation
Expand file tree
/
Copy pathcmake.sh
More file actions
53 lines (50 loc) · 1.82 KB
/
Copy pathcmake.sh
File metadata and controls
53 lines (50 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Required dependencies:
# OpenBabel3
# protobuf-devel
# boost-devel
# openblas-devel
# python3-devel
# zlib-devel
# jsoncpp-devel
#
# Debian dependencies:
# zlib1g-dev libopenblas-dev libprotobuf-dev libboost-all-dev python3-dev
# libjsoncpp-dev python3-numpy-dev libopenbabel-dev libopenbabel7
# python3-openbabel openbabel python3-rdkit librdkit-dev
#
# Remove all unneeded compiler packages as libmolgrid seems to pick up on gcc-13
# for unknown reasons
#
# Change URL in CMakeLists.txt to point to libtorch compatible with CUDA
#
# Using gcc-15 and nvcc
# had to comment out lines 629 and 653 in /home/user/hloeffler/usr/cuda-13.0/targets/x86_64-linux/include/crt/math_functions.h
#
# Dependency libmolgrid which is automatically downloaded
# remove template IDs in
# libmolgrid-prefix/src/libmolgrid/include/libmolgrid/grid.h (l 303) and
# libmolgrid-prefix/src/libmolgrid/include/libmolgrid/managed_grid.h (ls. 537, 607)
# prevent recompilation of libmolgrid and thus all of gnina:
# comment out line 145 in CMakeFiles/libmolgrid.dir/build.make afer first successful build
#
# Remove -Werror in libmolgrid-prefix/src/libmolgrid/CMakeLists.txt
# libmolgrid seems to require Python bindings
#
export CUDA_HOME=/home/user/hloeffler/usr/cuda-13.0
export PATH=${CUDA_HOME}/bin:$PATH
cmake .. \
-DCUDA_TOOLKIT_ROOT_DIR=${CUDA_HOME} \
-DCUDA_HOST_COMPILER=/usr/bin/gcc-15 \
-DCMAKE_CUDA_COMPILER=/home/user/hloeffler/usr/cuda-13.0/bin/nvcc \
-DUSE_STATIC_MKL=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCAFFE2_STATIC_LINK_CUDA=ON \
-DUSE_STATIC_CUDNN=ON \
-DCMAKE_CUDA_ARCHITECTURES="120" \
-DTORCH_CUDA_ARCH_LIST="12.0" \
-DCMAKE_CXX_FLAGS="-Wno-maybe-uninitialized"
# -DBLAS=OpenBLAS \
# -DBUILD_PYTHON=OFF \
# -DUSE_STATIC_NCCL=ON \
# -DUSE_TENSORPIPE=OFF \
# -DUSE_MKLDNN=ON \