solana-perf-libs
solana-perf-libs copied to clipboard
C and CUDA libraries to enhance Solana
``` ml@ml-System-Product-Name:~/solana-perf-libs$ make -j$(nproc) make V=release -C src make[1]: Entering directory '/home/ml/solana-perf-libs/src' nvcc -rdc=true -Icommon --gpu-code=sm_37,sm_50,sm_61,sm_70,compute_35 --gpu-architecture=compute_35 -O3 -Xcompiler "-Wall -Werror -fPIC -Wno-strict-aliasing" -DENDIAN_NEUTRAL -DLTC_NO_ASM -Icuda-headers -Icuda-sha256 -c cuda-ecc-ed25519/main.cu -o...
The GPU work scheduler just does a round-robin approach with multiple GPUs. This is not so good if you have a big disparity of GPU performance. Say you have one...
The ed25519 sigverify check does the operation `a* A + b * B` in a single thread. This is somewhat efficient for the CPU because it saves instructions and stack...
Extra checks were added to the cuda sigverify for signature malleability: https://github.com/solana-labs/solana-perf-libs/blob/ccb3a0eaa62ae5fc741587c5e9b85634f8c7c487/src/cuda-ecc-ed25519/verify.cu#L89 https://github.com/solana-labs/solana-perf-libs/blob/ccb3a0eaa62ae5fc741587c5e9b85634f8c7c487/src/cuda-ecc-ed25519/verify.cu#L119 These should be added to the OpenCL implementation as well.
This set of changes introduces a way to select the platform and device for OpenCL and is used for the binary cl_ed25519_verify Usage example: src/debug/cl_ed25519_verify.exe -h usage: src/debug/cl_ed25519_verify [-v] $...