A GPU-accelerated back end for the PR programming language.
- The first step is to compile a p4 program with the GPU back end present in my
fork of the p4c compiler1, and dump the AST, for example:
./build/backends/gpu/p4c-gpu port-forwarding.p4 --toJSON port-forward.json
- The next step is to use this compiler to generate a CUDA file, for example:
stack run -- -i firewall.json > kernel.cu
- The final step is to place this CUDA file into the runtime2 as
src/kernel.cu
, and compile the runtime usingcargo build --release
. The runtime can then be executed usingsudo env LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib" target/release/dpdk-gpu-test -s payload_1024.pcap