Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMAKE error python-torchvision-rocm #16

Open
CatWithAPen opened this issue Oct 14, 2024 · 3 comments
Open

CMAKE error python-torchvision-rocm #16

CatWithAPen opened this issue Oct 14, 2024 · 3 comments

Comments

@CatWithAPen
Copy link

I am getting the following CMake error when trying to build the package:

CMake Warning at /lib/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /lib/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:24 (find_package)


-- Found Torch: /usr/lib/libtorch.so
-- Found PNG: /usr/lib/libpng.so (found version "1.6.44")
-- Found JPEG: /usr/lib/libjpeg.so (found version "80")
-- Configuring done (2.9s)
CMake Error in CMakeLists.txt:
  Imported target "torch" includes non-existent path

    "//include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done (0.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: python-torchvision-rocm-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
@wuxxin
Copy link
Owner

wuxxin commented Nov 15, 2024

released a new version (compatible with pytorch 2.5.1), please retry

@Lachmoewe
Copy link

Just tried with 0.20.1-1 and I'm getting a compiler error:

CMake Warning at /usr/lib/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /usr/lib/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:29 (find_package)


-- Found Torch: /usr/lib/libtorch.so
-- Found PNG: /usr/lib/libpng.so (found version "1.6.44")
-- Found JPEG: /usr/lib/libjpeg.so (found version "80")
-- Configuring done (3.3s)
-- Generating done (0.0s)
-- Build files have been written to: /var/tmp/pamac-build-lachmoewe/python-torchvision-rocm/src/vision-0.20.1/build
[1/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/io/image/cpu/common_jpeg.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
[...]
[29/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/vision.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
In file included from /var/tmp/pamac-build-lachmoewe/python-torchvision-rocm/src/vision-0.20.1/torchvision/csrc/vision.cpp:1:
/var/tmp/pamac-build-lachmoewe/python-torchvision-rocm/src/vision-0.20.1/torchvision/csrc/vision.h:10:24: warning: ‘_register_ops’ initialized and declared ‘extern’
   10 | extern "C" inline auto _register_ops = &cuda_version;
      |                        ^~~~~~~~~~~~~
[30/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/ops/autograd/roi_pool_kernel.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
[31/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/ops/cpu/roi_pool_kernel.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
[32/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/ops/nms.cpp.o
FAILED: CMakeFiles/torchvision.dir/torchvision/csrc/ops/nms.cpp.o 
/usr/bin/c++ -DGFLAGS_IS_A_DLL=0 -DGLOG_USE_GFLAGS -DGLOG_USE_GLOG_EXPORT -DJPEG_FOUND -DPNG_FOUND -DPROTOBUF_USE_DLLS -DUSE_C10D_GLOO -DUSE_C10D_MPI -DUSE_C10D_NCCL -DUSE_DISTRIBUTED -DUSE_PROF_API=1 -DUSE_RPC -DUSE_TENSORPIPE -D__HIP_PLATFORM_AMD__=1 -Dtorchvision_EXPORTS -I/var/tmp/pamac-build-lachmoewe/python-torchvision-rocm/src/vision-0.20.1/torchvision/csrc -isystem /usr/include/torch/csrc/api/include -isystem /opt/rocm/include -isystem /opt/rocm/include/hiprand -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -O3 -std=gnu++17 -fPIC -D_GLIBCXX_USE_CXX11_ABI=1 -fPIC -D__HIP_PLATFORM_AMD__=1 -DCUDA_HAS_FP16=1 -DUSE_ROCM -D__HIP_NO_HALF_OPERATORS__=1 -D__HIP_NO_HALF_CONVERSIONS__=1 -DTORCH_HIP_VERSION=600 -Wno-shift-count-negative -Wno-shift-count-overflow -Wno-duplicate-decl-specifier -DCAFFE2_USE_MIOPEN -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_HIP -std=c++17 -DHIPBLAS_V2 -DHIPBLASLT_HAS_GETINDEXFROMALGO -DHIP_NEW_TYPE_ENUMS -MD -MT CMakeFiles/torchvision.dir/torchvision/csrc/ops/nms.cpp.o -MF CMakeFiles/torchvision.dir/torchvision/csrc/ops/nms.cpp.o.d -o CMakeFiles/torchvision.dir/torchvision/csrc/ops/nms.cpp.o -c /var/tmp/pamac-build-lachmoewe/python-torchvision-rocm/src/vision-0.20.1/torchvision/csrc/ops/nms.cpp
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
/var/tmp/pamac-build-lachmoewe/python-torchvision-rocm/src/vision-0.20.1/torchvision/csrc/ops/nms.cpp: In function ‘void vision::ops::TORCH_LIBRARY_FRAGMENT_init_torchvision_3(torch::Library&)’:
/var/tmp/pamac-build-lachmoewe/python-torchvision-rocm/src/vision-0.20.1/torchvision/csrc/ops/nms.cpp:22:5: error: ‘class torch::Library’ has no member named ‘set_python_module’
   22 |   m.set_python_module("torchvision._meta_registrations");
      |     ^~~~~~~~~~~~~~~~~
[33/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/ops/deform_conv2d.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
[34/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/ops/ps_roi_align.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
[35/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/ops/roi_align.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
[36/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/ops/ps_roi_pool.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
[37/38] Building CXX object CMakeFiles/torchvision.dir/torchvision/csrc/ops/roi_pool.cpp.o
cc1plus: warning: command-line option ‘-Wno-duplicate-decl-specifier’ is valid for C/ObjC but not for C++
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
    Aborting...

Looks like this issue

@paullouisageneau
Copy link

I just tried to install version 0.20.1-1 and the build fails with a CMake error:

CMake Warning at /lib/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /lib/cmake/Torch/TorchConfig.cmake:120 (append_torchlib_if_found)
  CMakeLists.txt:29 (find_package)


-- Found Torch: /usr/lib/libtorch.so
-- Found PNG: /usr/lib/libpng.so (found version "1.6.44")
-- Found JPEG: /usr/lib/libjpeg.so (found version "80")
-- Configuring done (1.2s)
CMake Error in CMakeLists.txt:
  Imported target "torch" includes non-existent path

    "//include/torch/csrc/api/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in CMakeLists.txt:
  Imported target "torch" includes non-existent path

    "//include/torch/csrc/api/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done (0.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'python-torchvision-rocm-0.20.1-1': 
error: packages failed to build: python-torchvision-rocm-0.20.1-1

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

No branches or pull requests

4 participants