mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
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.
This commit is contained in:
24
python/src/.BUILD_LOCALLY.md
Normal file
24
python/src/.BUILD_LOCALLY.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Building extension module locally
|
||||
|
||||
This may be useful for debugging purposes.
|
||||
Assuming NVBench is installed into `NVBENCH_PREFIX`,
|
||||
and pybind11 repo is cloned to `PYBIND11_DIR`,
|
||||
Python extension can be built locally, using host compiler,
|
||||
as follows:
|
||||
|
||||
```bash
|
||||
g++ py_nvbench.cpp \
|
||||
-shared -fPIC \
|
||||
-I ${PYBIND11_DIR}/include \
|
||||
-I ${NVBENCH_PREFIX}/include \
|
||||
-I /usr/local/cuda/include \
|
||||
$(python3-config --includes) \
|
||||
$(python3-config --libs) \
|
||||
-L ${NVBENCH_PREFIX}/lib/ \
|
||||
-lnvbench \
|
||||
-Wl,-rpath,${NVBENCH_PREFIX}/lib \
|
||||
-L /usr/local/cuda/lib64/ \
|
||||
-lcudart \
|
||||
-Wl,-rpath,/usr/local/cuda/lib64 \
|
||||
-o _nvbench$(python3-config --extension-suffix)
|
||||
```
|
||||
@@ -1,17 +0,0 @@
|
||||
|
||||
```
|
||||
g++ py_nvbench.cpp \
|
||||
-shared -fPIC \
|
||||
-I ${HOME}/repos/pybind11/include \
|
||||
-I ${HOME}/repos/pynvbench/nvbench_dir/include \
|
||||
-I /usr/local/cuda/include \
|
||||
$(python3-config --includes) \
|
||||
$(python3-config --libs) \
|
||||
-L ${HOME}/repos/pynvbench/nvbench_dir/lib/ \
|
||||
-lnvbench \
|
||||
-Wl,-rpath,${HOME}/repos/pynvbench/nvbench_dir/lib \
|
||||
-L /usr/local/cuda/lib64/ \
|
||||
-lcudart \
|
||||
-Wl,-rpath,/usr/local/cuda/lib64 \
|
||||
-o _nvbench$(python3-config --extension-suffix)
|
||||
```
|
||||
Reference in New Issue
Block a user