function_supported_devices#

ivy.function_supported_devices(fn, recurse=True)[source]#

Return the supported devices of the current backend’s function.

Parameters:
  • fn (Callable) – The function to check for the supported device attribute

  • recurse (bool) – Whether to recurse into used ivy functions. Default is True. (default: True)

Return type:

Tuple

Returns:

ret – Tuple containing the supported devices of the function

Examples

>>> import ivy
>>> print(ivy.function_supported_devices(ivy.ones))
('cpu', 'gpu')