docs: update README.md

Signed-off-by: YdrMaster <ydrml@hotmail.com>
This commit is contained in:
YdrMaster 2023-02-24 14:28:34 +08:00
parent fb3478bf3e
commit 59bf59c10b
2 changed files with 14 additions and 3 deletions

View File

@ -5,7 +5,7 @@ CUDA ?= off
CMAKE_OPT = -DCMAKE_BUILD_TYPE=$(TYPE) CMAKE_OPT = -DCMAKE_BUILD_TYPE=$(TYPE)
ifeq ($(CUDA), on) ifeq ($(CUDA), ON)
CMAKE_OPT += -DUSE_CUDA=ON CMAKE_OPT += -DUSE_CUDA=ON
endif endif

View File

@ -5,16 +5,27 @@
``` bash ``` bash
# Enter the root of InfiniTensor # Enter the root of InfiniTensor
source test/script/env_lotus.sh source test/script/env_lotus.sh
mkdir build && cd build make CUDA=ON
cmake -DUSE_CUDA=ON .. && make -j 12
``` ```
### Make Commands
- `make`/`make build`: Builds the project;
- `make install-python`: Builds the project then install the python frontend;
- `make test-cpp`: Builds the project then run cpp unit tests;
- `make test-onnx`: Run python unit tests;
---
> Sets env: `CUDA=ON` to enable cuda.
### CMake Options ### CMake Options
There are several configurable CMake options, see the [CMakeLists.txt file](/CMakeLists.txt#L5). There are several configurable CMake options, see the [CMakeLists.txt file](/CMakeLists.txt#L5).
- If `USE_BACKTRACE` is `ON`, `libdw-dev` have to be installed. See the README of [backward-cpp](https://github.com/bombela/backward-cpp) for details. - If `USE_BACKTRACE` is `ON`, `libdw-dev` have to be installed. See the README of [backward-cpp](https://github.com/bombela/backward-cpp) for details.
- If `USE_PROTOBUF` is `ON`, `protobuf` have to be installed. See the README of [protobuf](https://github.com/protocolbuffers/protobuf) for details. - If `USE_PROTOBUF` is `ON`, `protobuf` have to be installed. See the README of [protobuf](https://github.com/protocolbuffers/protobuf) for details.
- If `USE_CUDA` is `ON`, `cuda` have to be installed.
## Contributor Guide ## Contributor Guide