bitorch_engine.utils.cutlass_path.find_cutlass

bitorch_engine.utils.cutlass_path.find_cutlass(check_only: bool = True) bool | str[source]

Searches for the Cutlass library in predefined and environment-specified directories.

This function iterates through a list of potential directories where Cutlass might be located. It checks each directory to see if Cutlass exists there. The search paths include ‘/usr/local/include’ and any paths specified in the ‘CPATH’ environment variable.

Parameters:

check_only (bool) – Determines the behavior of the function upon finding Cutlass. If True, the function returns a boolean indicating the presence of Cutlass. If False, it returns the path where Cutlass is found.

Returns:

Depending on the value of check_only, this function either returns:
  • A boolean value indicating whether Cutlass was found (True) or not (False).

  • The string path to the directory where Cutlass is located. If not found, returns an empty string.

Return type:

Union[bool, str]

Note

The function utilizes check_path(p), a separate function not shown here, to determine if Cutlass is present in each directory p. It is assumed that check_path(p) returns a tuple (bool, str), where the boolean indicates success, and the string represents the path.