You are not logged in.

#1 2024-04-03 23:32:56

pearmypie
Member
Registered: 2024-04-03
Posts: 4

python-torchvision-rocm CMake build error (solved: build in chroot)

Here's the output of yay -Syu python-torchvision-rocm. I have to mention that I already have python-pip, python-pytorch-opt-rocm, hip-runtime-amd and haplas installed.
I am using an AMD GPU (RX6650 XT). I appreciate any help:)

==> Making package: python-torchvision-rocm 0.17.1-1 (Thu Apr  4 01:26:15 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found vision-0.17.1.tar.gz
  -> Found pytorch-vision-8096.patch
  -> Found pytorch-vision-8112.patch
  -> Found torchvision-0_17_1-fix-build.patch
==> Validating source files with sha256sums...
    vision-0.17.1.tar.gz ... Passed
    pytorch-vision-8096.patch ... Skipped
    pytorch-vision-8112.patch ... Skipped
    torchvision-0_17_1-fix-build.patch ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting vision-0.17.1.tar.gz with bsdtar
bsdtar: Failed to set default locale
==> Starting prepare()...
patching file torchvision/csrc/io/decoder/stream.cpp
patching file setup.py
==> Sources are ready.
==> Making package: python-torchvision-rocm 0.17.1-1 (Thu Apr  4 01:26:18 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
building for PYTORCH_ROCM_ARCH=gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Caffe2: Found gflags with new-style gflags target.
-- Caffe2: Found glog with new-style glog target.
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")
-- Caffe2: Found protobuf with new-style protobuf targets.
-- Caffe2: Protobuf version 25.3.0
Building PyTorch for GPU arch: gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102
perl: warning: Setting locale failed.
***IRRELEVANT PERL LOCALE ERRORS***
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
-- Could NOT find HIP: Found unsuitable version "0.0.0", but required is at least "1.0" (found /opt/rocm)
HIP VERSION: 0.0.0
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:24 (find_package)


-- Found Torch: /usr/lib/libtorch.so
-- Found PNG: /usr/lib/libpng.so (found version "1.6.43")
-- Found JPEG: /usr/lib/libjpeg.so (found version "80")
-- Configuring done (1.9s)
CMake Error at /usr/lib/cmake/Caffe2/Caffe2Targets.cmake:107 (set_target_properties):
  The link interface of target "torch_hip_library" contains:

    roc::hipblas

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /usr/lib/cmake/Caffe2/Caffe2Config.cmake:113 (include)
  /usr/lib/cmake/Torch/TorchConfig.cmake:68 (find_package)
  CMakeLists.txt:24 (find_package)


-- 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:
python-torchvision-rocm - exit status 4

Last edited by pearmypie (2024-04-09 07:59:11)

Offline

#2 2024-04-04 08:24:49

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,952

Re: python-torchvision-rocm CMake build error (solved: build in chroot)

building for PYTORCH_ROCM_ARCH=gfx906;gfx908;gfx90a;gfx940;gfx941;gfx942;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102

Your card appears to be gfx1032  , which is not in the list.

Try adding it by editing the PKGBUILD


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2024-04-04 20:43:31

pearmypie
Member
Registered: 2024-04-03
Posts: 4

Re: python-torchvision-rocm CMake build error (solved: build in chroot)

Thanks for the reply, however that didn't solve my issue. I set PYTORCH_ROCM_ARCH="gfx1032" and the error persists.

Offline

#4 2024-04-05 09:33:16

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,952

Re: python-torchvision-rocm CMake build error (solved: build in chroot)

CMake Error at /usr/lib/cmake/Caffe2/Caffe2Targets.cmake:107 (set_target_properties):

That file is present in multiple packages, python-pytorch-opt-rocm is only one of them (and not the first one pacman will pick as that's python-pytorch-rocm).

Try building in a clean chroot, see https://wiki.archlinux.org/title/Develo … ean_chroot


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2024-04-08 21:28:59

pearmypie
Member
Registered: 2024-04-03
Posts: 4

Re: python-torchvision-rocm CMake build error (solved: build in chroot)

I'm trying to run pkgctl build but at the end it just says target 'python-torchvision-rocm' wasn't found (?). In the meantime, another person opened an issue on the maintainer's github page.
https://github.com/wuxxin/aur-packages/issues/10
I hope it gets some attention.

Last edited by pearmypie (2024-04-08 21:30:11)

Offline

#6 2024-04-09 00:39:54

loqs
Member
Registered: 2014-03-06
Posts: 17,416

Re: python-torchvision-rocm CMake build error (solved: build in chroot)

pearmypie wrote:

I'm trying to run pkgctl build but at the end it just says target 'python-torchvision-rocm' wasn't found (?)

That means the build succeeded but the package could not be found in the official repositories to compare the two.

Offline

#7 2024-04-09 07:58:24

pearmypie
Member
Registered: 2024-04-03
Posts: 4

Re: python-torchvision-rocm CMake build error (solved: build in chroot)

Thank you for the help!

Offline

Board footer

Powered by FluxBB