Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make input arguments to convert function as const. #15739

Closed

Conversation

nkpatel-tt
Copy link
Contributor

@nkpatel-tt nkpatel-tt commented Dec 5, 2024

Ticket

#15738

Problem description

Passing input argument by value will make copy of tensor.

What's changed

Pass them by const reference.

Checklist

  • Post commit CI passes Link1 Latest.
  • Blackhole Post commit (if applicable)
  • Model regression CI testing passes (if applicable)
  • Device performance regression CI testing passes (if applicable)
  • New/Existing tests provide coverage for changes

@ayerofieiev-tt
Copy link
Member

It won't make a copy of the vector, right? Tensor is like a shared_ptr. It is a shared owner over a Buffer

@nkpatel-tt
Copy link
Contributor Author

It won't make a copy of the vector, right? Tensor is like a shared_ptr. It is a shared owner over a Buffer

Nope Artem.

@nkpatel-tt
Copy link
Contributor Author

Closing since handled in #15742

@nkpatel-tt nkpatel-tt closed this Dec 6, 2024
@nkpatel-tt nkpatel-tt deleted the nkpatel/clang-tidy-master-failure-tensor-utils branch December 6, 2024 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants