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

[Build] Refactor backends to adhere to stricter build warnings #442

Merged
merged 1 commit into from
Oct 1, 2020

Conversation

VivekPanyam
Copy link
Collaborator

Summary:

Refactor code under source/neuropod/backends to adhere to the stricter set of warnings introduced in #437

Test Plan:

CI

@codecov
Copy link

codecov bot commented Sep 22, 2020

Codecov Report

Merging #442 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #442   +/-   ##
=======================================
  Coverage   88.23%   88.23%           
=======================================
  Files         101      101           
  Lines        6356     6356           
=======================================
  Hits         5608     5608           
  Misses        748      748           
Impacted Files Coverage Δ
source/neuropod/internal/backend_registration.hh 100.00% <ø> (ø)
source/neuropod/backends/neuropod_backend.cc 96.48% <100.00%> (ø)
source/neuropod/backends/tensorflow/tf_backend.cc 89.12% <100.00%> (ø)
source/neuropod/backends/tensorflow/tf_tensor.cc 63.63% <100.00%> (ø)
source/neuropod/backends/tensorflow/tf_tensor.hh 86.56% <100.00%> (ø)
...rce/neuropod/backends/torchscript/torch_backend.cc 81.47% <100.00%> (ø)
...urce/neuropod/backends/torchscript/torch_tensor.hh 74.19% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73f3a31...39a9c4c. Read the comment docs.

{
return std::dynamic_pointer_cast<NativeDataContainer<torch::jit::IValue>>(tensor)->get_native_data();
}
torch::jit::IValue get_ivalue_from_torch_tensor(const std::shared_ptr<NeuropodValue> &tensor);
Copy link
Contributor

@vkuzmin-uber vkuzmin-uber Sep 22, 2020

Choose a reason for hiding this comment

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

you could make it "inline", this is legal way to provide definition in header w/o confusing compiler. But I see you added .cc file that is also fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup! Previously, I marked it as inline in an internal patch on top of Neuropod, but decided to pull it into a .cc file here.

I was planning on pulling more things into the .cc file, but taking another look, it probably makes sense to just inline this in the header and leave it alone

Copy link
Contributor

@vkuzmin-uber vkuzmin-uber left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants