NCCL常用環境變量


Table 1. Knobs available for modification in NCCL

Environment Variable

Description

Values Accepted

NCCL_SHM_DISABLE

The NCCL_SHM_DISABLE variable disables the Shared Memory (SHM) transports.

SHM is used between devices when peer-to-peer cannot happen, therefore, host memory is used. NCCL uses network (InfiniBand or IP sockets) to communicate between the CPU sockets when SHM is disabled.

NCCL_SHM_DISABLE變量禁用共享內存(SHM)傳輸。

在對等不可能發生的情況下在設備之間使用SHM,因此使用主機內存。 當SHM禁用時,NCCL使用網絡(InfiniBand或IP sockets)在CPU sockets之間進行通信。

Define and set to 1 to disable SHM.

定義並設置為1以禁用SHM。

NCCL_SOCKET_IFNAME

The NCCL_SOCKET_IFNAME variable specifies which IP interface to use for communication.

This variable also defines a prefix for the network interfaces to be filtered.

NCCL_SOCKET_IFNAME變量指定用於通信的IP接口。

該變量還定義了要過濾的網絡接口的前綴。

Define and set to ib or eth. The value searches for all applicable ib* or eth* named interfaces on the system.

Another accepted value is ^eth, which searches for interfaces that do not match eth.

定義並設置為ib或eth。 該值在系統上搜索所有適用的ib*或eth*命名的接口。

另一個可接受的值是^eth,它搜索與eth不匹配的接口。

 

Note: Loopback (lo) is not selected by NCCL unless it is explicitly set in the environment variable.

注意:除非在環境變量中明確設置,否則NCCL不會選擇Loopback(lo)。

NCCL_DEBUG

The NCCL_DEBUG variable controls the debug information that is displayed from NCCL. This variable is commonly used for debugging.

NCCL_DEBUG變量控制從NCCL顯示的調試信息。 這個變量通常用於調試。

VERSION

Prints the NCCL version at the start of the program.

在程序開始時打印NCCL版本。

WARN

Prints an explicit error message whenever any NCCL call errors out.

每當出現任何NCCL調用錯誤時,打印一個明確的錯誤消息。

NCCL_IB_DISABLE

The NCCL_IB_DISABLE variable disables the IB transport that is to be used by NCCL. Instead, NCCL will fallback to using IP sockets.

NCCL_IB_DISABLE變量將禁用NCCL要使用的IB傳輸。NCCL將回退到使用IP sockets 。

Define and set to 1 to force IP sockets usage.

定義並設置為1以強制使用IP sockets 。

NCCL_BUFFSIZE

The NCCL_BUFFSIZE variable controls the amount of buffer to share data between two GPUs.

Use this variable if you encounter memory constraint issues when using NCCL or you think that a different buffer size would improve performance.

NCCL_BUFFSIZE變量控制兩個GPU之間共享數據的緩沖區大小。

如果在使用NCCL時遇到內存限制問題,或者您認為不同的緩沖區大小會提高性能,請使用此變量。

Default is 4194304 (4 MB).

Values are integers, in bytes. The recommendation is to use powers of 2. For example, 1024 will give a 1K buffer.

默認是4194304(4 MB)。

值是整數,以字節為單位。 建議使用2的證書冪。例如,1024會給1K緩沖區。

NCCL_NTHREADS

The NCCL_NTHREADS variable sets the number of CUDA threads per CUDA block. NCCL will launch one block per communication ring.

NCCL_NTHREADS變量設置每個CUDA塊的CUDA線程數。 NCCL將為每個通訊環路啟動一個模塊。

Use this variable if you think your GPU clocks are low and you want to increase the number of threads.

You can also use this variable to reduce the number of threads to decrease the GPU workload.

如果您認為您的GPU時鍾不足,並且想要增加線程數,請使用此變量。

您也可以使用此變量來減少線程數量,以減少GPU工作負載。

Default is 512 for Kepler.

Default is 256 for Maxwell and Pascal.

The values allowed are 128, 256 and 512.

Kepler的默認值是512。

Maxwell和Pascal的默認值是256。

允許的值是128,256和512。

NCCL_RINGS

The NCCL_RINGS variable overrides the rings that NCCL forms by default. Rings are sequences of ranks. They can be any permutations of ranks.

NCCL filters out any rings that do not contain the number of ranks in the NCCL communicator. In general, the ring formation is dependent on the hardware topology connecting the GPUs in your system.

NCCL_RINGS變量覆蓋默認情況下NCCL形成的環。環是ranks的序列。 他們可以是ranks的任何排列。

NCCL過濾掉任何NCCL通信器中不包含的秩數的環。 一般來說,環的形成取決於系統中連接GPU的硬件拓撲結構。

Ranks from 0 to n-1, where n is the number of GPUs in your communicator.

The ranks can be separated by any non-digit character, for example, " ", "-", except "|".

Multiple rings can be specified separated by the pipe character "|".

For example, if you have 4 GPUs in a communicator, you can form communication rings as such:0 1 2 3 | 3 2 1 0.

This will form two rings, one in each direction.

ranks從0到n-1,其中n是通信器中的GPU數量。

ranks可以用任何非數字字符分隔,例如" ", "-", "|"除外。

可以用管道字符“|”指定多個環。

例如,如果在通信器中有4個GPU,則可以如下形成通信環:0 1 2 3 | 3 2 1 0。

這將形成兩個環,每個方向一個。

NCCL_MAX_NRINGS

(since 2.0.5)

The NCCL_MAX_NRINGS variable limits the number of rings NCCL can use. Reducing the number of rings also reduces the number of CUDA blocks used for communication, hence the impact on GPU computing resources.

NCCL_MAX_NRINGS變量限制了NCCL可以使用的環的個數。 減少環的數量也減少了用於通信的CUDA塊的數量,從而影響GPU計算資源。

Any value above or equal to 1.

任何大於或等於1的值。

NCCL_CHECKS_DISABLE

(since 2.0.5)

Disable argument checks. Checks are useful during development but can increase the latency. They can be disabled to improve performance in production.

禁用參數檢查。 檢查在開發過程中很有用,但會增加延遲。 他們可以被禁用,以提高生產性能。

Default is 0. Set the value to 1 to disable checks.

默認值為0.將值設置為1以禁用檢查。

NCCL_LAUNCH_MODE

(since 2.1.0)

Controls how NCCL launches CUDA kernels.

控制NCCL如何啟動CUDA內核。

The default value is to use cooperative groups (CUDA 9).

Setting it to PARALLEL uses the previous launch system which can be faster but is prone to deadlocks.

默認值是使用合作組(CUDA 9)。

將其設置為PARALLEL將使用先前的啟動系統,該啟動系統可能更快,但容易出現死鎖。

NCCL_IB_TIMEOUT

The NCCL_IB_TIMEOUT variable controls the InfiniBand Verbs Timeout. Refer to the InfiniBand documentation for more information.

NCCL_IB_TIMEOUT變量控制InfiniBand Verbs超時。 有關更多信息,請參閱InfiniBand文檔。

The default value used by NCCL is 14.

The value depends on the size of your InfiniBand network.

NCCL使用的默認值是14。

該值取決於您的InfiniBand網絡的大小。

NCCL_IB_CUDA_SUPPORT

The NCCL_IB_CUDA_SUPPORT variable is used to disable GPU Direct RDMA.

NCCL_IB_CUDA_SUPPORT變量用於禁用GPU Direct RDMA。

By default, NCCL enables GPU Direct RDMA, if the topology permits it. This variable can disable this behavior.

Define and set to 0 to disable GPU Direct RDMA.

默認情況下,如果拓撲結構允許,NCCL啟用GPU Direct RDMA。 此變量可以禁用此行為。

定義並設置為0以禁用GPU Direct RDMA。

NCCL_NET_GDR_READ

The NCCL_NET_GDR_READ variable enables GPU Direct RDMA when sending data. By default, NCCL uses GPU Direct RDMA to receive data directly in GPU memory. However, when sending data, the data is first stored in CPU memory, then goes to the InfiniBand card.

發送數據時,NCCL_NET_GDR_READ變量啟用GPU Direct RDMA。 默認情況下,NCCL使用GPU Direct RDMA直接在GPU內存中接收數據。 但是,在發送數據時,首先將數據存儲在CPU內存中,然后進入InfiniBand卡。

 

Note: Reading directly GPU memory when sending data is known to be slightly slower than reading from CPU memory.

注意:發送數據時直接讀取GPU內存比CPU內存讀取要慢一些。

Default value is 0.

Define and set to 1 to use GPU Direct RDMA to send data to the NIC directly (bypassing CPU).

默認值是0。

定義並設置為1,以使用GPU Direct RDMA將數據直接發送到NIC(繞過CPU)。

NCCL_SINGLE_RING_THRESHOLD

(since 2.1.0)

Set the limit under which NCCL will only use one ring. This will limit bandwidth but improve latency.

設置NCCL只使用一個環的限制。 這會限制帶寬,但會提高延遲。

Default value is 256kB on GPUs with compute capability 7 and above. Otherwise, the default value is 128kB on others.

Values are integers, in bytes.

在計算能力為7以上的GPU上,默認值為256kB。 否則,其他的默認值是128kB。

值是整數,以字節為單位。

NCCL_LL_THRESHOLD

(since 2.1.0)

Set the size limit under which NCCL uses low-latency algorithms.

設置NCCL使用低延遲算法的大小限制。

Default is 16kB.

Values are integers, in bytes.

默認值是16kB。

值是整數,以字節為單位。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM