From 86d9ee3ff79e30d5ac11717e74dfb168ebf147db Mon Sep 17 00:00:00 2001 From: Ted Themistokleous Date: Tue, 10 Dec 2024 15:53:19 +0000 Subject: [PATCH] Remove the need to use vector --- src/onnx/parse_matmulnbits.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/onnx/parse_matmulnbits.cpp b/src/onnx/parse_matmulnbits.cpp index 869342de543..e5fb336dfad 100644 --- a/src/onnx/parse_matmulnbits.cpp +++ b/src/onnx/parse_matmulnbits.cpp @@ -66,11 +66,10 @@ struct parse_matmulnbits : op_parser to_string_range(expected_b_lens) + ". Actual dims: " + to_string_range(args[1]->get_shape().lens())); - std::vector expected_scales_lens{n * n_blocks_per_col}; - - if(args[2]->get_shape().elements() != expected_scales_lens[0]) + const size_t expected_scales_lens = n * n_blocks_per_col; + if(args[2]->get_shape().elements() != expected_scales_lens) MIGRAPHX_THROW("MatMulNBits: Input scales does not match expected dims: " + - to_string_range(expected_scales_lens) + + to_string(expected_scales_lens) + ". Actual dims: " + to_string_range(args[2]->get_shape().lens())); if(args.size() > 3)