Gromacs  2022.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Enumerations | Variables
device_information.h File Reference
#include "config.h"
#include "gromacs/utility/enumerationhelpers.h"
+ Include dependency graph for device_information.h:
+ This graph shows which files directly or indirectly include this file:

Description

Declares the GPU information structure and its helpers.

Author
Anca Hamuraru anca@.nosp@m.stre.nosp@m.amcom.nosp@m.puti.nosp@m.ng.eu
Dimitrios Karkoulis dimit.nosp@m.ris..nosp@m.karko.nosp@m.ulis.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
Teemu Virolainen teemu.nosp@m.@str.nosp@m.eamco.nosp@m.mput.nosp@m.ing.e.nosp@m.u
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Szilárd Páll pall..nosp@m.szil.nosp@m.ard@g.nosp@m.mail.nosp@m..com
Artem Zhmurov zhmur.nosp@m.ov@g.nosp@m.mail..nosp@m.com

Classes

struct  DeviceInformation
 Platform-dependent device information. More...
 

Enumerations

enum  DeviceStatus : int {
  DeviceStatus::Compatible, DeviceStatus::Nonexistent, DeviceStatus::Incompatible, DeviceStatus::IncompatibleClusterSize,
  DeviceStatus::IncompatibleNvidiaVolta, DeviceStatus::NotPreferredBackend, DeviceStatus::NonFunctional, DeviceStatus::Unavailable,
  DeviceStatus::DeviceNotTargeted, DeviceStatus::IncompatibleLevelZeroAndOneApi2022, DeviceStatus::Count
}
 Possible results of the GPU detection/check. More...
 
enum  DeviceVendor : int {
  DeviceVendor::Unknown = 0, DeviceVendor::Nvidia = 1, DeviceVendor::Amd = 2, DeviceVendor::Intel = 3,
  DeviceVendor::Count = 4
}
 Device vendors. More...
 

Variables

static constexpr bool c_binarySupportsGpus = (GMX_GPU != 0)
 Constant used to help minimize preprocessed code.
 
static constexpr bool c_canSerializeDeviceInformation
 Whether DeviceInformation can be serialized for sending via MPI. More...
 
static const
gmx::EnumerationArray
< DeviceStatus, const char * > 
c_deviceStateString
 Names of the GPU detection/check results. More...
 

Enumeration Type Documentation

enum DeviceStatus : int
strong

Possible results of the GPU detection/check.

Enumerator
Compatible 

The device is compatible.

Nonexistent 

Device does not exist.

Incompatible 

Device is not compatible.

IncompatibleClusterSize 

OpenCL device has incompatible cluster size for non-bonded kernels.

IncompatibleNvidiaVolta 

There are known issues with OpenCL on NVIDIA Volta and newer.

NotPreferredBackend 

The device originates from non-recommended SYCL backend. The device might work by itself, but to simplify device allocation, it is marked as incompatible.

NonFunctional 

An error occurred during the functionality checks. That indicates malfunctioning of the device, driver, or incompatible driver/runtime.

Unavailable 

CUDA devices are busy or unavailable. typically due to use of cudaComputeModeExclusive, cudaComputeModeProhibited modes.

DeviceNotTargeted 

The device is outside the set of compilation targets. See GMX_CUDA_TARGET_SM and GMX_CUDA_TARGET_COMPUTE CMake variables.

IncompatibleLevelZeroAndOneApi2022 

LevelZero backend is known to cause errors with oneAPI 2022.0.1.

Count 

Enumeration size.

enum DeviceVendor : int
strong

Device vendors.

Enumerator
Unknown 

No data.

Nvidia 

NVIDIA.

Amd 

Advanced Micro Devices.

Intel 

Intel.

Count 

Enumeration size.

Variable Documentation

constexpr bool c_canSerializeDeviceInformation
static
Initial value:
=
(!GMX_GPU_OPENCL && !GMX_GPU_SYCL)

Whether DeviceInformation can be serialized for sending via MPI.

const gmx::EnumerationArray<DeviceStatus, const char*> c_deviceStateString
static
Initial value:
= {
"compatible",
"nonexistent",
"incompatible",
"incompatible (please recompile with correct GMX" "_GPU_NB_CLUSTER_SIZE of 4)",
"incompatible (please use CUDA build for NVIDIA Volta GPUs or newer)",
"not recommended (please use SYCL_DEVICE_FILTER to limit visibility to a single backend)",
"non-functional",
"unavailable",
"not in set of targeted devices",
"incompatible (Level Zero backend is not stable with oneAPI 2022.0)",
}

Names of the GPU detection/check results.

Check-source wants to warn about the use of a symbol name that would require an inclusion of config.h. However the use is in a comment, so that is a false warning. So C-style string concatenation is used to fool the naive parser in check-source. That needs a clang-format suppression in order to look reasonable. Also clang-tidy wants to suggest that a comma is missing, so that is suppressed.