Skip to content

Commit

Permalink
[luci] Remove copy by auto (#12654)
Browse files Browse the repository at this point in the history
This commit removes object copy by auto.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored Feb 20, 2024
1 parent 90ec098 commit 3d2c6de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions compiler/luci/pass/src/CircleQuantizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ void CircleQuantizer::quantize(loco::Graph *g) const
// Check dtype/granularity of layer params
for (auto layer_param : layer_params)
{
auto name = layer_param->name;
const auto &name = layer_param->name;
if (!in_array(to_lower_case(layer_param->dtype), fakeq_supported_output_model_dtype))
{
throw std::runtime_error("Unsupported dtype in " + name + ". List of supported dtype: " +
Expand Down Expand Up @@ -546,7 +546,7 @@ void CircleQuantizer::quantize(loco::Graph *g) const
// Check dtype/granularity of layer params
for (auto layer_param : layer_params)
{
auto name = layer_param->name;
const auto &name = layer_param->name;
if (!in_array(to_lower_case(layer_param->dtype), qwmm_supported_output_model_dtype))
{
throw std::runtime_error("Unsupported dtype in " + name + ". List of supported dtype: " +
Expand Down
2 changes: 1 addition & 1 deletion compiler/luci/pass/src/FoldFullyConnectedPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ bool fold_fully_connected(luci::CircleFullyConnected *node)
if (!comp_fc.prepare())
return false;

auto output_shape = comp_fc.output_shape();
const auto &output_shape = comp_fc.output_shape();
assert(is_same_shape(node, output_shape));
auto output_size = loco::element_count(&output_shape);

Expand Down
2 changes: 1 addition & 1 deletion compiler/luci/service/src/CircleShapeInferenceRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ loco::NodeShape infer_while_out(const luci::CircleWhileOut *node)
auto cond_graph_inputs = cond_graph->inputs();
auto cond_graph_input = cond_graph_inputs->at(cond_in->index());

auto cond_graph_input_shape = *cond_graph_input->shape();
const auto &cond_graph_input_shape = *cond_graph_input->shape();
auto this_shape = own_shape(node);

if (!(this_shape == cond_graph_input_shape))
Expand Down

0 comments on commit 3d2c6de

Please sign in to comment.