#include <ginkgo/core/base/executor.hpp>
|
| std::shared_ptr< Executor > | get_master () noexcept override |
| |
| std::shared_ptr< const Executor > | get_master () const noexcept override |
| |
| void | synchronize () const override |
| |
| scoped_device_id_guard | get_scoped_device_id_guard () const override |
| |
| std::string | get_description () const override |
| |
| int | get_device_id () const noexcept |
| |
|
sycl::queue * | get_queue () const |
| |
| const std::vector< int > & | get_subgroup_sizes () const noexcept |
| |
| int | get_num_computing_units () const noexcept |
| |
| int | get_num_subgroups () const noexcept |
| |
| const std::vector< int > & | get_max_workitem_sizes () const noexcept |
| |
| int | get_max_workgroup_size () const noexcept |
| |
| int | get_max_subgroup_size () const noexcept |
| |
| std::string | get_device_type () const noexcept |
| |
| virtual void | run (const Operation &op) const=0 |
| |
| template<typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp > |
| void | run (const ClosureOmp &op_omp, const ClosureCuda &op_cuda, const ClosureHip &op_hip, const ClosureDpcpp &op_dpcpp) const |
| |
| template<typename ClosureReference , typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp > |
| void | run (std::string name, const ClosureReference &op_ref, const ClosureOmp &op_omp, const ClosureCuda &op_cuda, const ClosureHip &op_hip, const ClosureDpcpp &op_dpcpp) const |
| |
|
| static std::shared_ptr< DpcppExecutor > | create (int device_id, std::shared_ptr< Executor > master, std::string device_type="all", dpcpp_queue_property property=dpcpp_queue_property::in_order) |
| |
| static int | get_num_devices (std::string device_type) |
| |
|
|
void | set_device_property (dpcpp_queue_property property=dpcpp_queue_property::in_order) |
| |
|
| DpcppExecutor (int device_id, std::shared_ptr< Executor > master, std::string device_type="all", dpcpp_queue_property property=dpcpp_queue_property::in_order) |
| |
| void | populate_exec_info (const machine_topology *mach_topo) override |
| |
| void * | raw_alloc (size_type size) const override |
| |
| void | raw_free (void *ptr) const noexcept override |
| |
| void | raw_copy_to (const OmpExecutor *dest_exec, size_type n_bytes, const void *src_ptr, void *dest_ptr) const override |
| |
| void | raw_copy_to (const HipExecutor *dest_exec, size_type n_bytes, const void *src_ptr, void *dest_ptr) const override |
| |
| void | raw_copy_to (const DpcppExecutor *dest_exec, size_type n_bytes, const void *src_ptr, void *dest_ptr) const override |
| |
| void | raw_copy_to (const CudaExecutor *dest_exec, size_type n_bytes, const void *src_ptr, void *dest_ptr) const override |
| |
| virtual bool | verify_memory_to (const CudaExecutor *other) const override |
| |
| virtual bool | verify_memory_to (const HipExecutor *other) const override |
| |
| virtual bool | verify_memory_to (const ReferenceExecutor *other) const override |
| |
| bool | verify_memory_to (const OmpExecutor *dest_exec) const override |
| |
| bool | verify_memory_to (const DpcppExecutor *dest_exec) const override |
| |
This is the Executor subclass which represents a DPC++ enhanced device.
◆ create()
| static std::shared_ptr< DpcppExecutor > gko::DpcppExecutor::create |
( |
int |
device_id, |
|
|
std::shared_ptr< Executor > |
master, |
|
|
std::string |
device_type = "all", |
|
|
dpcpp_queue_property |
property = dpcpp_queue_property::in_order |
|
) |
| |
|
static |
Creates a new DpcppExecutor.
- Parameters
-
| device_id | the DPCPP device id of this device |
| master | an executor on the host that is used to invoke the device kernels |
| device_type | a string representing the type of device to consider (accelerator, cpu, gpu or all). |
◆ get_description()
| std::string gko::DpcppExecutor::get_description |
( |
| ) |
const |
|
overridevirtual |
- Returns
- a textual representation of the executor and its device.
Implements gko::Executor.
◆ get_device_id()
| int gko::DpcppExecutor::get_device_id |
( |
| ) |
const |
|
inlinenoexcept |
Get the DPCPP device id of the device associated to this executor.
- Returns
- the DPCPP device id of the device associated to this executor
◆ get_device_type()
| std::string gko::DpcppExecutor::get_device_type |
( |
| ) |
const |
|
inlinenoexcept |
Get a string representing the device type.
- Returns
- a string representing the device type
◆ get_master() [1/2]
| std::shared_ptr< const Executor > gko::DpcppExecutor::get_master |
( |
| ) |
const |
|
overridevirtualnoexcept |
◆ get_master() [2/2]
| std::shared_ptr< Executor > gko::DpcppExecutor::get_master |
( |
| ) |
|
|
overridevirtualnoexcept |
◆ get_max_subgroup_size()
| int gko::DpcppExecutor::get_max_subgroup_size |
( |
| ) |
const |
|
inlinenoexcept |
Get the maximum subgroup size.
- Returns
- the maximum subgroup size
◆ get_max_workgroup_size()
| int gko::DpcppExecutor::get_max_workgroup_size |
( |
| ) |
const |
|
inlinenoexcept |
Get the maximum workgroup size.
- Returns
- the maximum workgroup size
◆ get_max_workitem_sizes()
| const std::vector< int > & gko::DpcppExecutor::get_max_workitem_sizes |
( |
| ) |
const |
|
inlinenoexcept |
Get the maximum work item sizes.
- Returns
- the maximum work item sizes
◆ get_num_computing_units()
| int gko::DpcppExecutor::get_num_computing_units |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of Computing Units of this executor.
- Returns
- the number of Computing Units of this executor
◆ get_num_devices()
| static int gko::DpcppExecutor::get_num_devices |
( |
std::string |
device_type | ) |
|
|
static |
Get the number of devices present on the system.
- Parameters
-
| device_type | a string representing the device type |
- Returns
- the number of devices present on the system
◆ get_num_subgroups()
| int gko::DpcppExecutor::get_num_subgroups |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of subgroups of this executor.
◆ get_scoped_device_id_guard()
◆ get_subgroup_sizes()
| const std::vector< int > & gko::DpcppExecutor::get_subgroup_sizes |
( |
| ) |
const |
|
inlinenoexcept |
Get the available subgroup sizes for this device.
- Returns
- the available subgroup sizes for this device
◆ populate_exec_info()
| void gko::DpcppExecutor::populate_exec_info |
( |
const machine_topology * |
mach_topo | ) |
|
|
overrideprotectedvirtual |
Populates the executor specific info from the global machine topology object.
- Parameters
-
| mach_topo | the machine topology object. |
Implements gko::Executor.
◆ raw_alloc()
| void * gko::DpcppExecutor::raw_alloc |
( |
size_type |
size | ) |
const |
|
overrideprotectedvirtual |
Allocates raw memory in this Executor.
- Parameters
-
| size | number of bytes to allocate |
- Exceptions
-
- Returns
- raw pointer to allocated memory
Implements gko::Executor.
◆ raw_copy_to() [1/4]
| void gko::DpcppExecutor::raw_copy_to |
( |
const CudaExecutor * |
dest_exec, |
|
|
size_type |
n_bytes, |
|
|
const void * |
src_ptr, |
|
|
void * |
dest_ptr |
|
) |
| const |
|
overrideprotectedvirtual |
◆ raw_copy_to() [2/4]
| void gko::DpcppExecutor::raw_copy_to |
( |
const DpcppExecutor * |
dest_exec, |
|
|
size_type |
n_bytes, |
|
|
const void * |
src_ptr, |
|
|
void * |
dest_ptr |
|
) |
| const |
|
overrideprotectedvirtual |
◆ raw_copy_to() [3/4]
| void gko::DpcppExecutor::raw_copy_to |
( |
const HipExecutor * |
dest_exec, |
|
|
size_type |
n_bytes, |
|
|
const void * |
src_ptr, |
|
|
void * |
dest_ptr |
|
) |
| const |
|
overrideprotectedvirtual |
◆ raw_copy_to() [4/4]
| void gko::DpcppExecutor::raw_copy_to |
( |
const OmpExecutor * |
dest_exec, |
|
|
size_type |
n_bytes, |
|
|
const void * |
src_ptr, |
|
|
void * |
dest_ptr |
|
) |
| const |
|
overrideprotectedvirtual |
◆ raw_free()
| void gko::DpcppExecutor::raw_free |
( |
void * |
ptr | ) |
const |
|
overrideprotectedvirtualnoexcept |
Frees memory previously allocated with Executor::alloc().
If ptr is a nullptr, the function has no effect.
- Parameters
-
| ptr | pointer to the allocated memory block |
Implements gko::Executor.
◆ run() [1/3]
template<typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp >
| void gko::Executor::run |
( |
const ClosureOmp & |
op_omp, |
|
|
const ClosureCuda & |
op_cuda, |
|
|
const ClosureHip & |
op_hip, |
|
|
const ClosureDpcpp & |
op_dpcpp |
|
) |
| const |
|
inline |
Runs one of the passed in functors, depending on the Executor type.
- Template Parameters
-
| ClosureOmp | type of op_omp |
| ClosureCuda | type of op_cuda |
| ClosureHip | type of op_hip |
| ClosureDpcpp | type of op_dpcpp |
- Parameters
-
◆ run() [2/3]
| virtual void gko::Executor::run |
( |
const Operation & |
op | ) |
const |
|
virtual |
◆ run() [3/3]
template<typename ClosureReference , typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp >
| void gko::Executor::run |
( |
std::string |
name, |
|
|
const ClosureReference & |
op_ref, |
|
|
const ClosureOmp & |
op_omp, |
|
|
const ClosureCuda & |
op_cuda, |
|
|
const ClosureHip & |
op_hip, |
|
|
const ClosureDpcpp & |
op_dpcpp |
|
) |
| const |
|
inline |
Runs one of the passed in functors, depending on the Executor type.
- Template Parameters
-
| ClosureReference | type of op_ref |
| ClosureOmp | type of op_omp |
| ClosureCuda | type of op_cuda |
| ClosureHip | type of op_hip |
| ClosureDpcpp | type of op_dpcpp |
- Parameters
-
◆ synchronize()
| void gko::DpcppExecutor::synchronize |
( |
| ) |
const |
|
overridevirtual |
Synchronize the operations launched on the executor with its master.
Implements gko::Executor.
◆ verify_memory_to() [1/5]
| virtual bool gko::DpcppExecutor::verify_memory_to |
( |
const CudaExecutor * |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
◆ verify_memory_to() [2/5]
| bool gko::DpcppExecutor::verify_memory_to |
( |
const DpcppExecutor * |
dest_exec | ) |
const |
|
overrideprotectedvirtual |
◆ verify_memory_to() [3/5]
| virtual bool gko::DpcppExecutor::verify_memory_to |
( |
const HipExecutor * |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
◆ verify_memory_to() [4/5]
| bool gko::DpcppExecutor::verify_memory_to |
( |
const OmpExecutor * |
dest_exec | ) |
const |
|
overrideprotectedvirtual |
◆ verify_memory_to() [5/5]
| virtual bool gko::DpcppExecutor::verify_memory_to |
( |
const ReferenceExecutor * |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
The documentation for this class was generated from the following file: