Bandwidth Test
Function
Measure the bus bandwidth and memory bandwidth.
Parameters
You can run either of the following commands to check the parameters of the bandwidth test command:
ascend-dmi --bw -h
ascend-dmi --bw --help
Table 1 lists only test-specific parameters. For details about other common parameters, see Common Parameters.
Parameter |
Description |
Restriction |
Mandatory |
|---|---|---|---|
[-bw, --bw, --bandwidth] |
Measures the bandwidth of the chip or entire card. |
- |
Yes |
[-t, --type] |
Specifies the data flows to be tested. During bandwidth test, the test data flow can be divided into the following directions. If this parameter is not specified, the information about the bandwidth and total time consumption in the H2D, D2H, and D2D directions will be returned by default.
|
|
No |
[-m, --mode] |
Specifies a bandwidth test mode, which can be a card- or device-level bandwidth test. If this parameter is not specified, the device-level bandwidth test is performed by default.
|
This parameter is supported only when type is set to p2p for the |
No |
[-s, --size] |
Specifies the size of the data to be transmitted and the display mode of the test result.
|
|
No |
[-et, --et, --execute-times] |
Specifies the number of iterations, that is, the number of copy times in the memory. The value range is [1, 1000]. If this parameter is not specified, the number of copy times in step mode is 5 by default, and the number of copy times in fixed-length mode is 40 by default. |
|
No |
[-d, --device] |
Specifies the device ID where bandwidth test is to be performed. The device ID is the logic ID of the Ascend AI Processor. If the device ID is set:
If the device ID is not set:
|
|
No |
[-ds, --ds, --device-src] |
Specifies the ID of the source device for a P2P test. This parameter must be used together with [-dd, --dd, --device-dst]. The values following the parameters must be different. If neither of the two parameters is specified, all Ascend NPUs are tested. |
This parameter is not supported by the |
No |
[-dd, --dd, --device-dst] |
Specifies the ID of the destination device for a P2P test. This parameter must be used together with [-ds, --ds, --device-src]. The values following the parameters must be different. If neither of the two parameters is specified, all Ascend NPUs are tested. |
This parameter is not supported by the |
No |
[-o, --operation] |
Specifies the data transmission operation type for a D2D test. The following options are supported: If the parameter value is not specified, read is used by default. |
This parameter is supported only by the |
No |
[--di, --direction] |
Specifies the direction of a P2P bandwidth test. The following values are supported:
If the parameter value is not specified, all is used by default. |
This parameter is supported only by the |
No |
[-dur, --dur, --duration] |
Specifies the traffic generation duration. The value ranges from 5 to 120, in seconds. |
|
No |
[-lt, --lt, --link-type] |
Specifies the data transmission operation type for a P2P test. The following values are supported:
The value range varies with the server model.
|
This parameter is not supported by the Atlas 650, Atlas 650E, Atlas 850, Atlas 850E, Atlas 950 SuperPoD, and Atlas 950 SuperPoD Flex. |
No |
Note:
|
|||
Example
1. Measure the bandwidth and total time consumption without specifying parameters on the Atlas 800I A2. (If no parameter is specified, information about device 0 in H2D, D2H, and D2D directions will be returned and displayed in step mode).
ascend-dmi --bw -q
3. Measure the bandwidth and total time consumption of the data transmitted between the same device on the Atlas 800I A2.
ascend-dmi --bw -t d2d -d 0 -q

- The following uses the Atlas 800I A2 as an example, where data is transmitted to destination device 0 from source device 1 in P2P mode for 100 iterations with a data size of 128 MB.
ascend-dmi --bw -t p2p --dd 0 --ds 1 --et 100 -s 134217728 -q

- Perform a P2P test without specifying the source and destination devices on the Atlas 800I A2.
ascend-dmi --bw -t p2p -q

5. Perform a P2P test on the Atlas 900 A3 SuperPoD without specifying the source and destination cards.
ascend-dmi --bw -t p2p -q --mode card
If the following information is displayed, the tool is running properly.
Unidirectional Peer to Peer Test Bandwidth Matrix(GB/s) C\C 0 1 2 3 4 5 6 7 0 *** 328.96 328.98 329.02 329.08 329.04 329.17 328.99 1 328.61 *** 328.58 328.56 328.48 328.55 328.53 328.57 2 328.57 328.49 *** 328.76 328.54 328.54 328.49 328.54 3 328.52 328.46 328.55 *** 328.72 328.50 328.54 328.54 4 329.02 329.05 328.99 329.03 *** 329.05 329.04 329.00 5 328.70 328.58 328.51 328.57 328.59 *** 328.56 328.56 6 328.56 328.53 328.63 328.58 328.61 328.57 *** 328.55 7 328.95 328.49 328.56 328.61 328.55 328.56 328.54 *** Bidirectional Peer to Peer Test Bandwidth Matrix(GB/s) C\C 0 1 2 3 4 5 6 7 0 *** 540.51 540.39 540.50 541.80 541.90 541.05 540.34 1 540.90 *** 540.90 541.05 541.48 540.53 559.08 540.56 2 540.95 541.40 *** 540.61 540.45 540.76 540.80 541.78 3 540.97 540.87 541.61 *** 541.41 540.35 540.90 540.98 4 541.30 541.04 540.82 542.88 *** 540.40 541.13 540.68 5 540.68 541.14 541.86 540.80 540.44 *** 540.80 540.36 6 540.54 540.91 540.98 541.03 540.63 541.20 *** 541.27 7 540.51 542.78 540.91 541.69 540.22 540.95 541.02 ***
6. Perform an H2D test with the size of 128 MB specified on all devices on the Atlas 350 accelerator card.
ascend-dmi --bw -t h2d -d all -s 134217728 -q
Host to Device Test Device 0, 1, 2, 3, 4, 5, 6, 7: Ascend950PR. ------------------------------------------------------------------- ID Size(Bytes) Execute Times Bandwidth(GB/s) Elapsed Time(us) ------------------------------------------------------------------- 0 134217728 40 53.585368 2522.2719 1 134217728 40 53.582677 2522.8679 2 134217728 40 53.714605 2517.0803 3 134217728 40 51.016660 2646.5237 4 134217728 40 51.674822 2615.6962 5 134217728 40 52.444271 2575.9101 6 134217728 40 51.731377 2612.8769 7 134217728 40 53.920725 2507.3290 -------------------------------------------------------------------
7. Perform an h2d_d2h test with the size of 128 MB specified on device 1 on the Atlas 350 accelerator card.
ascend-dmi --bw -t h2d_d2h -d 1 -s 134217728 -q
Host to Device Test Device 1: Ascend950DT. ------------------------------------------------------------------- ID Size(Bytes) Execute Times Bandwidth(GB/s) Elapsed Time(us) ------------------------------------------------------------------- 1 134217728 40 42.012817 3194.86 -------------------------------------------------------------------
8. Perform a unidirectional P2P traffic generation test from source device 1 to destination device 0 on the
ascend-dmi --bw -t p2p --dur 5 --dd 0 --ds 1 --di uni -q
Unidirectional Peer to Peer Test Device 1 (Ascend950PR) to Device 0 (Ascend950PR) ----------------------------------------------------------------------- ID Size(Bytes) Execute Times Bandwidth(GB/s) Elapsed Time(us) ----------------------------------------------------------------------- 1->0 2097152 - 46.981144 46.81 -----------------------------------------------------------------------
9. Perform a P2P test from source device 0 to destination device 1 on the
ascend-dmi --bw -t p2p --lt ubc_mesh --ds 0 --dd 1 -s 33554432 -q
Unidirectional Peer to Peer Test Device 0 (Ascend950PR) to Device 1 (Ascend950PR) ----------------------------------------------------------------------- ID Size(Bytes) Execute Times Bandwidth(GB/s) Elapsed Time(us) ----------------------------------------------------------------------- 0->1 33554432 40 50.406957 698.01 ----------------------------------------------------------------------- Bidirectional Peer to Peer Test Transfer between Device 0 (Ascend950PR) and Device 1 (Ascend950PR) ----------------------------------------------------------------------- ID Size(Bytes) Execute Times Bandwidth(GB/s) Elapsed Time(us) ----------------------------------------------------------------------- 0<->1 33554432 40 95.420689 737.46 -----------------------------------------------------------------------
10. Perform a D2D test on device 0 of the Atlas 350 accelerator card, with the data transmission operation type being write.
ascend-dmi --bw -t d2d -o write -q
Device to Device Test
Device 0: Ascend950PR.
----------------------------------------------------------------
Size(GB) Execute Times Bandwidth(GB/s) Elapsed Time(us)
----------------------------------------------------------------
29.36 1 1414.331787 20759.01
29.36 1 1414.166382 20761.44
29.36 1 1414.744873 20752.95
29.36 1 1414.677490 20753.94
29.36 1 1414.296997 20759.52
29.36 1 1415.251221 20745.52
29.36 1 1415.031860 20748.74
29.36 1 1402.069702 20940.56
29.36 1 1413.259521 20774.76
29.36 1 1414.103394 20762.36
29.36 1 1408.651733 20842.72
29.36 1 1405.905640 20883.43
29.36 1 1414.849731 20751.41
29.36 1 1413.363159 20773.24
29.36 1 1414.151611 20761.66
29.36 1 1413.357178 20773.33
29.36 1 1414.714722 20753.39
29.36 1 1414.094971 20762.49
29.36 1 1413.133057 20776.62
29.36 1 1390.780640 21110.54
29.36 1 1414.822998 20751.80
29.36 1 1412.628784 20784.04
29.36 1 1413.136841 20776.56
29.36 1 1414.834717 20751.63
29.36 1 1405.618652 20887.69
----------------------------------------------------------------
The following table describes the parameters in the preceding examples.
Parameter |
Description |
|---|---|
Host to Device Test |
Data flow direction. The value can be:
|
Device X : Ascend XXX |
Device X indicates the ID of the current device, and Ascend XXX indicates the processor type. The value 0 indicates the source device, and the value 1 indicates the destination device. |
ID |
0 indicates the bandwidth of device 0 in D2D, D2H, and H2D modes. 0→1 indicates unidirectional P2P bandwidth from device 0 to device 1. 0→1 indicates bidirectional P2P bandwidth between device 0 and device 1. |
Size(Bytes) Size(GB) |
Size of data to be transmitted, in bytes or GB. |
Execute Times |
Number of iterations |
Bandwidth(GB/s) |
Chip bandwidth |
Elapsed Time(us) |
Execution duration |
FAQs
- If the bandwidth test takes a long time and the test result does not meet the expectation, refer to [D2D Bandwidth] Performance Degradation Caused by Enabled Swap Partition.
- If the H2D bandwidth test result does not meet the expectation, you are advised to change the value of Max Payload Size to 512B on the host. For details, see Setting the Payload on the BIOS.
- If the P2P test result of the Atlas 200T A2 Box16/Atlas 200I A2 Box16 does not meet the expectation, see [P2P Bandwidth] P2P Bandwidth Degradation Between the First and Last 8-NPU Groups.




