Summary: | sci-libs/torchvision-0.11.2::science uses wrong include dir for pytorch headers, doesn't build CPU target objects but tries to link them, and picks wrong lib dir | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael Moon <triffid.hunter> |
Component: | Overlays | Assignee: | Gentoo Science Related Packages <sci> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | admnd, anton.bugs, stefantalpalaru |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build log
caffe2_include_poc.c |
Description
Michael Moon
2022-09-26 14:51:43 UTC
I believe torchvision has been renamed: sci-libs/torchvision -> sci-libs/caffe2 but the problem is still there. There are two sets of include files: /usr/include/torch and /usr/include/torch/csrc/api/include/torch/ Files in the second directory (such as all.h), call #include <torch/cuda.h> All files from the second directory should be moved to the first directory. It may be something to do with the following code: /torch/utils/cpp_extension.py if not is_standalone: common_cflags.append(f'-DTORCH_EXTENSION_NAME={name}') common_cflags.append('-DTORCH_API_INCLUDE_EXTENSION_H') Created attachment 835357 [details]
caffe2_include_poc.c
try to compile with "gcc caffe2_include_poc.c"
Please try torchvision-0.15.1 from my overlay: https://github.com/stefantalpalaru/gentoo-overlay |