Skip to content

Commit

Permalink
[experimental][kleidi] Allow weight zeros to be a nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
digantdesai committed Oct 10, 2024
1 parent 24524a4 commit b42fd69
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,15 @@ void prepare_weight_data(
// TODO SIMDify this
size_t n_groups = n * k / group_size;
auto weight_scales_bf16 = std::vector<uint16_t>(n_groups, 0);

// We don't support weight zeros yet
if (weight_zeros != nullptr) {
for (size_t i = 0; i < n_groups; i++) {
assert(weight_zeros[i] == 0);
}
}

for (size_t i = 0; i < n_groups; i++) {
assert(weight_zeros[i] == 0);
weight_scales_bf16[i] = get_bf16_from_float(weight_scales[i]);
}

Expand Down

0 comments on commit b42fd69

Please sign in to comment.