-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Int incompatibility error on building TensorFlowLiteC framework #48464
Comments
@Maratyszcza @multiverse-tf could you take a look at this? |
According to this comment, the issue should have been fixed on the XNNPACK side by this commit google/XNNPACK@60fc613. Could you help with the verification? Thx! Btw, you need to change https://github.com/tensorflow/tensorflow/blob/master/tensorflow/workspace2.bzl to update the XNNPACK to the proper commit for the testing. |
@multiverse-tf thank you for the tip with updating of So what I did:
The final part looks like this, starting from line 121: # To update any of the dependencies bellow:
# a) update URL and strip_prefix to the new git commit hash
# b) get the sha256 hash of the commit by running:
# curl -L <url> | sha256sum
# and update the sha256 with the result.
tf_http_archive(
name = "XNNPACK",
sha256 = "27736d765efbac5a8077862515b7212bd9a5cfa281ab06f4c0a27c3fc445c58e",
strip_prefix = "XNNPACK-60fc61373f21f0ad3164cc719de464f4b787dc04",
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/60fc61373f21f0ad3164cc719de464f4b787dc04.zip",
"https://github.com/google/XNNPACK/archive/60fc61373f21f0ad3164cc719de464f4b787dc04.zip",
],
) I also noticed, that from these two URLs only the second one is operational. Before starting the build I also cleared the folder Anyway the build failed with almost the same results. Here is the warning regarding missing commit: Full log: Do you have any advice how to proceed further? |
The error is due to compiler lacking |
@Maratyszcza thank you for the advice! I am building iOS version and currently using the latest stable version of XCode:
https://en.wikipedia.org/wiki/Xcode Would you suggest to use beta 12.5 beta 3 (12E5244e)? For me it is also OK to not have the latest version of TensorFlow. What do you think if I get the previous release, could it be built using the stable version of XCode? Do you have any certain release in mind? |
From the report in google/XNNPACK#1402 it looks like Apple toolchain for AArch32 doesn't support neon-dot intrinsics at all. I'm working on removing these microkernels from iOS ARMv7 builds. |
99db613 is supposed to fix this issue |
@Maratyszcza thank you! I made
The build has been completed without errors. |
System information
Problem description
I tried to build TensorFlow Lite as suggested here:
Build TensorFlowLiteC dynamic framework (recommended)
https://www.tensorflow.org/lite/guide/build_ios#build_tensorflowlitec_dynamic_framework_recommended
and ended up with int vs int32 incompatibility error
Steps
.configure
bazel build
The build is ending up with
error: assigning to 'int32x4_t' (vector of 4 'int32_t' values) from incompatible type 'int'
I tried on two different MacBooks with M1 and Intel chips.
The issues seem to come from here:
https://github.com/google/XNNPACK/issues?q=is%3Aissue+int
but I can't find any appropriate one.
Could you suggest why it is happened and how the TensorFlowLiteC dynamic framework can be built?
Logs
Log part:
external/XNNPACK/src/qs8-gemm/gen/1x8c4-minmax-neondot.c:63:18: error: assigning to 'int32x4_t' (vector of 4 'int32_t' values) from incompatible type 'int'
vacc0x0123 = vdotq_lane_s32(vacc0x0123, vb0123x0123, va0x01234567, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Full log:
tflite_install.log
The text was updated successfully, but these errors were encountered: