Gromacs  2021.2
 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 = 0, DeviceStatus::Nonexistent = 1, DeviceStatus::Incompatible = 2, DeviceStatus::IncompatibleClusterSize = 3,
  DeviceStatus::IncompatibleNvidiaVolta = 4, DeviceStatus::NonFunctional = 5, DeviceStatus::Unavailable = 6, DeviceStatus::Count = 7
}
 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
 
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 NVIDIA Volta and newer.

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.

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)
const gmx::EnumerationArray<DeviceStatus, const char*> c_deviceStateString
static
Initial value:
= {
"compatible", "nonexistent", "incompatible",
"incompatible (please recompile with correct GMX" "_OPENCL_NB_CLUSTER_SIZE of 4)",
"incompatible (please use CUDA build for NVIDIA Volta GPUs or newer)", "non-functional",
"unavailable"
}

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.