Skip to content

Commit 8eb9b47

Browse files
committed
sampling : remove redundant checks for stride and size [no ci]
1 parent 4a90583 commit 8eb9b47

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/llama-context.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ static void copy_tensor_async_ints(
12211221
size_t sampled_size,
12221222
const std::unordered_map<llama_seq_id, uint32_t> & seq_to_row,
12231223
ggml_backend_sched_t sched) {
1224-
if (sampled == nullptr || sampled_size == 0) {
1224+
if (sampled == nullptr) {
12251225
return;
12261226
}
12271227

@@ -1243,7 +1243,7 @@ static void copy_tensor_async_floats(
12431243
std::vector<uint32_t> & counts,
12441244
const std::unordered_map<llama_seq_id, uint32_t> & seq_to_row,
12451245
ggml_backend_sched_t sched) {
1246-
if (dst == nullptr || stride == 0) {
1246+
if (dst == nullptr) {
12471247
return;
12481248
}
12491249

@@ -1269,7 +1269,7 @@ static void copy_tensor_async_candidates(
12691269
std::vector<uint32_t> & counts,
12701270
const std::unordered_map<llama_seq_id, uint32_t> & seq_to_row,
12711271
ggml_backend_sched_t sched) {
1272-
if (dst == nullptr || stride == 0) {
1272+
if (dst == nullptr) {
12731273
return;
12741274
}
12751275

0 commit comments

Comments
 (0)