qttools.profiling.utils#
source module qttools.profiling.utils
Functions
-
decorate_methods — Apply a decorator to multiple methods of a class.
-
get_cuda_devices — Returns the list of available CUDA devices.
source decorate_methods(decorator: Callable, exclude: list[str] | None = None) → Callable
Apply a decorator to multiple methods of a class.
Parameters
-
decorator : Callable — The decorator to apply to the methods.
-
exclude : list[str] | None, optional — A list of method names to exclude from decoration. By default all methods are decorated.
Returns
-
Callable — A class decorator that applies the decorator to all methods of the class.
source get_cuda_devices(return_names: bool = False)
Returns the list of available CUDA devices.
Parameters
-
return_names : bool — If the device names should be written out.
Returns
-
list — List of available devices