Skip to content
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

Fix out-of-boundary access (read). #859

Merged
merged 1 commit into from
Nov 2, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ message(STATUS "Enabled languages: ${languages}")

project(k2 ${languages})

set(K2_VERSION "1.9")
set(K2_VERSION "1.10")

# ----------------- Supported build types for K2 project -----------------
set(ALLOWABLE_BUILD_TYPES Debug Release RelWithDebInfo MinSizeRel)
Expand Down
2 changes: 1 addition & 1 deletion k2/csrc/ragged_utils.cu
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ RaggedShape IntersperseRaggedLayer(int32_t layer,
row_splits_ptrs_data[src][pos];
row_splits_data[i] = this_size;
};
EvalDevice(c, new_num_rows + 1, lambda_get_sizes);
EvalDevice(c, new_num_rows, lambda_get_sizes);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 155

        int32_t this_size = row_splits_ptrs_data[src][pos + 1] -
             row_splits_ptrs_data[src][pos];

row_splits_ptrs_data[src][pos + 1] is problematic when i equals to new_num_rows.

This PR fixes that.

ExclusiveSum(row_splits, &row_splits);
}
}
Expand Down