Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
TedThemistokleous committed Dec 9, 2024
1 parent 88472af commit 297e7b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/onnx/parse_matmulnbits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ struct parse_matmulnbits : op_parser<parse_matmulnbits>

std::vector<size_t> expected_scales_lens{n * n_blocks_per_col};

// Reshape anything larger than 1 dimension into a 1d tensor so we can check if we have the right amount of elements.
// Reshape anything larger than 1 dimension into a 1d tensor so we can check if we have the
// right amount of elements.
auto scale_input = args[2];
if(scale_input->get_shape().lens().size() > 1)
{
scale_input = info.add_instruction(make_op("reshape", {{"dims", {scale_input->get_shape().elements()}}}), scale_input);
scale_input = info.add_instruction(
make_op("reshape", {{"dims", {scale_input->get_shape().elements()}}}), scale_input);

Check warning on line 77 in src/onnx/parse_matmulnbits.cpp

View check run for this annotation

Codecov / codecov/patch

src/onnx/parse_matmulnbits.cpp#L77

Added line #L77 was not covered by tests
}

if(scale_input->get_shape().lens() != expected_scales_lens)
Expand Down

0 comments on commit 297e7b9

Please sign in to comment.