Commit 48c8434d authored by yan.yan's avatar yan.yan
Browse files

detailed libspconv example

parent 16a8cb24
...@@ -74,6 +74,7 @@ Update Spconv: you **MUST UNINSTALL** all spconv/cumm/spconv-cuxxx/cumm-cuxxx fi ...@@ -74,6 +74,7 @@ Update Spconv: you **MUST UNINSTALL** all spconv/cumm/spconv-cuxxx/cumm-cuxxx fi
* nvrtc support: kernel in old GPUs will be compiled in runtime. * nvrtc support: kernel in old GPUs will be compiled in runtime.
* [libspconv](docs/PURE_CPP_BUILD.md): pure c++ build of all spconv ops. see [example](example/libspconv/run_build.sh) * [libspconv](docs/PURE_CPP_BUILD.md): pure c++ build of all spconv ops. see [example](example/libspconv/run_build.sh)
* tf32 kernels, faster fp32 training, disabled by default. set ```import spconv as spconv_core; spconv_core.constants.SPCONV_ALLOW_TF32 = True``` to enable them. * tf32 kernels, faster fp32 training, disabled by default. set ```import spconv as spconv_core; spconv_core.constants.SPCONV_ALLOW_TF32 = True``` to enable them.
* all weights are KRSC layout, some old model can't be loaded anymore.
## Spconv 2.1 vs Spconv 1.x ## Spconv 2.1 vs Spconv 1.x
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
Spconv provide a way to generate sources to build a C++ library with all op needed for inference and train. Spconv provide a way to generate sources to build a C++ library with all op needed for inference and train.
The generated libspconv has been deployed to tensorrt and run in real automatic driving vehicles.
## Steps ## Steps
1. Install spconv, Install cumm, Install cumm cmake, or add it as a sub directory 1. Install spconv, Install cumm, Install cumm cmake, or add it as a sub directory
......
# libspconv
libspconv + pybindings = "core_cc.so" in spconv python package.
## libspconv Example ## libspconv Example
run ```run_build.sh``` to get ```libspconv.so```. run ```run_build.sh``` to get ```libspconv.so```.
......
This diff is collapsed.
...@@ -4,7 +4,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) ...@@ -4,7 +4,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
git clone https://github.com/FindDefinition/cumm.git $SCRIPT_DIR/cumm git clone https://github.com/FindDefinition/cumm.git $SCRIPT_DIR/cumm
export CUMM_CUDA_VERSION=11.4 # cuda version, required export CUMM_CUDA_VERSION=11.4 # cuda version, required but only used for flag selection when build libspconv.
export CUMM_DISABLE_JIT=1 export CUMM_DISABLE_JIT=1
export SPCONV_DISABLE_JIT=1 export SPCONV_DISABLE_JIT=1
export CUMM_INCLUDE_PATH="\${CUMM_INCLUDE_PATH}" # if you use cumm as a subdirectory, you need this to find cumm includes. export CUMM_INCLUDE_PATH="\${CUMM_INCLUDE_PATH}" # if you use cumm as a subdirectory, you need this to find cumm includes.
...@@ -16,4 +16,4 @@ python -m spconv.gencode --include=$SCRIPT_DIR/spconv/include --src=$SCRIPT_DIR/ ...@@ -16,4 +16,4 @@ python -m spconv.gencode --include=$SCRIPT_DIR/spconv/include --src=$SCRIPT_DIR/
mkdir -p $SCRIPT_DIR/build mkdir -p $SCRIPT_DIR/build
cd $SCRIPT_DIR/build cd $SCRIPT_DIR/build
cmake .. cmake ..
cmake --build $SCRIPT_DIR/build --config Release -j 8 --verbose cmake --build $SCRIPT_DIR/build --config Release -j 8 # --verbose
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment