Source: onednn Version: 3.7.2+ds-1 Tags: patch User: [email protected] Usertags: ftcbfs
onednnn fails to cross build from source for arm64 on amd64, because it confuses build and host architecture and thus gets architecture-specific parameters wrong. I'm attaching a patch to fix that. Helmut
diff --minimal -Nru onednn-3.7.2+ds/debian/changelog onednn-3.7.2+ds/debian/changelog --- onednn-3.7.2+ds/debian/changelog 2025-04-07 18:02:17.000000000 +0200 +++ onednn-3.7.2+ds/debian/changelog 2025-04-21 14:07:20.000000000 +0200 @@ -1,3 +1,10 @@ +onednn (3.7.2+ds-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: fix build vs host confusion. (closes: #-1) + + -- Helmut Grohne <[email protected]> Mon, 21 Apr 2025 14:07:20 +0200 + onednn (3.7.2+ds-1) unstable; urgency=medium * New upstream version 3.7.2+ds. diff --minimal -Nru onednn-3.7.2+ds/debian/rules onednn-3.7.2+ds/debian/rules --- onednn-3.7.2+ds/debian/rules 2025-01-24 09:51:07.000000000 +0100 +++ onednn-3.7.2+ds/debian/rules 2025-04-21 14:07:18.000000000 +0200 @@ -10,14 +10,14 @@ BUILD_TEST=OFF ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) # too slow on rv64, takes hours (#1080206) -ifneq ($(DEB_BUILD_ARCH), riscv64) +ifneq ($(DEB_HOST_ARCH), riscv64) BUILD_TEST=ON endif endif # ukernel is only implemented (and used by PyTorch) on amd64 BUILD_UKERNEL=OFF -ifeq ($(DEB_BUILD_ARCH), amd64) +ifeq ($(DEB_HOST_ARCH), amd64) BUILD_UKERNEL=ON endif @@ -34,15 +34,15 @@ -DDNNL_EXPERIMENTAL_UKERNEL=${BUILD_UKERNEL} \ -DDNNL_BUILD_TESTS=${BUILD_TEST} \ -DONEDNN_ARCH_OPT_FLAGS="" \ - $(if $(filter riscv64,$(DEB_BUILD_ARCH)),-DONEDNN_CPU_RUNTIME=SEQ -DDNNL_TARGET_ARCH=RV64,) + $(if $(filter riscv64,$(DEB_HOST_ARCH)),-DONEDNN_CPU_RUNTIME=SEQ -DDNNL_TARGET_ARCH=RV64,) override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) -ifeq ($(DEB_BUILD_ARCH), s390x) +ifeq ($(DEB_HOST_ARCH), s390x) # fails on some bf16 cases dh_auto_test || true -else ifeq ($(DEB_BUILD_ARCH), riscv64) +else ifeq ($(DEB_HOST_ARCH), riscv64) # disabled true else

