Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
#include <spctr_tsr.h>
Public Member Functions | |
void | run (char *A, int nblk_A, int64_t const *size_blk_A, char *B, int nblk_B, int64_t const *size_blk_B, char *C, int nblk_C, int64_t *size_blk_C, char *&new_C) |
wraps user sequential function signature More... | |
void | print () |
int64_t | spmem_fp () |
spctr * | clone () |
double | est_fp (double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
int64_t | est_spmem_rec (double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
uint64_t | est_membw (double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
double | est_time_fp (int nlyr, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the execution time the local part this kernel is estimated to take More... | |
double | est_time_rec (int nlyr, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the execution time this kernel and its recursive calls are estimated to take More... | |
seq_tsr_spctr (spctr *other) | |
copies ctr object More... | |
~seq_tsr_spctr () | |
seq_tsr_spctr (contraction const *s, int krnl_type, iparam const *inner_params, int *virt_blk_len_A, int *virt_blk_len_B, int *virt_blk_len_C, int64_t vrt_sz_C) | |
Public Member Functions inherited from CTF_int::spctr | |
~spctr () | |
spctr (spctr *other) | |
double | est_time_fp (int nlyr) |
double | est_time_rec (int nlyr) |
virtual int64_t | spmem_rec (double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the number of bytes need by each processor in this kernel and its recursive calls More... | |
void | run (char *A, char *B, char *C) |
spctr (contraction const *c) | |
Public Member Functions inherited from CTF_int::ctr | |
virtual int64_t | mem_fp () |
virtual int64_t | mem_rec () |
virtual | ~ctr () |
deallocates generic ctr object More... | |
ctr (ctr *other) | |
copies generic ctr object More... | |
ctr (contraction const *c) | |
main constructor, defines variable based on contraction class More... | |
Data Fields | |
char const * | alpha |
int | order_A |
int * | edge_len_A |
int const * | idx_map_A |
int * | sym_A |
int | order_B |
int * | edge_len_B |
int const * | idx_map_B |
int * | sym_B |
int | order_C |
int * | edge_len_C |
int const * | idx_map_C |
int * | sym_C |
int | krnl_type |
iparam | inner_params |
int | is_custom |
bivar_function const * | func |
Data Fields inherited from CTF_int::spctr | |
bool | is_sparse_A |
bool | is_sparse_B |
bool | is_sparse_C |
char * | new_C |
Data Fields inherited from CTF_int::ctr | |
algstrct const * | sr_A |
algstrct const * | sr_B |
algstrct const * | sr_C |
char const * | beta |
int | num_lyr |
int | idx_lyr |
Definition at line 56 of file spctr_tsr.h.
CTF_int::seq_tsr_spctr::seq_tsr_spctr | ( | spctr * | other | ) |
copies ctr object
[in] | other | object to copy |
Definition at line 155 of file spctr_tsr.cxx.
References CTF_int::alloc(), alpha, edge_len_A, edge_len_B, edge_len_C, func, idx_map_A, idx_map_B, idx_map_C, inner_params, is_custom, krnl_type, order_A, order_B, order_C, sym_A, sym_B, and sym_C.
Referenced by clone().
|
inline |
Definition at line 102 of file spctr_tsr.h.
References CTF_int::cdealloc().
CTF_int::seq_tsr_spctr::seq_tsr_spctr | ( | contraction const * | s, |
int | krnl_type, | ||
iparam const * | inner_params, | ||
int * | virt_blk_len_A, | ||
int * | virt_blk_len_B, | ||
int * | virt_blk_len_C, | ||
int64_t | vrt_sz_C | ||
) |
Definition at line 30 of file spctr_tsr.cxx.
References CTF_int::contraction::A, CTF_int::alloc_ptr(), CTF_int::contraction::alpha, alpha, CTF_int::contraction::B, CTF_int::contraction::C, CTF::World::cdt, DPRINTF, edge_len_A, edge_len_B, edge_len_C, CTF_int::contraction::func, func, CTF_int::contraction::idx_A, CTF_int::contraction::idx_B, CTF_int::contraction::idx_C, idx_map_A, idx_map_B, idx_map_C, CTF_int::tensor::inner_ordering, inner_params, CTF_int::contraction::is_custom, is_custom, CTF_int::iparam::k, krnl_type, CTF_int::iparam::m, CTF_int::iparam::n, NS, CTF_int::tensor::order, order_A, order_B, order_C, CTF_int::CommData::rank, CTF_int::tensor::rec_tsr, CTF_int::tensor::sym, sym_A, sym_B, sym_C, CTF_int::iparam::sz_C, and CTF_int::tensor::wrld.
|
virtual |
Reimplemented from CTF_int::spctr.
Definition at line 186 of file spctr_tsr.cxx.
References seq_tsr_spctr().
double CTF_int::seq_tsr_spctr::est_fp | ( | double | nnz_frac_A, |
double | nnz_frac_B, | ||
double | nnz_frac_C | ||
) |
Definition at line 193 of file spctr_tsr.cxx.
References ASSERT, CTF_int::cdealloc(), edge_len_A, edge_len_B, edge_len_C, idx_map_A, idx_map_B, idx_map_C, inner_params, CTF_int::inv_idx(), CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::iparam::k, krnl_type, CTF_int::iparam::m, CTF_int::iparam::n, order_A, order_B, and order_C.
Referenced by est_time_fp(), and run().
uint64_t CTF_int::seq_tsr_spctr::est_membw | ( | double | nnz_frac_A, |
double | nnz_frac_B, | ||
double | nnz_frac_C | ||
) |
Definition at line 220 of file spctr_tsr.cxx.
References edge_len_A, edge_len_B, edge_len_C, CTF_int::accumulatable::el_size, inner_params, CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::spctr::is_sparse_C, CTF_int::iparam::k, krnl_type, CTF_int::iparam::m, CTF_int::iparam::n, order_A, order_B, order_C, CTF_int::seq_tsr_spctr_cst_k0, CTF_int::seq_tsr_spctr_cst_k0_init, CTF_int::seq_tsr_spctr_cst_k1, CTF_int::seq_tsr_spctr_cst_k1_init, CTF_int::seq_tsr_spctr_cst_k2, CTF_int::seq_tsr_spctr_cst_k2_init, CTF_int::seq_tsr_spctr_cst_k3, CTF_int::seq_tsr_spctr_cst_k3_init, CTF_int::seq_tsr_spctr_cst_k4, CTF_int::seq_tsr_spctr_cst_k4_init, CTF_int::seq_tsr_spctr_cst_off_k0, CTF_int::seq_tsr_spctr_cst_off_k0_init, CTF_int::seq_tsr_spctr_cst_off_k1, CTF_int::seq_tsr_spctr_cst_off_k1_init, CTF_int::seq_tsr_spctr_cst_off_k2, CTF_int::seq_tsr_spctr_cst_off_k2_init, CTF_int::seq_tsr_spctr_k0, CTF_int::seq_tsr_spctr_k0_init, CTF_int::seq_tsr_spctr_k1, CTF_int::seq_tsr_spctr_k1_init, CTF_int::seq_tsr_spctr_k2, CTF_int::seq_tsr_spctr_k2_init, CTF_int::seq_tsr_spctr_k3, CTF_int::seq_tsr_spctr_k3_init, CTF_int::seq_tsr_spctr_k4, CTF_int::seq_tsr_spctr_k4_init, CTF_int::seq_tsr_spctr_off_k0, CTF_int::seq_tsr_spctr_off_k0_init, CTF_int::seq_tsr_spctr_off_k1, CTF_int::seq_tsr_spctr_off_k1_init, CTF_int::seq_tsr_spctr_off_k2, CTF_int::seq_tsr_spctr_off_k2_init, CTF_int::ctr::sr_A, CTF_int::ctr::sr_B, CTF_int::ctr::sr_C, CTF_int::sy_packed_size(), sym_A, sym_B, and sym_C.
Referenced by est_time_fp(), and run().
int64_t CTF_int::seq_tsr_spctr::est_spmem_rec | ( | double | nnz_frac_A, |
double | nnz_frac_B, | ||
double | nnz_frac_C | ||
) |
|
virtual |
returns the execution time the local part this kernel is estimated to take
[in] | nlyr | amount of replication |
[in] | nnz_frac_A | percentage of nonzeros in tensor A |
[in] | nnz_frac_B | percentage of nonzeros in tensor B |
[in] | nnz_frac_C | percentage of nonzeros in tensor C |
Reimplemented from CTF_int::spctr.
Definition at line 251 of file spctr_tsr.cxx.
References est_fp(), est_membw(), CTF_int::LinModel< nparam >::est_time(), inner_params, is_custom, krnl_type, and CTF_int::iparam::offload.
Referenced by est_time_rec().
|
virtual |
returns the execution time this kernel and its recursive calls are estimated to take
[in] | nlyr | amount of replication |
[in] | nnz_frac_A | percentage of nonzeros in tensor A |
[in] | nnz_frac_B | percentage of nonzeros in tensor B |
[in] | nnz_frac_C | percentage of nonzeros in tensor C |
Reimplemented from CTF_int::spctr.
Definition at line 313 of file spctr_tsr.cxx.
References est_time_fp().
|
virtual |
Reimplemented from CTF_int::ctr.
Definition at line 138 of file spctr_tsr.cxx.
References edge_len_A, edge_len_B, edge_len_C, inner_params, CTF_int::iparam::k, krnl_type, CTF_int::iparam::m, CTF_int::iparam::n, order_A, order_B, order_C, and CTF_int::iparam::sz_C.
|
virtual |
wraps user sequential function signature
Reimplemented from CTF_int::spctr.
Definition at line 317 of file spctr_tsr.cxx.
References CTF_int::algstrct::addid(), alpha, ASSERT, CTF_int::ctr::beta, CTF_int::COO_Matrix::coomm(), CTF_int::CSR_Matrix::csrmm(), CTF_int::CSR_Matrix::csrmultcsr(), CTF_int::CSR_Matrix::csrmultd(), edge_len_A, edge_len_B, edge_len_C, est_fp(), est_membw(), func, CTF_int::ctr::idx_lyr, idx_map_A, idx_map_B, idx_map_C, inner_params, is_custom, CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::spctr::is_sparse_C, CTF_int::algstrct::isequal(), CTF_int::iparam::k, krnl_type, CTF_int::iparam::m, CTF_int::algstrct::mulid(), CTF_int::iparam::n, CTF_int::spctr::new_C, CTF_int::ctr::num_lyr, CTF_int::LinModel< nparam >::observe(), CTF_int::iparam::offload, order_A, order_B, order_C, CTF_int::algstrct::pair_size(), CTF_int::algstrct::scal(), CTF_int::algstrct::set(), CTF_int::LinModel< nparam >::should_observe(), CTF_int::spA_dnB_dnC_seq_ctr(), CTF_int::ctr::sr_A, CTF_int::ctr::sr_B, CTF_int::ctr::sr_C, sym_A, sym_B, sym_C, CTF_int::iparam::sz_C, TAU_FSTART, and TAU_FSTOP.
int64_t CTF_int::seq_tsr_spctr::spmem_fp | ( | ) |
Definition at line 191 of file spctr_tsr.cxx.
char const* CTF_int::seq_tsr_spctr::alpha |
Definition at line 58 of file spctr_tsr.h.
Referenced by run(), and seq_tsr_spctr().
int* CTF_int::seq_tsr_spctr::edge_len_A |
Definition at line 60 of file spctr_tsr.h.
Referenced by est_fp(), est_membw(), print(), run(), and seq_tsr_spctr().
int* CTF_int::seq_tsr_spctr::edge_len_B |
Definition at line 65 of file spctr_tsr.h.
Referenced by est_fp(), est_membw(), print(), run(), and seq_tsr_spctr().
int* CTF_int::seq_tsr_spctr::edge_len_C |
Definition at line 70 of file spctr_tsr.h.
Referenced by est_fp(), est_membw(), print(), run(), and seq_tsr_spctr().
bivar_function const* CTF_int::seq_tsr_spctr::func |
Definition at line 78 of file spctr_tsr.h.
Referenced by run(), and seq_tsr_spctr().
int const* CTF_int::seq_tsr_spctr::idx_map_A |
Definition at line 61 of file spctr_tsr.h.
Referenced by est_fp(), run(), and seq_tsr_spctr().
int const* CTF_int::seq_tsr_spctr::idx_map_B |
Definition at line 66 of file spctr_tsr.h.
Referenced by est_fp(), run(), and seq_tsr_spctr().
int const* CTF_int::seq_tsr_spctr::idx_map_C |
Definition at line 71 of file spctr_tsr.h.
Referenced by est_fp(), run(), and seq_tsr_spctr().
iparam CTF_int::seq_tsr_spctr::inner_params |
Definition at line 75 of file spctr_tsr.h.
Referenced by est_fp(), est_membw(), est_time_fp(), print(), run(), and seq_tsr_spctr().
int CTF_int::seq_tsr_spctr::is_custom |
Definition at line 77 of file spctr_tsr.h.
Referenced by est_time_fp(), run(), and seq_tsr_spctr().
int CTF_int::seq_tsr_spctr::krnl_type |
Definition at line 74 of file spctr_tsr.h.
Referenced by est_fp(), est_membw(), est_time_fp(), print(), run(), and seq_tsr_spctr().
int CTF_int::seq_tsr_spctr::order_A |
Definition at line 59 of file spctr_tsr.h.
Referenced by est_fp(), est_membw(), print(), run(), and seq_tsr_spctr().
int CTF_int::seq_tsr_spctr::order_B |
Definition at line 64 of file spctr_tsr.h.
Referenced by est_fp(), est_membw(), print(), run(), and seq_tsr_spctr().
int CTF_int::seq_tsr_spctr::order_C |
Definition at line 69 of file spctr_tsr.h.
Referenced by est_fp(), est_membw(), print(), run(), and seq_tsr_spctr().
int* CTF_int::seq_tsr_spctr::sym_A |
Definition at line 62 of file spctr_tsr.h.
Referenced by est_membw(), run(), and seq_tsr_spctr().
int* CTF_int::seq_tsr_spctr::sym_B |
Definition at line 67 of file spctr_tsr.h.
Referenced by est_membw(), run(), and seq_tsr_spctr().
int* CTF_int::seq_tsr_spctr::sym_C |
Definition at line 72 of file spctr_tsr.h.
Referenced by est_membw(), run(), and seq_tsr_spctr().