Commits


Tianlei Wu authored and GitHub committed 9e18b6a0f3f
[CUDA] Update nvcc flags (#23572) ### Description (1) Remove `if (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL 11)` since build requires cuda >= 11.4. (2) Add sm_86 and sm_89 since we generate SASS code for specified cuda architectures only. This change could support popular consumer GPUs (like RTX 30X0 and RTX 40X0). (3) Add sm_120 to support Blackwell GPUs (like RTX 50X0 etc). (4) Add `-Xfatbin=-compress-all` to reduce wheel size. When CMAKE_CUDA_ARCHITECTURES is not specified, the linux wheel size built by CUDA 12.8 is reduced 8% (from 324MB to 299MB). ### Motivation and Context To support popular consumer GPUs (RTX 30x0, 40x0, 50x0) in the default setting. Reduce binary size. Note that the default sm settings does not impact official released binary. ORT official released binary are built with augmentation like CMAKE_CUDA_ARCHITECTURES=75;80;90, which has both SASS (real) and PTX (virtual) by default. See https://cmake.org/cmake/help/latest/prop_tgt/CUDA_ARCHITECTURES.html for more info.