TargetInfo.check_enabled#
- TargetInfo.check_enabled(desired_devices)#
Check if target supports desired devices
Checks if target is in a set of desired devices. If not, the target is considered disabled by the caller.
- Parameters:
desired_devices (list) – Device names that is a subset of [‘cpu’, ‘gpu’, ‘cuda’] or None.
- Returns:
is_contained – Return True when desired_devices is None or when the target device name is listed in desired_devices. Otherwise, return False.
- Return type:
bool