bitorch_engine.utils.cuda_extension.gcc_version
- bitorch_engine.utils.cuda_extension.gcc_version()[source]
Determines the version of GCC (GNU Compiler Collection) installed on the system.
This function executes the ‘gcc –version’ command using subprocess.run and parses the output to extract the GCC version number. If GCC is not found or an error occurs during parsing, it returns a default version number of 0.0.0.
The function checks if the output contains the string “clang” to identify if clang is masquerading as gcc, in which case it also returns 0.0.0, assuming GCC is not installed.
- Returns:
- A tuple containing three integers (major, minor, patch) representing the version of GCC.
Returns (0, 0, 0) if GCC is not found or an error occurs.
- Return type:
tuple