Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions compiler/moco/import/src/Nodes/Const.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ bool ConstGraphBuilder::validate(const tensorflow::NodeDef &node) const
if (!plier::tf::has_attrs(node, {"dtype", "value"}))
return false;

const auto &input_tensor = plier::tf::get_tensor_attr(node, "value");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question,
Did this old code trigger a dangling variable error in Ubuntu 24.04?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup :)

const auto input_tensor = plier::tf::get_tensor_attr(node, "value");
const auto &input_shape = input_tensor.tensor_shape();
const auto &input_dims = input_shape.dim();

Expand Down Expand Up @@ -183,7 +183,7 @@ void ConstGraphBuilder::build(const tensorflow::NodeDef &node, GraphBuilderConte
const_node->dtype(dtype);

// import shape and value
const auto &input_tensor = plier::tf::get_tensor_attr(node, "value");
const auto input_tensor = plier::tf::get_tensor_attr(node, "value");
const auto &input_shape = input_tensor.tensor_shape();
const auto &input_dims = input_shape.dim();
assert(input_shape.dim_size() <= 6);
Expand Down
2 changes: 1 addition & 1 deletion compiler/moco/import/src/Nodes/Placeholder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void PlaceholderGraphBuilder::build(const tensorflow::NodeDef &node,
SymbolTable *tensor_names = context->tensor_names();

loco::DataType dtype = plier::tf::as_loco_datatype(plier::tf::get_datatype_attr(node, "dtype"));
const auto &shape = plier::tf::get_shape_attr(node, "shape");
const auto shape = plier::tf::get_shape_attr(node, "shape");
// TODO handle for unknown rank
assert(!shape.unknown_rank());
int64_t num_dims = shape.dim_size();
Expand Down