#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 |
| |
| int | get_num_warps_per_sm () const noexcept |
| |
| int | get_num_multiprocessor () const noexcept |
| |
| int | get_major_version () const noexcept |
| |
| int | get_minor_version () const noexcept |
| |
| int | get_num_warps () const noexcept |
| |
| int | get_warp_size () const noexcept |
| |
| hipblasContext * | get_hipblas_handle () const |
| |
| hipblasContext * | get_blas_handle () const |
| |
| hipsparseContext * | get_hipsparse_handle () const |
| |
| hipsparseContext * | get_sparselib_handle () const |
| |
| int | get_closest_numa () const |
| |
| std::vector< int > | get_closest_pus () const |
| |
|
CUstream_st * | get_stream () const |
| |
| 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 |
| |
|
|
void | set_gpu_property () |
| |
|
void | init_handles () |
| |
|
| HipExecutor (int device_id, std::shared_ptr< Executor > master, std::shared_ptr< HipAllocatorBase > alloc, CUstream_st *stream) |
| |
| 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 OmpExecutor *other) const override |
| |
| virtual bool | verify_memory_to (const ReferenceExecutor *other) const override |
| |
| virtual bool | verify_memory_to (const DpcppExecutor *other) const override |
| |
| bool | verify_memory_to (const CudaExecutor *dest_exec) const override |
| |
| bool | verify_memory_to (const HipExecutor *dest_exec) const override |
| |
| void | populate_exec_info (const machine_topology *mach_topo) override |
| |
This is the Executor subclass which represents the HIP enhanced device.
◆ create()
| static std::shared_ptr< HipExecutor > gko::HipExecutor::create |
( |
int |
device_id, |
|
|
std::shared_ptr< Executor > |
master, |
|
|
bool |
device_reset, |
|
|
allocation_mode |
alloc_mode = default_hip_alloc_mode, |
|
|
CUstream_st * |
stream = nullptr |
|
) |
| |
|
static |
Creates a new HipExecutor.
- Parameters
-
| device_id | the HIP device id of this device |
| master | an executor on the host that is used to invoke the device kernels |
| device_reset | whether to reset the device after the object exits the scope. |
| alloc_mode | the allocation mode that the executor should operate on. See @allocation_mode for more details |
◆ get_blas_handle()
| hipblasContext * gko::HipExecutor::get_blas_handle |
( |
| ) |
const |
|
inline |
Get the hipblas handle for this executor
- Returns
- the hipblas handle (hipblasContext*) for this executor
◆ get_closest_numa()
| int gko::HipExecutor::get_closest_numa |
( |
| ) |
const |
|
inline |
Get the closest NUMA node
- Returns
- the closest NUMA node closest to this device
◆ get_closest_pus()
| std::vector< int > gko::HipExecutor::get_closest_pus |
( |
| ) |
const |
|
inline |
Get the closest PUs
- Returns
- the array of PUs closest to this device
◆ get_description()
| std::string gko::HipExecutor::get_description |
( |
| ) |
const |
|
overridevirtual |
- Returns
- a textual representation of the executor and its device.
Implements gko::Executor.
◆ get_device_id()
| int gko::HipExecutor::get_device_id |
( |
| ) |
const |
|
inlinenoexcept |
Get the HIP device id of the device associated to this executor.
◆ get_hipblas_handle()
| hipblasContext * gko::HipExecutor::get_hipblas_handle |
( |
| ) |
const |
|
inline |
Get the hipblas handle for this executor
- Returns
- the hipblas handle (hipblasContext*) for this executor
◆ get_hipsparse_handle()
| hipsparseContext * gko::HipExecutor::get_hipsparse_handle |
( |
| ) |
const |
|
inline |
Get the hipsparse handle for this executor
- Returns
- the hipsparse handle (hipsparseContext*) for this executor
◆ get_major_version()
| int gko::HipExecutor::get_major_version |
( |
| ) |
const |
|
inlinenoexcept |
Get the major version of compute capability.
◆ get_master() [1/2]
| std::shared_ptr< const Executor > gko::HipExecutor::get_master |
( |
| ) |
const |
|
overridevirtualnoexcept |
◆ get_master() [2/2]
| std::shared_ptr< Executor > gko::HipExecutor::get_master |
( |
| ) |
|
|
overridevirtualnoexcept |
◆ get_minor_version()
| int gko::HipExecutor::get_minor_version |
( |
| ) |
const |
|
inlinenoexcept |
Get the minor version of compute capability.
◆ get_num_devices()
| static int gko::HipExecutor::get_num_devices |
( |
| ) |
|
|
static |
Get the number of devices present on the system.
◆ get_num_multiprocessor()
| int gko::HipExecutor::get_num_multiprocessor |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of multiprocessor of this executor.
◆ get_num_warps()
| int gko::HipExecutor::get_num_warps |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of warps of this executor.
◆ get_num_warps_per_sm()
| int gko::HipExecutor::get_num_warps_per_sm |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of warps per SM of this executor.
◆ get_scoped_device_id_guard()
◆ get_sparselib_handle()
| hipsparseContext * gko::HipExecutor::get_sparselib_handle |
( |
| ) |
const |
|
inline |
Get the hipsparse handle for this executor
- Returns
- the hipsparse handle (hipsparseContext*) for this executor
◆ get_warp_size()
| int gko::HipExecutor::get_warp_size |
( |
| ) |
const |
|
inlinenoexcept |
Get the warp size of this executor.
◆ populate_exec_info()
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::HipExecutor::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::HipExecutor::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::HipExecutor::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::HipExecutor::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::HipExecutor::raw_copy_to |
( |
const OmpExecutor * |
dest_exec, |
|
|
size_type |
n_bytes, |
|
|
const void * |
src_ptr, |
|
|
void * |
dest_ptr |
|
) |
| const |
|
overrideprotectedvirtual |
◆ raw_free()
| void gko::HipExecutor::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::HipExecutor::synchronize |
( |
| ) |
const |
|
overridevirtual |
Synchronize the operations launched on the executor with its master.
Implements gko::Executor.
◆ verify_memory_to() [1/5]
| bool gko::HipExecutor::verify_memory_to |
( |
const CudaExecutor * |
dest_exec | ) |
const |
|
overrideprotectedvirtual |
◆ verify_memory_to() [2/5]
| virtual bool gko::HipExecutor::verify_memory_to |
( |
const DpcppExecutor * |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
◆ verify_memory_to() [3/5]
| bool gko::HipExecutor::verify_memory_to |
( |
const HipExecutor * |
dest_exec | ) |
const |
|
overrideprotectedvirtual |
◆ verify_memory_to() [4/5]
| virtual bool gko::HipExecutor::verify_memory_to |
( |
const OmpExecutor * |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
◆ verify_memory_to() [5/5]
| virtual bool gko::HipExecutor::verify_memory_to |
( |
const ReferenceExecutor * |
other | ) |
const |
|
inlineoverrideprotectedvirtual |
The documentation for this class was generated from the following file: