This repository was archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
This repository was archived by the owner on Nov 1, 2023. It is now read-only.
Instructions do not work #1
Copy link
Copy link
Open
Description
Hello,
The instructions worked for me right up until make -j. When I run that, I get:
Scanning dependencies of target warp_perspective
[ 25%] Building CXX object warp_perspective/CMakeFiles/warp_perspective.dir/op.cpp.o
/home/example_app/warp_perspective/op.cpp:23:78: warning: 'torch::jit::RegisterOperators::RegisterOperators(const string&, Implementation&&) [with Implementation = at::Tensor (*)(at::Tensor, at::Tensor); std::string = std::basic_string<char>]' is deprecated [-Wdeprecated-declarations]
torch::jit::RegisterOperators("my_ops::warp_perspective", &warp_perspective);
^
In file included from /libtorch/include/torch/script.h:5:0,
from /home/example_app/warp_perspective/op.cpp:2:
/libtorch/include/torch/csrc/jit/custom_operator.h:28:3: note: declared here
RegisterOperators(const std::string& name, Implementation&& implementation) {
^
[ 50%] Linking CXX shared library libwarp_perspective.so
[ 50%] Built target warp_perspective
Scanning dependencies of target example_app
[ 75%] Building CXX object CMakeFiles/example_app.dir/main.cpp.o
/home/example_app/main.cpp: In function 'int main(int, const char**)':
/home/example_app/main.cpp:14:74: error: conversion from 'torch::jit::script::Module' to non-scalar type 'std::shared_ptr<torch::jit::script::Module>' requested
std::shared_ptr<torch::jit::script::Module> module = torch::jit::load(argv[1]);
^
CMakeFiles/example_app.dir/build.make:62: recipe for target 'CMakeFiles/example_app.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/example_app.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/example_app.dir/all' failed
make[1]: *** [CMakeFiles/example_app.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
@goldsborough, is there a chance you could take a look? I'm working on revising the PyTorch tutorials for the 1.3 release, and this is currently how we recommend students run the Extending TorchScript with Custom C++ Operators tutorial. Please let me know if there's any way I can help!
Metadata
Metadata
Assignees
Labels
No labels