Searched hist:"639781 dcab8261f39c7028db4ed4fd0e760d69fa" (Results 1 – 1 of 1) sorted by relevance
/linux/Documentation/ABI/testing/ |
H A D | debugfs-driver-habanalabs | diff 639781dcab8261f39c7028db4ed4fd0e760d69fa Fri Apr 02 00:43:18 CEST 2021 Oded Gabbay <ogabbay@kernel.org> habanalabs/gaudi: add debugfs to DMA from the device
When trying to debug program, the user often needs to dump large parts of the device's DRAM, which can reach to tens of GBs. Because reading from the device's internal memory through the PCI BAR is extremely slow, the debug can take hours.
Instead, we can provide the user to copy data through one of the DMA engines. This will make the operation much faster.
Currently, only GAUDI is supported.
In GAUDI, we need to find a PCI DMA engine that is IDLE and set the DMA as secured to be able to bypass our MMU as we currently don't map the temporary buffer to the MMU.
Example bash one-line to dump entire HBM to file (~2 minutes):
for (( i=0x0; i < 0x800000000; i+=0x8000000 )); do \ printf '0x%x\n' $i | sudo tee /sys/kernel/debug/habanalabs/hl0/addr ; \ echo 0x8000000 | sudo tee /sys/kernel/debug/habanalabs/hl0/dma_size ; \ sudo cat /sys/kernel/debug/habanalabs/hl0/data_dma >> hbm.txt ; done
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
|