Skip to content

Commit

Permalink
Removed any lingering use of 1 as feature to model
Browse files Browse the repository at this point in the history
  • Loading branch information
huttered40 committed Sep 19, 2023
1 parent f61f555 commit 6d60db9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/contraction/spctr_tsr.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ namespace CTF_int {

}

double tps_[] = {0.0, 1.0, (double)est_membw(nnz_frac_A, nnz_frac_B, nnz_frac_C), est_fp(nnz_frac_B, nnz_frac_B, nnz_frac_C)};
double tps_[] = {0.0, (double)est_membw(nnz_frac_A, nnz_frac_B, nnz_frac_C), est_fp(nnz_frac_B, nnz_frac_B, nnz_frac_C)};
// Check if we need to execute this function for the sake of training
bool bsr = true;
switch (krnl_type){
Expand Down Expand Up @@ -550,7 +550,7 @@ namespace CTF_int {
}

double exe_time = MPI_Wtime() - st_time;
double tps[] = {exe_time, 1.0, (double)est_membw(nnz_frac_A, nnz_frac_B, nnz_frac_C), est_fp(nnz_frac_B, nnz_frac_B, nnz_frac_C)};
double tps[] = {exe_time, (double)est_membw(nnz_frac_A, nnz_frac_B, nnz_frac_C), est_fp(nnz_frac_B, nnz_frac_B, nnz_frac_C)};
switch (krnl_type){
case 0:
if (is_custom){
Expand Down Expand Up @@ -1084,7 +1084,7 @@ namespace CTF_int {
pi.pin(nnz, order, lens, divisor, pi_new);

double exe_time = MPI_Wtime()-st_time;
double tps[] = {exe_time, 1.0, (double)nnz};
double tps[] = {exe_time, (double)nnz};
pin_keys_mdl.observe(tps);

TAU_FSTOP(spctr_pin_keys);
Expand All @@ -1109,7 +1109,7 @@ namespace CTF_int {
}
depin(sr_C, order, lens, divisor, nblk_C, virt_dim, phys_rank, new_C, new_nnz_C, size_blk_C, new_C, true);
double exe_time = MPI_Wtime()-st_time;
double tps[] = {exe_time, 1.0, (double)nnz};
double tps[] = {exe_time, (double)nnz};
pin_keys_mdl.observe(tps);
break;
}
Expand Down
6 changes: 3 additions & 3 deletions src/interface/common.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -339,20 +339,20 @@ namespace CTF_int {
}

double CommData::estimate_bcast_time(int64_t msg_sz){
double ps[] = {1.0, log2((double)np), (double)msg_sz};
double ps[] = {log2((double)np), (double)msg_sz};
return bcast_mdl.est_time(ps);
}

double CommData::estimate_allred_time(int64_t msg_sz, MPI_Op op){
double ps[] = {1.0, log2((double)np), (double)msg_sz*log2((double)(np))};
double ps[] = {log2((double)np), (double)msg_sz*log2((double)(np))};
if (op >= MPI_MAX && op <= MPI_REPLACE)
return allred_mdl.est_time(ps);
else
return allred_mdl_cst.est_time(ps);
}

double CommData::estimate_red_time(int64_t msg_sz, MPI_Op op){
double ps[] = {1.0, log2((double)np), (double)msg_sz*log2((double)(np))};
double ps[] = {log2((double)np), (double)msg_sz*log2((double)(np))};
if (op >= MPI_MAX && op <= MPI_REPLACE)
return red_mdl.est_time(ps);
else
Expand Down
2 changes: 1 addition & 1 deletion src/redistribution/dgtog_redist_ror.h
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ void dgtog_reshuffle(int const * sym,
MPI_Barrier(ord_glb_comm.cm);
#endif
double exe_time = MPI_Wtime()-st_time;
double tps[] = {exe_time, 1.0, (double)log2(ord_glb_comm.np), (double)std::max(old_dist.size, new_dist.size)*log2(ord_glb_comm.np)*sr->el_size};
double tps[] = {exe_time, (double)log2(ord_glb_comm.np), (double)std::max(old_dist.size, new_dist.size)*log2(ord_glb_comm.np)*sr->el_size};

// double-check
dgtog_res_mdl.observe(tps);
Expand Down

0 comments on commit 6d60db9

Please sign in to comment.