bitorch_engine.utils.cuda_extension.get_kwargs

bitorch_engine.utils.cuda_extension.get_kwargs() Dict[str, Any][source]

Generates keyword arguments for compilation based on the GCC version and CUDA architecture.

This function dynamically constructs a dictionary of extra compilation arguments for both C++ and CUDA (nvcc) compilers. It includes flags to suppress deprecated declarations warnings, specify the OpenMP library path, and set the CUDA architecture. Additionally, it conditionally adjusts the nvcc host compiler to GCC 11 if the detected GCC version is greater than 11.

Returns:

A dictionary containing the ‘extra_compile_args’ key with nested

dictionaries for ‘cxx’ and ‘nvcc’ compilers specifying their respective extra compilation arguments.

Return type:

Dict[str, Any]