DPU C++ Host API  2025.1.0
dpu::DpuSetAsync Class Reference

Interface of a DPU set for asynchronous operations. More...

#include <dpu.hpp>

Inheritance diagram for dpu::DpuSetAsync:
[legend]
Collaboration diagram for dpu::DpuSetAsync:
[legend]

Public Member Functions

void call (const CallbackFn &Callback, bool IsBlocking, bool SingleCall)
 Call the given function on each DPU rank, or the whole set. More...
 
void call (const CallbackFn &Callback)
 Call the given function on each DPU rank. More...
 
void sync ()
 Wait for the end of all queued asynchronous operations. More...
 
- Public Member Functions inherited from dpu::DpuSetOps
template<typename T >
void copy (const std::string &DstSymbol, unsigned Offset, const std::vector< T > &SrcBuffer, unsigned Size)
 Copy the same data to all the DPUs in the set. More...
 
template<typename T >
void copy (const std::string &DstSymbol, unsigned Offset, const std::vector< T > &SrcBuffer)
 Copy the same data to all the DPUs in the set. More...
 
template<typename T >
void copy (const std::string &DstSymbol, const std::vector< T > &SrcBuffer, unsigned Size)
 Copy the same data to all the DPUs in the set. More...
 
template<typename T >
void copy (const std::string &DstSymbol, const std::vector< T > &SrcBuffer)
 Copy the same data to all the DPUs in the set. More...
 
template<typename T >
void copy (DpuSymbol &DstSymbol, unsigned Offset, const std::vector< T > &SrcBuffer, unsigned Size)
 Copy the same data to all the DPUs in the set. More...
 
template<typename T >
void copy (DpuSymbol &DstSymbol, unsigned Offset, const std::vector< T > &SrcBuffer)
 Copy the same data to all the DPUs in the set. More...
 
template<typename T >
void copy (DpuSymbol &DstSymbol, const std::vector< T > &SrcBuffer, unsigned Size)
 Copy the same data to all the DPUs in the set. More...
 
template<typename T >
void copy (DpuSymbol &DstSymbol, const std::vector< T > &SrcBuffer)
 Copy the same data to all the DPUs in the set. More...
 
template<typename T >
void copy (const std::string &DstSymbol, unsigned Offset, const std::vector< std::vector< T >> &SrcBuffers, unsigned Size)
 Copy the different buffers to the DPUs in the set. More...
 
template<typename T >
void copy (const std::string &DstSymbol, unsigned Offset, const std::vector< std::vector< T >> &SrcBuffers)
 Copy the different buffers to the DPUs in the set. More...
 
template<typename T >
void copy (const std::string &DstSymbol, const std::vector< std::vector< T >> &SrcBuffers, unsigned Size)
 Copy the different buffers to the DPUs in the set. More...
 
template<typename T >
void copy (const std::string &DstSymbol, const std::vector< std::vector< T >> &SrcBuffers)
 Copy the different buffers to the DPUs in the set. More...
 
void copyScatterGather (const std::string &DstSymbol, unsigned Offset, get_block_t &get_block_info, unsigned Size, bool length_check=true)
 Copy the different buffers to the DPUs in the set with a scatter/gather transfer. More...
 
void copyScatterGather (const std::string &DstSymbol, get_block_t &get_block_info, unsigned Size, bool length_check=true)
 Copy the different buffers to the DPUs in the set with a scatter/gather transfer. More...
 
template<class F >
void copyScatterGather (const std::string &DstSymbol, unsigned Offset, F f, unsigned Size, bool length_check=true)
 Copy the different buffers to the DPUs in the set with a scatter/gather transfer. More...
 
template<class F >
void copyScatterGather (const std::string &DstSymbol, F f, unsigned Size, bool length_check=true)
 Copy the different buffers to the DPUs in the set with a scatter/gather transfer. More...
 
template<typename T >
void copy (DpuSymbol &DstSymbol, unsigned Offset, const std::vector< std::vector< T >> &SrcBuffers, unsigned Size)
 Copy the different buffers to the DPUs in the set. More...
 
template<typename T >
void copy (DpuSymbol &DstSymbol, unsigned Offset, const std::vector< std::vector< T >> &SrcBuffers)
 Copy the different buffers to the DPUs in the set. More...
 
template<typename T >
void copy (DpuSymbol &DstSymbol, const std::vector< std::vector< T >> &SrcBuffers, unsigned Size)
 Copy the different buffers to the DPUs in the set. More...
 
template<typename T >
void copy (DpuSymbol &DstSymbol, const std::vector< std::vector< T >> &SrcBuffers)
 Copy the different buffers to the DPUs in the set. More...
 
void copyScatterGather (DpuSymbol &DstSymbol, unsigned Offset, get_block_t &get_block_info, unsigned Size, bool length_check=true)
 Copy the different buffers to the DPUs in the set with a scatter/gather transfer. More...
 
void copyScatterGather (DpuSymbol &DstSymbol, get_block_t &get_block_info, unsigned Size, bool length_check=true)
 Copy the different buffers to the DPUs in the set with a scatter/gather transfer. More...
 
template<class F >
void copyScatterGather (DpuSymbol &DstSymbol, unsigned Offset, F f, unsigned Size, bool length_check=true)
 Copy the different buffers to the DPUs in the set with a scatter/gather transfer. More...
 
template<class F >
void copyScatterGather (DpuSymbol &DstSymbol, F f, unsigned Size, bool length_check=true)
 Copy the different buffers to the DPUs in the set with a scatter/gather transfer. More...
 
template<typename T >
void copy (std::vector< std::vector< T >> &DstBuffers, unsigned Size, const std::string &SrcSymbol, unsigned Offset)
 Copy data from the DPUs in the set. More...
 
template<typename T >
void copy (std::vector< std::vector< T >> &DstBuffers, unsigned Size, const std::string &SrcSymbol)
 Copy data from the DPUs in the set. More...
 
template<typename T >
void copy (std::vector< std::vector< T >> &DstBuffers, const std::string &SrcSymbol, unsigned Offset)
 Copy data from the DPUs in the set. More...
 
template<typename T >
void copy (std::vector< std::vector< T >> &DstBuffers, const std::string &SrcSymbol)
 Copy data from the DPUs in the set. More...
 
void copyScatterGather (get_block_t &get_block_info, unsigned Size, const std::string &SrcSymbol, unsigned Offset, bool length_check=true)
 Copy data from the DPUs in the set with a scatter-gather transfer. More...
 
void copyScatterGather (get_block_t &get_block_info, unsigned Size, const std::string &SrcSymbol, bool length_check=true)
 Copy data from the DPUs in the set with a scatter-gather transfer. More...
 
template<class F >
void copyScatterGather (F f, unsigned Size, const std::string &SrcSymbol, unsigned Offset, bool length_check=true)
 Copy data from the DPUs in the set with a scatter-gather transfer. More...
 
template<class F >
void copyScatterGather (F f, unsigned Size, const std::string &SrcSymbol, bool length_check=true)
 Copy data from the DPUs in the set with a scatter-gather transfer. More...
 
template<typename T >
void copy (std::vector< std::vector< T >> &DstBuffers, unsigned Size, DpuSymbol &SrcSymbol, unsigned Offset)
 Copy data from the DPUs in the set. More...
 
template<typename T >
void copy (std::vector< std::vector< T >> &DstBuffers, unsigned Size, DpuSymbol &SrcSymbol)
 Copy data from the DPUs in the set. More...
 
template<typename T >
void copy (std::vector< std::vector< T >> &DstBuffers, DpuSymbol &SrcSymbol, unsigned Offset)
 Copy data from the DPUs in the set. More...
 
template<typename T >
void copy (std::vector< std::vector< T >> &DstBuffers, DpuSymbol &SrcSymbol)
 Copy data from the DPUs in the set. More...
 
void copyScatterGather (get_block_t &get_block_info, unsigned Size, DpuSymbol &SrcSymbol, unsigned Offset, bool length_check=true)
 Copy data from the DPUs in the set with a scatter-gather transfer. More...
 
void copyScatterGather (get_block_t &get_block_info, unsigned Size, DpuSymbol &SrcSymbol, bool length_check=true)
 Copy data from the DPUs in the set with a scatter-gather transfer. More...
 
template<class F >
void copyScatterGather (F f, unsigned Size, DpuSymbol &SrcSymbol, unsigned Offset, bool length_check=true)
 Copy data from the DPUs in the set with a scatter-gather transfer. More...
 
template<class F >
void copyScatterGather (F f, unsigned Size, DpuSymbol &SrcSymbol, bool length_check=true)
 Copy data from the DPUs in the set with a scatter-gather transfer. More...
 
void exec ()
 Execute a DPU program. More...
 

Friends

class DpuSet
 

Detailed Description

Interface of a DPU set for asynchronous operations.

Member Function Documentation

◆ call() [1/2]

void dpu::DpuSetAsync::call ( const CallbackFn Callback,
bool  IsBlocking,
bool  SingleCall 
)
inline

Call the given function on each DPU rank, or the whole set.

Parameters
Callbackthe function to be called
IsBlockingwhether the other asynchronous operations on the DPU rankhave to wait the callback before starting
SingleCallwhether the function is called only once for the whole set
Exceptions
DpuErrorwhen the callback could not run properly

◆ call() [2/2]

void dpu::DpuSetAsync::call ( const CallbackFn Callback)
inline

Call the given function on each DPU rank.

Only synchronous DPU operations are available in a callback.

Parameters
Callbackthe function to be called
Exceptions
DpuErrorwhen the callback could not run properly

◆ sync()

void dpu::DpuSetAsync::sync ( )
inline

Wait for the end of all queued asynchronous operations.

Exceptions
DpuErrorwhen any asynchronous operation throws a DpuError

The documentation for this class was generated from the following file: