8. gc-hostsynclatencytest
This tool tests the sync latency between host and IPU in microseconds.
To use it, run:
gc-hostsynclatencytest -d {device_id} -j
where {device_id}
is the id number returned by the gc-inventory
tool.
If JSON output is selected, the output will look something like this:
{
"ipu_id": "0",
"sync_mode": "Polling",
"hsp": "hsp1",
"delay_cycles": "5",
"num_delays": "32",
"iterations": "1",
"mark_count": "4095",
"split_increments": "false",
"time_to_sync_us": "1485",
"result": "pass"
}
The output will be plain text if the -j
option is not specified.
For example:
o Using device Id - 0
o Using sync mode: Polling, HSP: hsp1
- Issuing 4095 syncs, each followed by 32 delay instructions of 5 cycles
o Loading binary on all tiles... done
o Syncs took on average 1485 us
o Result - Pass
If an error occurs during the test, then gc-hostsynclatencytest
will return
a non-zero exit code, and output an error message to the stdout.
More iterations can be added using the -i
option to average the results to
reduce the impact of system process scheduling.
When the host syncs with the IPUs it can set a “mark count”. This is decremented
every time the IPUs sync. There is a host function that will wait until the
mark count hits zero. gc-hostsynclatencytest
can set the initial value of the
mark count and request the IPUs to issue a series of syncs. It then measures the
time it takes for the mark count to reach zero.
A larger number of delay cycles, number of delays or value of mark count will result in longer load time onto the tiles of the IPU.
8.1. Usage
8.1.1. Allowed options
|
IPU device Id to be used |
|
hsp1|hsp2|both (default: hsp1) |
|
Iterations (default: 1) |
|
Split mark count increment into two calls |
|
posted|polling|hybrid (default: polling) |
|
Number of cycles for delay instruction. Max is 20 (default: 5) |
|
Number of delay instructions (default: 32) |
|
Initial value of mark-count (default: 4095) |
|
split MultiIPU device into separate sync groups |
|
Verbose output |
|
Emit JSON output |
|
Produce help message |
|
Version number |