Skip to content

Commit f1fbfd8

Browse files
Renamed src/README.md to src/.BUILD_LOCALLY.md
Provided more context to the command stated in the readme, and changed so as to not hard-code installation paths of NVBench, and checkout path of pybind11.
1 parent 453a164 commit f1fbfd8

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

python/src/.BUILD_LOCALLY.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Building extension module locally
2+
3+
This may be useful for debugging purposes.
4+
Assuming NVBench is installed into `NVBENCH_PREFIX`,
5+
and pybind11 repo is cloned to `PYBIND11_DIR`,
6+
Python extension can be built locally, using host compiler,
7+
as follows:
8+
9+
```bash
10+
g++ py_nvbench.cpp \
11+
-shared -fPIC \
12+
-I ${PYBIND11_DIR}/include \
13+
-I ${NVBENCH_PREFIX}/include \
14+
-I /usr/local/cuda/include \
15+
$(python3-config --includes) \
16+
$(python3-config --libs) \
17+
-L ${NVBENCH_PREFIX}/lib/ \
18+
-lnvbench \
19+
-Wl,-rpath,${NVBENCH_PREFIX}/lib \
20+
-L /usr/local/cuda/lib64/ \
21+
-lcudart \
22+
-Wl,-rpath,/usr/local/cuda/lib64 \
23+
-o _nvbench$(python3-config --extension-suffix)
24+
```

python/src/README.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)