Skip to content

Conversation

bmanga
Copy link
Contributor

@bmanga bmanga commented Oct 14, 2020

Adds a simple executable that returns the number of registered torchvision ops. This should tell us whether the torchvision ops were successfully registered when <torchvision/vision.h> is included (pending PR #2798).

It's still missing integration in the CI as I am not familiar with that. The CI script should check that the program return value is > 0 (should return 9 for now).
@fmassa who should I ask for help in that regard?

@ezyang Do you think this suffices, provided we test enough plat/compiler combinations?

@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

Merging #2807 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2807   +/-   ##
=======================================
  Coverage   73.31%   73.31%           
=======================================
  Files          99       99           
  Lines        8724     8724           
  Branches     1373     1373           
=======================================
  Hits         6396     6396           
  Misses       1909     1909           
  Partials      419      419           

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 ebe3f02...37db994. Read the comment docs.

@fmassa
Copy link
Member

fmassa commented Oct 14, 2020

Thanks for the PR @bmanga !

For adding it together with CI, I think the easiest for now is to add a few more lines in

# Compile and run the CPP example
popd
cd examples/cpp/hello_world
mkdir build
cd build
cmake .. -DTorch_DIR=$TORCH_PATH/share/cmake/Torch
if [[ "$OSTYPE" == "msys" ]]; then
"$script_dir/windows/internal/vc_env_helper.bat" "$script_dir/windows/internal/build_cpp_example.bat"
cd Release
else
make
fi
# Run CPP example
./hello-world
to compile and run the executable

If you need some more specific pointers on this, I think the right person to ask would be @andfoy

@bmanga
Copy link
Contributor Author

bmanga commented Oct 14, 2020

@fmassa thanks for the pointer. How do I signal success/failure from that script? does exit 1 work as a failure indicator?

@fmassa
Copy link
Member

fmassa commented Oct 14, 2020

@bmanga I would think so, although tests seems to have passed on Linux, so maybe there is something that we are missing here.

@bmanga
Copy link
Contributor Author

bmanga commented Oct 14, 2020

@fmassa Indeed that's strange. I will have a look to see if the CI does something peculiar to make this work. Who is the person mainly responsible for the CI?

I can confirm that with my local setup (master torch, torchvision) the ops are not registered automatically, and I would assume I'm not the only one given the various torchvision issues.

@ezyang
Copy link
Contributor

ezyang commented Oct 15, 2020

Probably better not to pass the count as the return code, it's just pretty weird and non-idiomatic. Print it and then test it from the scaffolding script. This may also fix your CI problems.

@facebook-github-bot
Copy link
Contributor

Hi @bmanga!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

1 similar comment
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants