ACCL HLS Reference
-
namespace accl_hls
-
class ACCLCommand
- #include <accl_hls.h>
Class encapsulating ACCL command streams.
Public Functions
-
inline ACCLCommand(STREAM<command_word> &cmd, STREAM<command_word> &sts, ap_uint<32> comm_adr, ap_uint<32> dpcfg_adr, ap_uint<32> cflags, ap_uint<32> sflags)
Construct a new ACCLCommand object.
- Parameters:
cmd – Reference to command stream to CCLO
sts – Reference to status stream to CCLO
comm_adr – Communicator ID
dpcfg_adr – Address of datapath configuration in CCLO memory
cflags – Compression flags
sflags – Stream flags
-
inline ACCLCommand(STREAM<command_word> &cmd, STREAM<command_word> &sts)
Construct a new ACCLCommand object.
- Parameters:
cmd – Reference to command stream to CCLO
sts – Reference to status stream to CCLO
-
inline void start_call(ap_uint<32> scenario, ap_uint<32> len, ap_uint<32> comm, ap_uint<32> root_src_dst, ap_uint<32> function, ap_uint<32> msg_tag, ap_uint<32> datapath_cfg, ap_uint<32> compression_flags, ap_uint<32> stream_flags, ap_uint<64> addra, ap_uint<64> addrb, ap_uint<64> addrc)
Launch an ACCL call.
- Parameters:
scenario – Indicates type of call (see defines)
len – Length of buffers involved in call, in elements (not bytes)
comm – ID of communicator
root_src_dst – Either root, source or destination rank, depending on scenario
function – Function ID for reduction-type scenarios
msg_tag – Message tag
datapath_cfg – Address of datapath configuration structure
compression_flags – Compression flags
stream_flags – Stream flags
addra – Address of first operand, or zero if not in use
addrb – Address of second operand, or zero if not in use
addrc – Address of result, or zero if not in use
-
inline void finalize_call()
Wait for a previously-launched call to finish.
-
inline void copy(ap_uint<32> len, ap_uint<64> src_addr, ap_uint<64> dst_addr)
Perform ACCL local array copy.
- Parameters:
len – Number of array elements
src_addr – Source array address
dst_addr – Destination array address
-
inline void combine(ap_uint<32> len, ap_uint<64> op0_addr, ap_uint<64> op1_addr, ap_uint<64> res_addr)
Perform ACCL local array combine.
- Parameters:
len – Number of array elements
op0_addr – Address of first operand array
op1_addr – Address of second operand array
res_addr – Address of result array
-
inline void send(ap_uint<32> len, ap_uint<32> tag, ap_uint<32> dst_rank, ap_uint<64> src_addr)
Send data to a remote peer.
Two-sided, i.e. requires a recv on remote end.
- Parameters:
len – Number of array elements
tag – Message tag
dst_rank – Rank ID of destination
src_addr – Source array address
-
inline void stream_put(ap_uint<32> len, ap_uint<32> stream_id, ap_uint<32> dst_rank, ap_uint<64> src_addr)
One-sided data transfer to a stream on a remote peer.
- Parameters:
len – Number of array elements
stream_id – Stream ID at destination. IDs >=247 are reserved, call will not execute if set in this range
dst_rank – Rank ID of destination
src_addr – Source array address
-
inline void recv(ap_uint<32> len, ap_uint<32> tag, ap_uint<32> src_rank, ap_uint<64> dst_addr)
Receive data send from a remote peer.
- Parameters:
len – Number of array elements
tag – Message tag
src_rank – Rank ID of sender
dst_addr – Destination array address
-
inline void bcast(ap_uint<32> len, ap_uint<32> root, ap_uint<64> src_addr)
Broadcast data to members of the communicator.
- Parameters:
len – Number of array elements
root – Rank ID of root node
src_addr – Source array address
-
inline void scatter(ap_uint<32> len, ap_uint<32> root, ap_uint<64> src_addr, ap_uint<64> dst_addr)
Scatter data to members of the communicator.
- Parameters:
len – Number of array elements
root – Rank ID of root node
src_addr – Source array address
dst_addr – Destination array address
-
inline void gather(ap_uint<32> len, ap_uint<32> root, ap_uint<64> src_addr, ap_uint<64> dst_addr)
Gather data from members of the communicator.
- Parameters:
len – Number of array elements
root – Rank ID of root node
src_addr – Source array address
dst_addr – Destination array address
-
inline void all_gather(ap_uint<32> len, ap_uint<64> src_addr, ap_uint<64> dst_addr)
All-gather data in the communicator.
Equivalent to gather followed by broadcast
- Parameters:
len – Number of array elements
src_addr – Source array address
dst_addr – Destination array address
-
inline void reduce(ap_uint<32> len, ap_uint<32> root, ap_uint<32> function, ap_uint<64> src_addr, ap_uint<64> dst_addr)
Reduce data memory to memory.
- Parameters:
len – Number of array elements
root – Rank ID of root node
function – Reduction function ID
src_addr – Source array address
dst_addr – Destination array address
-
inline void reduce(ap_uint<32> len, ap_uint<32> root, ap_uint<32> function, ap_uint<64> dst_addr)
Reduce data stream to memory.
- Parameters:
len – Number of array elements
root – Rank ID of root node
function – Reduction function ID
dst_addr – Destination array address
-
inline void reduce(ap_uint<32> len, ap_uint<32> root, ap_uint<32> function)
Reduce data stream to stream.
- Parameters:
len – Number of array elements
root – Rank ID of root node
function – Reduction function ID
-
inline void reduce_scatter(ap_uint<32> len, ap_uint<32> function, ap_uint<64> src_addr, ap_uint<64> dst_addr)
Reduce-scatter data in the communicator.
Equivalent to reduce followed by scatter
- Parameters:
len – Number of array elements
function – Reduction function ID
src_addr – Source array address
dst_addr – Destination array address
-
inline void all_reduce(ap_uint<32> len, ap_uint<32> function, ap_uint<64> src_addr, ap_uint<64> dst_addr)
All-reduce data in the communicator.
Equivalent to reduce followed by broadcast
- Parameters:
len – Number of array elements
function – Reduction function ID
src_addr – Source array address
dst_addr – Destination array address
-
inline ACCLCommand(STREAM<command_word> &cmd, STREAM<command_word> &sts, ap_uint<32> comm_adr, ap_uint<32> dpcfg_adr, ap_uint<32> cflags, ap_uint<32> sflags)
-
class ACCLData
- #include <accl_hls.h>
Class encapsulating ACCL data streams.
Public Functions
-
inline ACCLData(STREAM<stream_word> &krnl2cclo, STREAM<stream_word> &cclo2krnl)
Construct a new ACCLData object.
- Parameters:
krnl2cclo – Reference to data stream from user kernel to CCLO
cclo2krnl – Reference to data stream from CCLO to user kernel
-
inline void push(ap_uint<DATA_WIDTH> data, ap_uint<DEST_WIDTH> dest)
Push user data to the CCLO.
- Parameters:
data – Data word (64B)
dest – Destination value (potentially used in routing)
-
inline stream_word pull()
Pull data from CCLO stream.
- Returns:
stream_word
-
inline ACCLData(STREAM<stream_word> &krnl2cclo, STREAM<stream_word> &cclo2krnl)
-
class ACCLCommand