Skip to content

Commit 285a8b6

Browse files
committed
undoing commit correcting flop count correction, in order to make merge with sparsity easier, since that code was moved elsewhere there, and the correction should have been applied in the right location
1 parent 4e716ba commit 285a8b6

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/contraction/ctr_comm.cxx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ namespace CTF_int {
341341
int64_t seq_tsr_ctr::mem_fp(){ return 0; }
342342

343343
double seq_tsr_ctr::est_time_fp(int nlyr){
344-
uint64_t size_A = sy_packed_size(order_A, edge_len_A, sym_A)*sr_A->el_size;
345-
uint64_t size_B = sy_packed_size(order_B, edge_len_B, sym_B)*sr_B->el_size;
346-
uint64_t size_C = sy_packed_size(order_C, edge_len_C, sym_C)*sr_C->el_size;
347-
if (is_inner) size_A *= inner_params.m*inner_params.k;
348-
if (is_inner) size_B *= inner_params.n*inner_params.k;
349-
if (is_inner) size_C *= inner_params.m*inner_params.n;
344+
uint64_t size_A = sy_packed_size(order_A, edge_len_A, sym_A);
345+
uint64_t size_B = sy_packed_size(order_B, edge_len_B, sym_B);
346+
uint64_t size_C = sy_packed_size(order_C, edge_len_C, sym_C);
347+
if (is_inner) size_A *= inner_params.m*inner_params.k*sr_A->el_size;
348+
if (is_inner) size_B *= inner_params.n*inner_params.k*sr_B->el_size;
349+
if (is_inner) size_C *= inner_params.m*inner_params.n*sr_C->el_size;
350350

351351
ASSERT(size_A > 0);
352352
ASSERT(size_B > 0);
@@ -363,12 +363,11 @@ namespace CTF_int {
363363
flops *= inner_params.m;
364364
flops *= inner_params.n;
365365
flops *= inner_params.k;
366-
} else {
367-
for (int i=0; i<idx_max; i++){
368-
if (rev_idx_map[3*i+0] != -1) flops*=edge_len_A[rev_idx_map[3*i+0]];
369-
else if (rev_idx_map[3*i+1] != -1) flops*=edge_len_B[rev_idx_map[3*i+1]];
370-
else if (rev_idx_map[3*i+2] != -1) flops*=edge_len_C[rev_idx_map[3*i+2]];
371-
}
366+
}
367+
for (int i=0; i<idx_max; i++){
368+
if (rev_idx_map[3*i+0] != -1) flops*=edge_len_A[rev_idx_map[3*i+0]];
369+
else if (rev_idx_map[3*i+1] != -1) flops*=edge_len_B[rev_idx_map[3*i+1]];
370+
else if (rev_idx_map[3*i+2] != -1) flops*=edge_len_C[rev_idx_map[3*i+2]];
372371
}
373372
ASSERT(flops >= 0.0);
374373
CTF_int::cdealloc(rev_idx_map);

0 commit comments

Comments
 (0)