Executors#
|
Reference API
|
A module dedicated to the implementation and usage of the executors in Ginkgo. More...
Modules | |
| CUDA Executor | |
| A module dedicated to the implementation and usage of the CUDA executor in Ginkgo. | |
| DPC++ Executor | |
| A module dedicated to the implementation and usage of the DPC++ executor in Ginkgo. | |
| HIP Executor | |
| A module dedicated to the implementation and usage of the HIP executor in Ginkgo. | |
| OpenMP Executor | |
| A module dedicated to the implementation and usage of the OpenMP executor in Ginkgo. | |
| Reference Executor | |
| A module dedicated to the implementation and usage of the Reference executor in Ginkgo. | |
Classes | |
| class | gko::Operation |
| class | gko::Executor |
| class | gko::executor_deleter< T > |
| class | gko::OmpExecutor |
| class | gko::ReferenceExecutor |
| class | gko::CudaExecutor |
| class | gko::HipExecutor |
| class | gko::DpcppExecutor |
Macros | |
| #define | GKO_REGISTER_OPERATION(_name, _kernel) |
| #define | GKO_REGISTER_HOST_OPERATION(_name, _kernel) |
Detailed Description
A module dedicated to the implementation and usage of the executors in Ginkgo.
Below, we provide a brief introduction to executors in Ginkgo, how they have been implemented, how to best make use of them and how to add new executors.
Executors in Ginkgo.
The first step in using the Ginkgo library consists of creating an executor. Executors are used to specify the location for the data of linear algebra objects, and to determine where the operations will be executed. Ginkgo currently supports three different executor types:
- OpenMP Executor specifies that the data should be stored and the associated operations executed on an OpenMP-supporting device (e.g. host CPU);
- CUDA Executor specifies that the data should be stored and the operations executed on the NVIDIA GPU accelerator;
- HIP Executor uses the HIP library to compile code for either NVIDIA or AMD GPU accelerator;
- DPC++ Executor uses the DPC++ compiler for any DPC++ supported hardware (e.g. Intel CPUs, GPU, FPGAs, ...);
- Reference Executor executes a non-optimized reference implementation, which can be used to debug the library.
Macro Definition Documentation
◆ GKO_REGISTER_HOST_OPERATION
| #define GKO_REGISTER_HOST_OPERATION | ( | _name, | |
| _kernel | |||
| ) |
Binds a host-side kernel (independent of executor type) to an Operation.
It also defines a helper function which creates the associated operation. Any input arguments passed to the helper function are forwarded to the kernel when the operation is executed. The kernel name is searched for in the namespace where this macro is called. Host operations are used to make computations that are not part of the device kernels visible to profiling loggers and benchmarks.
- Parameters
-
_name operation name _kernel kernel which will be bound to the operation
Example
◆ GKO_REGISTER_OPERATION
| #define GKO_REGISTER_OPERATION | ( | _name, | |
| _kernel | |||
| ) |
Binds a set of device-specific kernels to an Operation.
It also defines a helper function which creates the associated operation. Any input arguments passed to the helper function are forwarded to the kernel when the operation is executed.
The kernels used to bind the operation are searched in kernels::DEV_TYPE namespace, where DEV_TYPE is replaced by omp, cuda, hip, dpcpp and reference.
- Parameters
-
_name operation name _kernel kernel which will be bound to the operation
Example
Generated by