Skip to content

Commit

Permalink
Made redistribution kernel use 64-bit counts/offsets and implemented …
Browse files Browse the repository at this point in the history
…a custom all-to-allv to do this
  • Loading branch information
solomonik committed Apr 3, 2014
1 parent cf539cd commit a754cbf
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 136 deletions.
2 changes: 1 addition & 1 deletion examples/gemm.cxx
Expand Up @@ -60,7 +60,7 @@ int gemm(int const m,
free(indices);

C["ij"] += A["ik"]*B["kj"];
C["ij"] += (.3*i)*A["ik"]*B["kj"];
C["ij"] += .3*A["ik"]*B["kj"];
#ifndef TEST_SUITE
double t;

Expand Down
31 changes: 18 additions & 13 deletions src/dist_tensor/dist_tensor_op.cxx
Expand Up @@ -2475,19 +2475,24 @@ int dist_tensor<dtype>::
ntsr_C->is_data_aliased = 1;
del_tsr(ntype.tid_C);
}
if (was_home_A && !ntsr_A->is_home){
ntsr_A->has_home = 0;
del_tsr(ntype.tid_A);
} else if (was_home_A) {
ntsr_A->is_data_aliased = 1;
del_tsr(ntype.tid_A);
}
if (was_home_B && stype->tid_A != stype->tid_B && !ntsr_B->is_home){
ntsr_B->has_home = 0;
del_tsr(ntype.tid_B);
} else if (was_home_B && stype->tid_A != stype->tid_B) {
ntsr_B->is_data_aliased = 1;
del_tsr(ntype.tid_B);
if (ntype.tid_A != ntype.tid_C){
if (was_home_A && !ntsr_A->is_home){
ntsr_A->has_home = 0;
del_tsr(ntype.tid_A);
} else if (was_home_A) {
ntsr_A->is_data_aliased = 1;
del_tsr(ntype.tid_A);
}
}
if (ntype.tid_B != ntype.tid_A &&
ntype.tid_B != ntype.tid_C){
if (was_home_B && stype->tid_A != stype->tid_B && !ntsr_B->is_home){
ntsr_B->has_home = 0;
del_tsr(ntype.tid_B);
} else if (was_home_B && stype->tid_A != stype->tid_B) {
ntsr_B->is_data_aliased = 1;
del_tsr(ntype.tid_B);
}
}
return DIST_TENSOR_SUCCESS;
#endif
Expand Down

0 comments on commit a754cbf

Please sign in to comment.