Skip to content

Do not count the sentinel node for checking the buffer overflow as it is not actually filled in the COO buffer. #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,11 @@ void FillRowPointersPerLocalDevice(
const auto sc_id = std::make_pair(coo_tensor.row_id / batch_size_per_sc,
coo_tensor.col_id % num_scs);
while (last_sc_id < sc_id) {
// We do not fill any extra buffer element for
// CooFormat(row_id=batch_size_per_sc * (local_sc_id + 1), col_id=0,
// gain=0.0), hence adding 1 to the check.
if (lhs_row_index >= row_pointers_size_per_sc ||
padded_coo_tensor_index >= coo_buffer_size_per_sc) {
padded_coo_tensor_index >= coo_buffer_size_per_sc + 1) {
LOG(ERROR) << "Static buffer size maybe too small for current "
"batch. IDs may be dropped! Static buffer size: "
<< coo_buffer_size_per_sc * num_sc_per_device
Expand Down Expand Up @@ -333,7 +336,7 @@ void FillRowPointersPerLocalDevice(
break;
}
if (lhs_row_index >= row_pointers_size_per_sc ||
padded_coo_tensor_index >= coo_buffer_size_per_sc) {
padded_coo_tensor_index >= coo_buffer_size_per_sc + 1) {
LOG(ERROR) << "Static buffer size maybe too small for current "
"batch. IDs may be dropped! Static buffer size: "
<< coo_buffer_size_per_sc * num_sc_per_device
Expand Down