or you can just clone source code and submodules step by step
or you can just clone source code and submodules step by step
```
```shell
git clone https://github.com/Oneflow-Inc/oneflow
git clone https://github.com/Oneflow-Inc/oneflow
git submodule update --init--recursive
git submodule update --init--recursive
```
```
#### build third party from source
#### build third party from source
```
```shell
cmake -DTHIRD_PARTY=ON .. && make -j
cmake -DTHIRD_PARTY=ON .. && make -j
```
```
#### build oneflow
#### build oneflow
```
```shell
cmake -DTHIRD_PARTY=OFF .. && make -j
cmake -DTHIRD_PARTY=OFF .. && make -j
```
```
...
@@ -55,7 +55,7 @@ or you can just clone source code and submodules step by step
...
@@ -55,7 +55,7 @@ or you can just clone source code and submodules step by step
- Update cmake
- Update cmake
It is needed only if CMake installed does not support downloading .tgz file from URL with https protocol. Skip this step, just go back here to reinstall CMake if you encountered a downloading error while building the third-parties.
It is needed only if cmake installed does not support downloading .tgz file from URL with https protocol. Skip this step, just go back here to reinstall cmake if you encountered a downloading error while building the third-parties.
Download cmake(>=3.7) from [here](https://cmake.org/download/) , configure and install it by the following command:
Download cmake(>=3.7) from [here](https://cmake.org/download/) , configure and install it by the following command:
...
@@ -90,18 +90,14 @@ or you can just clone source code and submodules step by step
...
@@ -90,18 +90,14 @@ or you can just clone source code and submodules step by step
make -j$(nproc)
make -j$(nproc)
```
```
- XLA documents
You can check this [doc](./oneflow/xrt/README.md) to obtain more details about how to use XLA.
### Build with TensorRT
### Build with TensorRT
- Build third-parties
- Build third-parties
Run the following command to build third-parties.
Download TensorRT(>=6.0) .tgz and unzip the package, then run the following command to build third-parties.
```shell
```shell
cd build && cmake -DWITH_TENSORRT=ON -DTHIRD_PARTY=ON ..
cd build && cmake -DWITH_TENSORRT=ON -DTENSORRT_ROOT=your_tensorrt_path -DTHIRD_PARTY=ON ..
make -j$(nproc)
make -j$(nproc)
```
```
- Build OneFlow
- Build OneFlow
...
@@ -109,9 +105,17 @@ or you can just clone source code and submodules step by step
...
@@ -109,9 +105,17 @@ or you can just clone source code and submodules step by step