get_supported_compute_types
- ctranslate2.get_supported_compute_types(device: str, device_index: int = 0) Set[str]
Returns the set of supported compute types on a device.
- Parameters
device – Device name (cpu or cuda).
device_index – Device index.
Example
>>> ctranslate2.get_supported_compute_types("cpu") {'int16', 'float32', 'int8', 'int8_float32'} >>> ctranslate2.get_supported_compute_types("cuda") {'float32', 'int8_float16', 'float16', 'int8', 'int8_float32'}