[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1080206: marked as done (onednn: fix ftbfs on riscv64)



Your message dated Thu, 12 Sep 2024 14:37:17 +0000
with message-id <E1sokwf-00Ce5x-Aj@fasolo.debian.org>
and subject line Bug#1080206: fixed in onednn 3.5.3-2
has caused the Debian Bug report #1080206,
regarding onednn: fix ftbfs on riscv64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1080206: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1080206
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: onednn
Version: 3.5.3-1
Severity: important
Tags: ftbfs patch
User: debian-riscv@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv@lists.debian.org

Dear Maintainer,

If I understand correctly, the upstream has supported riscv64 
although it is still in the experimental stage from its readme[0]

I have a look at the ftbfs on riscv64:
https://buildd.debian.org/status/logs.php?pkg=onednn&arch=riscv64

The mainly issue is that we need to enable `DONEDNN_CPU_RUNTIME=SEQ` on
riscv64[1] then it uses uses a custom string to represent riscv64 also.
In addition to one commit backported from upstream, the package can be
built on my local build. But it’s really time-consuming(>10h).

The only issue for me is that should be enabled `lto` on riscv64 also,
but I got the error maybe due to I did not find right build dependences.
I will look this continuous.

```
 FAILED: cmTC_ae435
    : && /usr/bin/clang-17 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flt
o=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fdiagnostics-color=always  -W
date-time -D_FORTIFY_SOURCE=2 -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -Wl,--as-needed CMakeFiles/cmT
C_ae435.dir/testCCompiler.c.o -o cmTC_ae435   && :
    /usr/bin/ld: /usr/lib/llvm-17/bin/../lib/LLVMgold.so: error loading plugin: /usr/lib/llvm-17/bin/../lib/LLVMg
old.so: cannot open shared object file: No such file or directory
    clang-17: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.

```

Please review the patch and let me know any issues.

BR,
Bo

[0]: https://github.com/oneapi-src/oneDNN?tab=readme-ov-file#installation
[1]: https://github.com/oneapi-src/oneDNN/issues/1848#issuecomment-2026267079
diff -Nru onednn-3.5.3/debian/changelog onednn-3.5.3/debian/changelog
--- onednn-3.5.3/debian/changelog	2024-08-28 16:14:37.000000000 +0000
+++ onednn-3.5.3/debian/changelog	2024-08-29 15:18:05.000000000 +0000
@@ -1,3 +1,11 @@
+onednn (3.5.3-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Enable DONEDNN_CPU_RUNTIME=SEQ on riscv64 build it with clang. 
+    (Closes: #-1)
+
+ -- Bo YU <tsu.yubo@gmail.com>  Thu, 29 Aug 2024 15:18:05 +0000
+
 onednn (3.5.3-1) unstable; urgency=medium
 
   [ Shengqi Chen ]
diff -Nru onednn-3.5.3/debian/control onednn-3.5.3/debian/control
--- onednn-3.5.3/debian/control	2024-08-28 15:58:46.000000000 +0000
+++ onednn-3.5.3/debian/control	2024-08-29 15:18:05.000000000 +0000
@@ -7,7 +7,8 @@
                debhelper-compat (= 13),
                libtbb-dev,
                ninja-build,
-               libsimde-dev (>= 0.7.0)
+               libsimde-dev (>= 0.7.0),
+	       clang-17 [riscv64],
 Standards-Version: 4.7.0.1
 Homepage: https://github.com/oneapi-src/oneDNN
 Rules-Requires-Root: no
diff -Nru onednn-3.5.3/debian/patches/add-primitive-header-on-rv64.patch onednn-3.5.3/debian/patches/add-primitive-header-on-rv64.patch
--- onednn-3.5.3/debian/patches/add-primitive-header-on-rv64.patch	1970-01-01 00:00:00.000000000 +0000
+++ onednn-3.5.3/debian/patches/add-primitive-header-on-rv64.patch	2024-08-29 15:18:05.000000000 +0000
@@ -0,0 +1,15 @@
+Description: Add missing include common/primitive.hpp
+Applied-Upstream: https://github.com/oneapi-src/oneDNN/pull/2053
+Last-Update: 2024-08-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/cpu/rv64/rvv_nchw_pooling.hpp
++++ b/src/cpu/rv64/rvv_nchw_pooling.hpp
+@@ -19,6 +19,7 @@
+ #define RV64_NCHW_POOLING_HPP
+ 
+ #include "cpu/cpu_pooling_pd.hpp"
++#include "common/primitive.hpp"
+ 
+ namespace dnnl {
+ namespace impl {
diff -Nru onednn-3.5.3/debian/patches/series onednn-3.5.3/debian/patches/series
--- onednn-3.5.3/debian/patches/series	2024-08-28 15:58:46.000000000 +0000
+++ onednn-3.5.3/debian/patches/series	2024-08-29 15:18:05.000000000 +0000
@@ -0,0 +1 @@
+add-primitive-header-on-rv64.patch
diff -Nru onednn-3.5.3/debian/rules onednn-3.5.3/debian/rules
--- onednn-3.5.3/debian/rules	2024-08-28 16:14:22.000000000 +0000
+++ onednn-3.5.3/debian/rules	2024-08-29 15:18:05.000000000 +0000
@@ -5,6 +5,13 @@
 export DEB_LDFLAGS_MAINT_APPEND  = -Wl,--as-needed
 #export CLICOLOR_FORCE=ON
 
+ifneq (,$(filter $(DEB_BUILD_ARCH), riscv64))
+export DEB_BUILD_MAINT_OPTIONS += optimize=-lto
+
+export CC=clang-17
+export CXX=clang++-17
+endif
+
 %:
 	dh $@ -Scmake+ninja
 
@@ -12,7 +19,9 @@
 override_dh_auto_configure:
 	dh_auto_configure -- \
 		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-		-DONEDNN_ARCH_OPT_FLAGS=""
+		-DONEDNN_ARCH_OPT_FLAGS="" \
+		$(if $(filter riscv64,$(DEB_BUILD_ARCH)),-DONEDNN_CPU_RUNTIME=SEQ -DDNNL_TARGET_ARCH=RV64,)
+		
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Source: onednn
Source-Version: 3.5.3-2
Done: Shengqi Chen <harry-chen@outlook.com>

We believe that the bug you reported is fixed in the latest version of
onednn, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1080206@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Shengqi Chen <harry-chen@outlook.com> (supplier of updated onednn package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 12 Sep 2024 21:39:38 +0800
Source: onednn
Architecture: source
Version: 3.5.3-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Deep Learning Team <debian-ai@lists.debian.org>
Changed-By: Shengqi Chen <harry-chen@outlook.com>
Closes: 1080206
Changes:
 onednn (3.5.3-2) unstable; urgency=medium
 .
   [ Shengqi Chen ]
   * Team upload.
   * d/control: remove useless dependency of libdnnl-dev
   * d/symbols: add back c++ symbols and set as optional,
     unify symbol files on all architectures
 .
   [ Bo YU ]
   * Enable DONEDNN_CPU_RUNTIME=SEQ on riscv64 and build it with clang.
     (Closes: #1080206)
Checksums-Sha1:
 dd26426dd5a1643cb1d5247ee274effb275c26a1 1895 onednn_3.5.3-2.dsc
 76f53f105f9bf221c0197f84c438f16f53594759 9832 onednn_3.5.3-2.debian.tar.xz
 5eee1a116da5786567e95670c929cd982878a677 6997 onednn_3.5.3-2_amd64.buildinfo
Checksums-Sha256:
 c3b3d26627238135fc372943a45535ae95ee186abef84c59b9b3cfed7b15e4cf 1895 onednn_3.5.3-2.dsc
 3e34218566bf6cdb4ce9899ac6f8aee24795c080560a70e41137c1a16dc06a0d 9832 onednn_3.5.3-2.debian.tar.xz
 ae6b6f4d5a06f122b92022d63310f8d2631936046b93a3606c049aff2891a3dd 6997 onednn_3.5.3-2_amd64.buildinfo
Files:
 9ae2b0dd3d8c87d3b8195890c7cbd29a 1895 science optional onednn_3.5.3-2.dsc
 6071a7607ff99c67342d7bba71481f46 9832 science optional onednn_3.5.3-2.debian.tar.xz
 8082b03b232b959f7a6a9db2e9354f1f 6997 science optional onednn_3.5.3-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQFLBAEBCgA1FiEEj6l3eq8YAbiQe3eGbuOJwPGK93QFAmbi8I0XHGhhcnJ5LWNo
ZW5Ab3V0bG9vay5jb20ACgkQbuOJwPGK93RbiQf7B68/yaVsF0ZwC1l2AEWhpwi2
xzUTBk1bUjB6zVEJ8EKk3vQZX7x7v2hwQAtTplDJWE46YxoNyIw5FP67L0lKfMaz
QRRjPNMtKjUao2hZ5Ns8jft6z6lkHqkSs8TIckrWzay0iCR6aRRFxcHpK/DCA55A
klXA4r1Q0s5xG6PAIQtbjsUN5LWrAVH1vn3CFz/wszlQ0EzPqVWaIyFERo/bqT6O
fRme+tlyQMed5oOse5z6h+BeVVMhrs7V29Re5RRuJGlijVe3il/sfkvLzYdoREOx
4hM9vf8qmJmqi0s/YaD6c3q0jy1f0sRwJ/uRdqrNdEa+3Awhu1Qhn19cC9n9wA==
=wwlF
-----END PGP SIGNATURE-----

Attachment: pgpsCuF7VfjRP.pgp
Description: PGP signature


--- End Message ---

Reply to: