Change the host code to pick the devices. In this tutorial, host code picks two devices by their BDF.
30 auto device1_bdf= "0000:65:00.1"; // Device1 BDF, P2P should be enabled for this device 31 auto device2_bdf= "0000:b3:00.1"; // Device2 BDF, This device doing DMA-READ or DMA-WRITE, P2P enablement is not required
You must change the above lines to pick the right devices as per your setup. You may use
xbutil examine
which shows bdf of the devices.Load pre-built XCLBIN for the destination device. For the destination device, you can transfer the data without performing any operations, but you must load a kernel so that one or more memory banks become visible by runtime.
You can run
xbutil validate
memory bandwidth test that loads a pre-built kernel so that all memory banks become visible by XRTxbutil validate --device 0000:b3:00.1 -r mem-bw
Compile the XCLBIN containing increment kernel for the source device.
make xclbin
Compile the host-code
make exe
Execute the host-code
./host.exe
You will see an output like below
Execution of the kernel on source device Buffer = 16384 Iterations = 1024 Throughput= 0.39GB/s TEST PASSED