Skip to content

Commit

Permalink
Merge pull request #8 from eltociear/patch-1
Browse files Browse the repository at this point in the history
Fix typo in helpers.cpp
  • Loading branch information
ekelsen authored Sep 9, 2023
2 parents 1758bf9 + 5652e83 commit 61743d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions megatron/fused_kernels/megatron_fused_kernels/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ py::array build_sample_idx(const py::array_t<int32_t>& sizes_,
int64_t sample_index = 0;
// Index into doc_idx.
int64_t doc_idx_index = 0;
// Begining offset for each document.
// Beginning offset for each document.
int32_t doc_offset = 0;
// Start with first document and no offset.
sample_idx[2 * sample_index] = doc_idx_index;
Expand All @@ -158,7 +158,7 @@ py::array build_sample_idx(const py::array_t<int32_t>& sizes_,
doc_offset += (remaining_seq_length + doc_length - 1);
remaining_seq_length = 0;
} else {
// Otherwise, start from the begining of the next document.
// Otherwise, start from the beginning of the next document.
++doc_idx_index;
doc_offset = 0;
}
Expand Down Expand Up @@ -296,7 +296,7 @@ py::array build_mapping_impl(const py::array_t<int64_t>& docs_,
const auto sent_index_first = docs[doc];
const auto sent_index_last = docs[doc + 1];

// At the begining of the document previous index is the
// At the beginning of the document previous index is the
// start index.
auto prev_start_index = sent_index_first;

Expand Down Expand Up @@ -556,7 +556,7 @@ py::array build_blocks_mapping_impl(const py::array_t<int64_t>& docs_,
const auto sent_index_last = docs[doc + 1];
const auto target_seq_len = max_seq_length - titles_sizes[doc];

// At the begining of the document previous index is the
// At the beginning of the document previous index is the
// start index.
auto prev_start_index = sent_index_first;

Expand Down

0 comments on commit 61743d0

Please sign in to comment.