Steps required for p2p Data Transfer - 2023.1 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
Release Date
2023.1 English

To transfer the data through p2p, follow these steps:

  1. Enable the p2p of the source device.

    sudo /opt/xilinx/xrt/bin/xbutil configure --device 0000:65:00.1 --p2p enable

    After the warm reboot (sudo reboot now) check the p2p enablement status through xbutil examine:

    xbutil examine -d 0000:65:00.1 -r platform
    1/1 [0000:65:00.1] : xilinx_u50_gen3x16_xdma_base_5
        P2P Status             : enabled
  2. Declare the source buffer out1 as p2p buffer.

    The final p2p version of the host code is host_p2p.cpp. There are only two differences:

    • Output buffer of the source device is declared as p2p buffer

      auto out1 = xrt::bo(device1, vector_size_bytes, xrt::bo::flags::p2p, krnl.group_id(1));
    • Output buffer synchronization of the source device is commented out out1.sync(XCL_BO_SYNC_BO_FROM_DEVICE)

      for (int i = 0; i < loop; i++) {