forked from deepmodeling/deepmd-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: improve docs for environment variables (deepmodeling#4070)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced comprehensive documentation on runtime environment variables for improved user guidance. - Added references to environment-related topics in various interface documentation. - **Documentation** - Enhanced structure and clarity of documentation regarding environment variables across multiple sections. - Improved presentation of environment variables for better readability. - Included detailed descriptions and choices for configuring performance-related variables. - **Bug Fixes** - Corrected terminology from "environmental variables" to "environment variables" for consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
623cbb5
commit 54b48f3
Showing
14 changed files
with
193 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Runtime environment variables | ||
|
||
:::{note} | ||
For build-time environment variables, see [Install from source code](./install/install-from-source.md). | ||
::: | ||
|
||
## All interfaces | ||
|
||
:::{envvar} DP_INTER_OP_PARALLELISM_THREADS | ||
|
||
**Alias**: `TF_INTER_OP_PARALLELISM_THREADS` | ||
**Default**: `0` | ||
|
||
Control parallelism within TensorFlow (when TensorFlow is built against Eigen) and PyTorch native OPs for CPU devices. | ||
See [How to control the parallelism of a job](./troubleshooting/howtoset_num_nodes.md) for details. | ||
::: | ||
|
||
:::{envvar} DP_INTRA_OP_PARALLELISM_THREADS | ||
|
||
**Alias**: `TF_INTRA_OP_PARALLELISM_THREADS`\*\* | ||
**Default**: `0` | ||
|
||
Control parallelism within TensorFlow (when TensorFlow is built against Eigen) and PyTorch native OPs. | ||
See [How to control the parallelism of a job](./troubleshooting/howtoset_num_nodes.md) for details. | ||
::: | ||
|
||
## Environment variables of dependencies | ||
|
||
- If OpenMP is used, [OpenMP environment variables](https://www.openmp.org/spec-html/5.0/openmpch6.html) can be used to control OpenMP threads, such as [`OMP_NUM_THREADS`](https://www.openmp.org/spec-html/5.0/openmpse50.html#x289-20540006.2). | ||
- If CUDA is used, [CUDA environment variables](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#cuda-environment-variables) can be used to control CUDA devices, such as `CUDA_VISIBLE_DEVICES`. | ||
- If ROCm is used, [ROCm environment variables](https://rocm.docs.amd.com/en/latest/conceptual/gpu-isolation.html#environment-variables) can be used to control ROCm devices. | ||
- {{ tensorflow_icon }} If TensorFlow is used, TensorFlow environment variables can be used. | ||
- {{ pytorch_icon }} If PyTorch is used, [PyTorch environment variables](https://pytorch.org/docs/stable/torch_environment_variables.html) can be used. | ||
|
||
## Python interface only | ||
|
||
:::{envvar} DP_INTERFACE_PREC | ||
|
||
**Choices**: `high`, `low`; **Default**: `high` | ||
|
||
Control high (double) or low (float) precision of training. | ||
::: | ||
|
||
:::{envvar} DP_AUTO_PARALLELIZATION | ||
|
||
**Choices**: `0`, `1`; **Default**: `0` | ||
|
||
{{ tensorflow_icon }} Enable auto parallelization for CPU operators. | ||
::: | ||
|
||
:::{envvar} DP_JIT | ||
|
||
**Choices**: `0`, `1`; **Default**: `0` | ||
|
||
{{ tensorflow_icon }} Enable JIT. Note that this option may either improve or decrease the performance. Requires TensorFlow to support JIT. | ||
::: | ||
|
||
:::{envvar} DP_INFER_BATCH_SIZE | ||
|
||
**Default**: `1024` on CPUs and as maximum as possible until out-of-memory on GPUs | ||
|
||
Inference batch size, calculated by multiplying the number of frames with the number of atoms. | ||
::: | ||
|
||
:::{envvar} DP_BACKEND | ||
|
||
**Default**: `tensorflow` | ||
|
||
Default backend. | ||
::: | ||
|
||
:::{envvar} NUM_WORKERS | ||
|
||
**Default**: 8 or the number of cores (whichever is smaller) | ||
|
||
{{ pytorch_icon }} Number of subprocesses to use for data loading in the PyTorch backend. | ||
See [PyTorch documentation](https://pytorch.org/docs/stable/data.html) for details. | ||
|
||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters