Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Ported quantize.cpp #84

Merged
merged 22 commits into from
Apr 25, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
removed redundant checks
  • Loading branch information
Guy Garcia committed Mar 30, 2023
commit fea5b22915356c11bd0f3b4caabc72d50b5f5927
8 changes: 4 additions & 4 deletions ggml-raw/ggml/ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ static void quantize_row_q4_0_reference(const float * restrict x, void * restric
const uint8_t vi0 = ((int8_t) (round(v0))) + 8;
const uint8_t vi1 = ((int8_t) (round(v1))) + 8;

assert(vi0 >= 0 && vi0 < 16);
assert(vi1 >= 0 && vi1 < 16);
assert(vi0 < 16);
assert(vi1 < 16);

pp[l/2] = vi0 | (vi1 << 4);
}
Expand Down Expand Up @@ -687,8 +687,8 @@ void quantize_row_q4_1(const float * restrict x, void * restrict y, int k) {
const uint8_t vi0 = round(v0);
const uint8_t vi1 = round(v1);

assert(vi0 >= 0 && vi0 < 16);
assert(vi1 >= 0 && vi1 < 16);
assert(vi0 < 16);
assert(vi1 < 16);

pp[l/2] = vi0 | (vi1 << 4);
}
Expand Down