![]() |
Peano
|
Core. More...
#include <Device.h>
Public Member Functions | |
~Device () | |
Destructor. | |
void | configure (const std::set< int > &devicesToUse={}) |
void | shutdown () |
Shutdown parallel environment. | |
bool | isInitialised () const |
int | getNumberOfDevices () const |
Return the number of GPUs that are available. | |
~Device () | |
Destructor. | |
void | configure (const std::set< int > &devicesToUse={}) |
void | shutdown () |
Shutdown parallel environment. | |
bool | isInitialised () const |
int | getNumberOfDevices () const |
Return the number of GPUs that are available. | |
int | getLocalDeviceId () const |
~Device () | |
Destructor. | |
void | configure (const std::set< int > &devicesToUse) |
void | shutdown () |
Shutdown parallel environment. | |
bool | isInitialised () const |
int | getNumberOfDevices () const |
Return the number of GPUs that are available. | |
Static Public Member Functions | |
static Device & | getInstance () |
static Device & | getInstance () |
static Device & | getInstance () |
Static Public Attributes | |
static constexpr int | HostDevice = -1 |
Accelerator devices (GPUs) are enumerated starting from 0. | |
Private Member Functions | |
Device () | |
Device () | |
Device () | |
Private Attributes | |
int | _numberOfDevices |
std::set< int > | _devicesToUse |
Static Private Attributes | |
static tarch::logging::Log | _log |
Logging device. | |
static int | _localDeviceId = 0 |
Core.
Any shared memory implementation has to provide a singleton Core. Its full qualified name is tarch::multicore::Core. If no shared memory variant is switched on, Peano provides a default Core implementation that does nothing.
If you don't configure the core explicitly, it will try to use some meaningful default.
|
private |
tarch::accelerator::Device::~Device | ( | ) |
Destructor.
|
private |
tarch::accelerator::Device::~Device | ( | ) |
Destructor.
|
private |
tarch::accelerator::Device::~Device | ( | ) |
Destructor.
In the TBB context, the GPU setting are ignored. If you however combine TBB with SYCL, then the SYCL policies (see below) hold.
By default, OpenMP makes all devices visible to the user.
In SYCL, you cannot alter the core count atm on the node. Obviously, we could split the queue on the host according to this spec, but then we'd end up with some cores idling. So we do not support resetting the thread count on the host with SYCL.
By default, SYCL makes no device visible to the user. You have to call configure() manually to make GPUs available to Peano.
In the TBB context, the GPU setting are ignored. If you however combine TBB with SYCL, then the SYCL policies (see below) hold.
By default, OpenMP makes all devices visible to the user.
In SYCL, you cannot alter the core count atm on the node. Obviously, we could split the queue on the host according to this spec, but then we'd end up with some cores idling. So we do not support resetting the thread count on the host with SYCL.
By default, SYCL makes no device visible to the user. You have to call configure() manually to make GPUs available to Peano.
Referenced by swift2::parseCommandLineArguments().
In the TBB context, the GPU setting are ignored. If you however combine TBB with SYCL, then the SYCL policies (see below) hold.
By default, OpenMP makes all devices visible to the user.
In SYCL, you cannot alter the core count atm on the node. Obviously, we could split the queue on the host according to this spec, but then we'd end up with some cores idling. So we do not support resetting the thread count on the host with SYCL.
By default, SYCL makes no device visible to the user. You have to call configure() manually to make GPUs available to Peano.
|
static |
Referenced by benchmarks::exahype2::ccz4::MulticoreOrchestration::getNumberOfTasksToHoldBack(), main(), swift2::parseCommandLineArguments(), tarch::multicore::orchestration::AllOnGPU::toggleDevice(), and peano4::writeCopyrightMessage().
|
static |
|
static |
int tarch::accelerator::Device::getLocalDeviceId | ( | ) | const |
Definition at line 35 of file Device.cpp.
int tarch::accelerator::Device::getNumberOfDevices | ( | ) | const |
Return the number of GPUs that are available.
It is then Peano's policy that you access these GPUs with numbers from 0 to ... We work with logical GPU numbers, i.e. they might be mapped onto different numbers internally. How this mapping is realised however is strongly depending on the used GPU backend.
Referenced by tarch::multicore::orchestration::AllOnGPU::toggleDevice().
int tarch::accelerator::Device::getNumberOfDevices | ( | ) | const |
Return the number of GPUs that are available.
It is then Peano's policy that you access these GPUs with numbers from 0 to ... We work with logical GPU numbers, i.e. they might be mapped onto different numbers internally. How this mapping is realised however is strongly depending on the used GPU backend.
int tarch::accelerator::Device::getNumberOfDevices | ( | ) | const |
Return the number of GPUs that are available.
It is then Peano's policy that you access these GPUs with numbers from 0 to ... We work with logical GPU numbers, i.e. they might be mapped onto different numbers internally. How this mapping is realised however is strongly depending on the used GPU backend.
bool tarch::accelerator::Device::isInitialised | ( | ) | const |
bool tarch::accelerator::Device::isInitialised | ( | ) | const |
bool tarch::accelerator::Device::isInitialised | ( | ) | const |
void tarch::accelerator::Device::shutdown | ( | ) |
Shutdown parallel environment.
void tarch::accelerator::Device::shutdown | ( | ) |
Shutdown parallel environment.
void tarch::accelerator::Device::shutdown | ( | ) |
Shutdown parallel environment.
|
private |
|
staticprivate |
|
staticprivate |
|
staticconstexpr |
Accelerator devices (GPUs) are enumerated starting from 0.
If you argue where to offload tasks and want to pick the host, then pass in this constant instead.
Definition at line 48 of file Device.h.
Referenced by runBenchmarks(), runBenchmarks(), wrapBatchedHeapFunctorHostKernels(), wrapDeviceKernel(), wrapDeviceKernel(), wrapHostKernel(), wrapPatchwiseHeapFunctorsHostKernel(), wrapStatelessHostKernel(), and wrapVolumewiseFunctorHostKernels().