              import plaidml  # noqa pylint:disable=unused-import,import-outside-toplevel
          except ImportError:
              logger.error("PlaidML not found. Run `pip install plaidml-keras` for AMD support")
              return False
          from lib.plaidml_tools import setup_plaidml  # pylint:disable=import-outside-toplevel
          setup_plaidml(arguments.loglevel, arguments.exclude_gpus)
          logger.debug("setup up for PlaidML")
          return True
 
</s> remove         if get_backend() == "amd":
            plaidml_found = self._setup_amd(arguments)
            if not plaidml_found:
                safe_shutdown(got_error=True)
                sys.exit(1)
 </s> add         if get_backend() == "amd" and not self._setup_amd(arguments):
            safe_shutdown(got_error=True) </s> remove         if not hasattr(arguments, "exclude_gpus"):
 </s> add         if get_backend() == "cpu": </s> remove .. automodule:: lib.gpu_stats
 </s> add The GPU Stats Package handles collection of information from connected GPUs


.. contents:: Contents
   :local:

gpu_stats._base module
----------------------

.. automodule:: lib.gpu_stats._base
   :members:
   :undoc-members:
   :show-inheritance:

gpu_stats.amd module
--------------------

.. automodule:: lib.gpu_stats.amd
   :members:
   :undoc-members:
   :show-inheritance:

gpu_stats.cpu module
--------------------

.. automodule:: lib.gpu_stats.cpu
   :members:
   :undoc-members:
   :show-inheritance:

gpu_stats.nvidia_apple module
-----------------------------

.. automodule:: lib.gpu_stats.nvidia_apple
   :members:
   :undoc-members:
   :show-inheritance:

gpu_stats.nvidia module
-----------------------

.. automodule:: lib.gpu_stats.nvidia </s> remove         if GPUStats().exclude_all_devices and get_backend() != "cpu":
 </s> add         if GPUStats().exclude_all_devices:
        from lib.gpu_stats import setup_plaidml  # pylint:disable=import-outside-toplevel
              import plaidml  # noqa pylint:disable=unused-import,import-outside-toplevel
          except ImportError:
              logger.error("PlaidML not found. Run `pip install plaidml-keras` for AMD support")
              return False
        from lib.gpu_stats import setup_plaidml  # pylint:disable=import-outside-toplevel
          setup_plaidml(arguments.loglevel, arguments.exclude_gpus)
          logger.debug("setup up for PlaidML")
          return True
keep keep keep keep replace keep keep keep
 Refactor lib.gpu_stats (#1218)

* inital gpu_stats refactor

* Add dummy CPU Backend

* Update Sphinx documentation 
lib/cli/launcher.py