Skip to content

Commit f1ee5b1

Browse files
committed
update README.md
1 parent d9c3507 commit f1ee5b1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,18 @@ CUDA and C++ extensions via
130130
git clone https://github.com/NVIDIA/apex
131131
cd apex
132132
# if pip >= 23.1 (ref: https://pip.pypa.io/en/stable/news/#v23-1) which supports multiple `--config-settings` with the same key...
133-
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext --cuda_ext --parallel 4" ./
133+
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" ./
134134
# otherwise
135135
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --global-option="--cpp_ext" --global-option="--cuda_ext" ./
136136
```
137137

138+
To reduce the build time of APEX, parallel building can be enhanced via
139+
```bash
140+
export NVCC_APPEND_FLAGS="--threads 4"
141+
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext --cuda_ext --parallel 8" ./
142+
```
143+
When CPU cores or memory are limited, the `--parallel` option is generally preferred over `--threads`. See [pull#1882](https://github.com/NVIDIA/apex/pull/1882) for more details.
144+
138145
APEX also supports a Python-only build via
139146
```bash
140147
pip install -v --disable-pip-version-check --no-build-isolation --no-cache-dir ./

0 commit comments

Comments
 (0)