ingonyama-zk / icicle

a GPU Library for Zero-Knowledge Acceleration
MIT License
303 stars 88 forks source link

Allow overriding compiler's chosen GPU arch via cmake #518

Closed liuhao230 closed 2 months ago

liuhao230 commented 2 months ago

Describe the changes

This PR modifies icicle/cmake/Common.cmake to set CMAKE_CUDA_ARCHITECTURES to ${CUDA_ARCH} if the user defines the arch, to set CMAKE_CUDA_ARCHITECTURES to native if the cmake version is greater than or equal to 3.24.0. This change has been successfully tested with cmake 3.22.0 and 3.25.2.

Linked Issues

Resolves #167.