[Doc] Use shell code-blocks and fix section headers (#9508)

Signed-off-by: Rafael Vasquez <rafvasq21@gmail.com>
This commit is contained in:
Rafael Vasquez
2024-10-22 02:43:24 -04:00
committed by GitHub
parent ca30c3c84b
commit f7db5f0fa9
3 changed files with 23 additions and 23 deletions

View File

@ -107,15 +107,15 @@ If GPU/CPU communication cannot be established, you can use the following Python
If you are testing with a single node, adjust ``--nproc-per-node`` to the number of GPUs you want to use:
.. code-block:: shell
.. code-block:: console
NCCL_DEBUG=TRACE torchrun --nproc-per-node=<number-of-GPUs> test.py
$ NCCL_DEBUG=TRACE torchrun --nproc-per-node=<number-of-GPUs> test.py
If you are testing with multi-nodes, adjust ``--nproc-per-node`` and ``--nnodes`` according to your setup and set ``MASTER_ADDR`` to the correct IP address of the master node, reachable from all nodes. Then, run:
.. code-block:: shell
.. code-block:: console
NCCL_DEBUG=TRACE torchrun --nnodes 2 --nproc-per-node=2 --rdzv_backend=c10d --rdzv_endpoint=$MASTER_ADDR test.py
$ NCCL_DEBUG=TRACE torchrun --nnodes 2 --nproc-per-node=2 --rdzv_backend=c10d --rdzv_endpoint=$MASTER_ADDR test.py
If the script runs successfully, you should see the message ``sanity check is successful!``.