.. include:: ../substitutions

.. oe:namespace:: OEConfGen

.. meta::
   :keywords: OEOmegaSystemHasGPU

..  _OEConfGen_OEOmegaSystemHasGPU:

.. oe:function:: OEOmegaSystemHasGPU

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OEOmegaSystemHasGPU()

   .. oe:language:: python

      .. oe:api:: python

         OEOmegaSystemHasGPU() -> bool

   Determines whether a GPU is present on the current system. This will check that the
   system is a Linux platform and the `/dev/nvidiaN` file exits, where N can be between 0 and 100.
   It will not try to create a context on the GPU, so there is still the possibility that the GPU will not
   be available, either due to the driver being uninstalled or the GPU being used by another
   system user.