added 3 commits
August 14, 2020 22:37Fixes an issue where the device compute capability is larger than the supported maximum of the CUDA runtime used to build ArrayFire. This happens for example when you run the Turing card with a CUDA runtime of 9.0. The compute capability of Turing is 7.5 and the maximum supported by the runtime is 7.0/7.2. Before this change we were only checking the major compute capability and not checking the minor version to set the max compute capability of the device. This caused errors like: In file src/backend/cuda/compile_module.cpp:266 NVRTC Error(5): NVRTC_ERROR_INVALID_OPTION Log: nvrtc: error: invalid value for --gpu-architecture (-arch) This commit also updates the error messages for failure cases.
The utility header in cuda_fp16.hpp is not included automatically in CUDA 9. Additionally we need to pass the --device-as-default-execution-space flag to nvrtc for JIT and non-JIT kernels
* The moduleKey is an size_t object so the maximum number of digits it can have is 20 so the format length for that value is updated * The runtime check messages are always logged (but not displayed) Errors are still only thrown in debug modes * Display the compute capability of the CUDA device along with its name and other stats example: Found device: Quadro T2000 (sm_75) (3.82 GB | ~3164.06 GFLOPs | 16 SMs)