Skip to content

Commit

Permalink
revert the change of nv hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiaxingla committed Jul 17, 2024
1 parent 6bdda75 commit 3496593
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/cutlass/relatively_equal.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ bool relatively_equal_float(T a, T b, T epsilon, T nonzero_floor) {
return true;
}
else if (a == zero || b == zero || diff < nonzero_floor) {
return diff < (epsilon * nonzero_floor);
return diff < epsilon * nonzero_floor;
}

return diff < epsilon * (abs_A + abs_B);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,15 @@ __global__ void

size_t idx = ThreadIdxX() + BlockDimX() * BlockIdxX();

//for (; idx < capacity; idx += GridDimX() * BlockDimX()) {
if (idx < capacity ){
for (; idx < capacity; idx += GridDimX() * BlockDimX()) {
Element a = cutlass::ReferenceFactory<Element>::get(ptr_A, idx);
Element b = cutlass::ReferenceFactory<Element>::get(ptr_B, idx);

if (!relatively_equal(a, b, epsilon, nonzero_floor)) {
*equal = 0;
//printf("error, idx at: %lu, capacity: %lu, a: %f, b: %f\n", idx, capacity, a, b);
return;
}
}
// }
}

} // namespace kernel
Expand Down

0 comments on commit 3496593

Please sign in to comment.