cmake torchvision出现的问题
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
/home/ts/Downloads/vision-master/torchvision/csrc/ROIAlign.h: In function ‘at::Tensor roi_align(const at::Tensor&, const at::Tensor&, double, int64_t, int64_t, int64_t, bool)’:
/home/ts/Downloads/vision-master/torchvision/csrc/ROIAlign.h:29:25: error: ‘class c10::OperatorHandle’ has no member named ‘typed’
.typed<decltype(roi_align)>();
^~~~~
/home/ts/Downloads/vision-master/torchvision/csrc/ROIAlign.h:29:31: error: expected primary-expression before ‘decltype’
.typed<decltype(roi_align)>();
^~~~~~~~
/home/ts/Downloads/vision-master/torchvision/csrc/ROIAlign.h: In function ‘at::Tensor _roi_align_backward(const at::Tensor&, const at::Tensor&, double, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, bool)’:
/home/ts/Downloads/vision-master/torchvision/csrc/ROIAlign.h:77:12: error: ‘class c10::OperatorHandle’ has no member named ‘typed’
.typed<decltype(_roi_align_backward)>();
^~~~~
/home/ts/Downloads/vision-master/torchvision/csrc/ROIAlign.h:77:18: error: expected primary-expression before ‘decltype’
.typed<decltype(_roi_align_backward)>();
^~~~~~~~
In file included from /home/ts/Downloads/vision-master/torchvision/csrc/vision.cpp:17:0:
/home/ts/Downloads/vision-master/torchvision/csrc/nms.h: In function ‘at::Tensor nms(const at::Tensor&, const at::Tensor&, double)’:
/home/ts/Downloads/vision-master/torchvision/csrc/nms.h:19:25: error: ‘class c10::OperatorHandle’ has no member named ‘typed’
.typed<decltype(nms)>();
^~~~~
/home/ts/Downloads/vision-master/torchvision/csrc/nms.h:19:31: error: expected primary-expression before ‘decltype’
.typed<decltype(nms)>();
^~~~~~~~
/home/ts/Downloads/vision-master/torchvision/csrc/vision.cpp: At global scope:
/home/ts/Downloads/vision-master/torchvision/csrc/vision.cpp:45:14: error: expected constructor, destructor, or type conversion before ‘(’ token
TORCH_LIBRARY(torchvision, m) {
^
/home/ts/Downloads/vision-master/torchvision/csrc/vision.cpp:59:19: error: expected constructor, destructor, or type conversion before ‘(’ token
TORCH_LIBRARY_IMPL(torchvision, CPU, m) {
^
/home/ts/Downloads/vision-master/torchvision/csrc/vision.cpp:82:19: error: expected constructor, destructor, or type conversion before ‘(’ token
TORCH_LIBRARY_IMPL(torchvision, Autograd, m) {
^
CMakeFiles/torchvision.dir/build.make:518: recipe for target 'CMakeFiles/torchvision.dir/torchvision/csrc/vision.cpp.o' failed
make[2]: *** [CMakeFiles/torchvision.dir/torchvision/csrc/vision.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/torchvision.dir/all' failed
make[1]: *** [CMakeFiles/torchvision.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with torchvision/csrc/ROIAlign.h, torchvision/csrc/nms.h, and torchvision/csrc/vision.cpp, then review the reported CMake build output and the relevant PyTorch API compatibility. Done means the torchvision CMake target builds without the reported typed and TORCH_LIBRARY errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, pytorch
- Domain
- build-system, computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100