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

Configurable attribute "deps" in @XNNPACK//:prod_microkernels doesn't match this configuration #66000

Open
Nayana-ibm opened this issue Apr 18, 2024 · 4 comments
Assignees
Labels

Comments

@Nayana-ibm
Copy link
Contributor

Nayana-ibm commented Apr 18, 2024

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

source

TensorFlow version

master

Custom code

No

OS platform and distribution

Linux ubuntu 20.04 (s390x)

Mobile device

NA

Python version

3.8.10

Bazel version

6.1.0

GCC/compiler version

9.4.0

CUDA/cuDNN version

TF_NEED_CUDA=0

GPU model and memory

No response

Current behavior?

I am building Tensorflow on s390x platform using command: bazel build --define=tensorflow_mkldnn_contraction_kernel=0 --define tflite_with_xnnpack=false //tensorflow/tools/pip_package:wheel --repo_env=WHEEL_NAME=tensorflow_cpu

Build fails with an error:

ERROR: /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/XNNPACK/BUILD.bazel:2998:26: configurable attribute "deps" in @XNNPACK//:prod_microkernels doesn't match this configuration. Would a default condition help?
Conditions checked:
 @XNNPACK//build_config:aarch32
 @XNNPACK//build_config:aarch64
 @XNNPACK//build_config:x86
 @XNNPACK//build_config:emscripten_wasm
 @XNNPACK//build_config:emscripten_wasmsimd
 @XNNPACK//build_config:emscripten_wasmrelaxedsimd
 @XNNPACK//build_config:riscv

Even though setting flag tflite_with_xnnpack=false , build fails. Is there any more flags or changes are required to build Tensorflow successfully? Tried to check the code which populates build_config however didn't get much information.

Standalone code to reproduce the issue

git clone https://github.com/tensorflow/tensorflow
cd tensorflow/
TF_SYSTEM_LIBS="boringssl" bazel --host_jvm_args="-Xms1024m" --host_jvm_args="-Xmx2048m" build --define=tensorflow_mkldnn_contraction_kernel=0 --define tflite_with_xnnpack=false --define=use_xnnpack=true //tensorflow/tools/pip_package:wheel --repo_env=WHEEL_NAME=tensorflow_cpu

Relevant log output

ERROR: /root/.cache/bazel/_bazel_root/efb88f6336d9c4a18216fb94287b8d97/external/XNNPACK/BUILD.bazel:2998:26: configurable attribute "deps" in @XNNPACK//:prod_microkernels doesn't match this configuration. Would a default condition help?


Conditions checked:
 @XNNPACK//build_config:aarch32
 @XNNPACK//build_config:aarch64
 @XNNPACK//build_config:x86
 @XNNPACK//build_config:emscripten_wasm
 @XNNPACK//build_config:emscripten_wasmsimd
 @XNNPACK//build_config:emscripten_wasmrelaxedsimd
 @XNNPACK//build_config:riscv
@Nayana-ibm
Copy link
Contributor Author

@Venkat6871 Any updates?

@sawantkumar
Copy link

Hi @Nayana-ibm ,

I will replicate the issue and will get back to you regarding this.

Copy link

Are you satisfied with the resolution of your issue?
Yes
No

@Nayana-ibm Nayana-ibm reopened this Apr 30, 2024
@Nayana-ibm
Copy link
Contributor Author

Nayana-ibm commented Apr 30, 2024

Applied below patch and issue resolved.

diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl
index a09ac522b0a..373275557f9 100644
--- a/tensorflow/workspace2.bzl
+++ b/tensorflow/workspace2.bzl
@@ -153,6 +153,7 @@ def _tf_repositories():
         sha256 = "256ab4034e93bdeea2e1216cd8361a85bd4ee4884a89bf5e4e142abcdc796805",
         strip_prefix = "XNNPACK-50037f8072731a2cc30a961b96e199ad691887e4",
         urls = tf_mirror_urls("https://github.com/google/XNNPACK/archive/50037f8072731a2cc30a961b96e199ad691887e4.zip"),
+       patch_file = ["//third_party:xnn.patch"],
     )
     # LINT.ThenChange(//tensorflow/lite/tools/cmake/modules/xnnpack.cmake)

diff --git a/third_party/xnn.patch b/third_party/xnn.patch
new file mode 100644
index 00000000000..00b9f4e2b12
--- /dev/null
+++ b/third_party/xnn.patch
@@ -0,0 +1,12 @@
+diff --git a/build_defs.bzl b/build_defs.bzl
+index 32814271..42f3a7e9 100644
+--- a/build_defs.bzl
++++ b/build_defs.bzl
+@@ -260,6 +260,7 @@
+             "//build_config:emscripten_wasmsimd": wasmsimd_deps,
+             "//build_config:emscripten_wasmrelaxedsimd": wasmrelaxedsimd_deps,
+             "//build_config:riscv": riscv_deps,
++            "//conditions:default": [],
+         }),
+         defines = defines,
+         compatible_with = compatible_with,

Not sure why default condition is not added xnnpack/build.bzl .

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

No branches or pull requests

3 participants