Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906204 - sci-libs/tensorpipe-2022.05.13 does not provide cuda files, causing sci-libs/caffe2=2.0.0-r4[cuda, tensorpipe] to fail
Summary: sci-libs/tensorpipe-2022.05.13 does not provide cuda files, causing sci-libs/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tupone Alfredo
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-12 11:50 UTC by Michael Moon
Modified: 2023-05-15 06:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Moon 2023-05-12 11:50:16 UTC
FAILED: caffe2/CMakeFiles/torch_cuda.dir/__/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp.o
/usr/bin/x86_64-pc-linux-gnu-g++ -DAT_PER_OPERATOR_HEADERS -DGFLAGS_IS_A_DLL=0 -DGLOG_CUSTOM_PREFIX_SUPPORT -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx -DTORCH_CUDA_BUILD_MAIN_LIB -DUSE_CUDA -DUSE_DISTRIBUTED -DUSE_EXPERIMENTAL_CUDNN_V8_API -DUSE_EXTERNAL_MZCRC -DUSE_FLASH_ATTENTION -DUSE_RPC -DUSE_TENSORPIPE -D_FILE_OFFSET_BITS=64 -Dtorch_cuda_EXPORTS -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0_build/aten/src -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/aten/src -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0_build -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0 -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/cmake/../caffe2/contrib/opencl -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/aten/src/THC -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/aten/src/ATen/cuda -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/aten/src/ATen/../../../third_party/cutlass/include -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0_build/caffe2/aten/src -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/aten/../third_party/catch/single_include -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/aten/src/ATen/.. -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/c10/cuda/../.. -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/c10/.. -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/torch/csrc/api -I/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/torch/csrc/api/include -isystem /opt/cuda/include -isystem /usr/include/opencv4 -isystem /usr/include/eigen3  -O2 -pipe -march=native -ftree-vectorize -D_GLIBCXX_USE_CXX11_ABI=1 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DUSE_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -fPIC -Wall -Wextra -Werror=non-virtual-dtor -Werror=range-loop-construct -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Wno-stringop-overflow -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-maybe-uninitialized -fvisibility=hidden -DTORCH_CUDA_BUILD_MAIN_LIB -std=gnu++17 -MD -MT caffe2/CMakeFiles/torch_cuda.dir/__/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp.o -MF caffe2/CMakeFiles/torch_cuda.dir/__/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp.o.d -o caffe2/CMakeFiles/torch_cuda.dir/__/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp.o -c /var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp
/var/tmp/portage/sci-libs/caffe2-2.0.0-r4/work/pytorch-2.0.0/torch/csrc/distributed/rpc/tensorpipe_cuda.cpp:11:10: fatal error: tensorpipe/tensorpipe_cuda.h: No such file or directory
   11 | #include <tensorpipe/tensorpipe_cuda.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.


Is sci-libs/tensorpipe supposed to supply that, or is it supposed to come with caffe2?

The file seems to get unpacked into /var/tmp if I ebuild tensorpipe prepare, but doesn't get installed.

If I copy it manually, caffe2 then barfs on config_cuda which is only present as config_cuda.h.in in tensorpipe's unpack dir and has cmake defines inside

If I copy and edit *that*, it then barfs on tensorpipe/common/cuda_buffer.h and so on.

Should tensorpipe have a cuda use flag or something to install all this stuff properly?
Comment 1 Larry the Git Cow gentoo-dev 2023-05-14 17:08:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c20b2f88a074632d3741ae5b3f498483e84fe388

commit c20b2f88a074632d3741ae5b3f498483e84fe388
Author:     Alfredo Tupone <tupone@gentoo.org>
AuthorDate: 2023-05-14 17:07:11 +0000
Commit:     Alfredo Tupone <tupone@gentoo.org>
CommitDate: 2023-05-14 17:07:52 +0000

    sci-libs/tensorpipe: enable cuda
    
    Closes: https://bugs.gentoo.org/906204
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>

 sci-libs/tensorpipe/metadata.xml                           |  3 +++
 ...e-2022.05.13.ebuild => tensorpipe-2022.05.13-r1.ebuild} | 14 ++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
Comment 2 Tupone Alfredo gentoo-dev 2023-05-14 17:08:54 UTC
Please report if working.
I need to link caffe2 use flags with this
Comment 3 Michael Moon 2023-05-15 04:06:33 UTC
Thanks Tupone,

tensorpipe[cuda] does install cuda-related files now, thanks.

caffe2[cuda,tensorpipe] build succeeds now too, excellent!

And yes, caffe2[cuda,tensorpipe] probably should depend on tensorpipe[cuda] now that the flag exists :)

I'm unsure if caffe2[-cuda,tensorpipe] should depend on tensorpipe[-cuda] or just tensorpipe though; I suspect the latter since tensorpipe provides separate tensorpipe.so and tensorpipe_cuda.so
Comment 4 Larry the Git Cow gentoo-dev 2023-05-15 06:27:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=956d531c9b11328f220abea0bdc319ed3ccfe891

commit 956d531c9b11328f220abea0bdc319ed3ccfe891
Author:     Alfredo Tupone <tupone@gentoo.org>
AuthorDate: 2023-05-15 06:25:19 +0000
Commit:     Alfredo Tupone <tupone@gentoo.org>
CommitDate: 2023-05-15 06:26:07 +0000

    sci-libs/caffe2: if cuda require tensorpipe[cuda]
    
    Bug: https://bugs.gentoo.org/906204
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>

 sci-libs/caffe2/{caffe2-2.0.1.ebuild => caffe2-2.0.1-r1.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)