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

failed when changing GPU delegate compatibility database. #181

Open
gaikwadrahul8 opened this issue Nov 28, 2024 · 2 comments
Open

failed when changing GPU delegate compatibility database. #181

gaikwadrahul8 opened this issue Nov 28, 2024 · 2 comments

Comments

@gaikwadrahul8
Copy link
Contributor

  1. System information

OS Platform and Distribution (e.g., Linux Ubuntu 18.04):
TensorFlow Source Code 2.9

  1. Code
    When following /home/ts/tensorflow_src/tensorflow/lite/experimental/acceleration/compatibility/README.md to change delegate compatibility database,

When convertting from json to flatbuffer flatc -b database.fbs -- gpu_compatibility.json, it gave that
Usage: flatc [-b|--binary, -c|--cpp, -n|--csharp, -d|--dart, -g|--go, -j|--java,
-t|--json, --jsonschema, --kotlin, --lobster, -l|--lua, --nim, --php, --proto,
-p|--python, -r|--rust, --swift, -T|--ts, -o, -I, -M, --version, -h|--help,
--strict-json, --allow-non-utf8, --natural-utf8, --defaults-json,
--unknown-json, --no-prefix, --scoped-enums, --no-emit-min-max-enum-values,
--swift-implementation-only, --gen-includes, --no-includes, --gen-mutable,
--gen-onefile, --gen-name-strings, --gen-object-api, --gen-compare,
--gen-nullable, --java-package-prefix, --java-checkerframework, --gen-generated,
--gen-jvmstatic, --gen-all, --gen-json-emit, --cpp-include, --cpp-ptr-type,
--cpp-str-type, --cpp-str-flex-ctor, --cpp-field-case-style, --cpp-std,
--cpp-static-reflection, --object-prefix, --object-suffix, --go-namespace,
--go-import, --go-module-name, --raw-binary, --size-prefixed,
--proto-namespace-suffix, --oneof-union, --keep-proto-id, --proto-id-gap,
--grpc, --schema, --bfbs-filenames, --bfbs-comments, --bfbs-builtins,
--bfbs-gen-embed, --conform, --conform-includes, --filename-suffix,
--filename-ext, --include-prefix, --keep-prefix, --reflect-types,
--reflect-names, --rust-serialize, --rust-module-root-file, --root-type,
--require-explicit-ids, --force-defaults, --force-empty, --force-empty-vectors,
--flexbuffers, --no-warnings, --warnings-as-errors, --cs-global-alias,
--cs-gen-json-serializer, --json-nested-bytes, --ts-flat-files,
--ts-entry-points, --annotate-sparse-vectors, --annotate,
--no-leak-private-annotation]... FILE... [-- BINARY_FILE...]

error:
current schema has no file_identifier: cannot test if "gpu_compatibility.json" matches the schema, use --raw-binary to read this file anyway.

  1. and then using flatc -b database.fbs -- gpu_compatibility.json --raw-binary to convert.
  2. Found that convertted gpu_compatibility.bin size is 117K, but origin one is only 17K.
  3. and then compile
    bazel build -c opt --config=android_arm64 //tensorflow/lite/java:tensorflowlite_gpu
    bazel build -c opt --config=android_arm64 //tensorflow/lite/java:libtensorflowlite_gpu_jni.so

Using libtensorflowlite_gpu_jni.so in example image classification android app, and the app was crashed.

Very thanks.

@gaikwadrahul8
Copy link
Contributor Author

This issue originally reported by @megleo has been moved to this dedicated repository for LiteRT to enhance issue tracking and prioritization. To ensure continuity, we have created this new issue on your behalf.

We appreciate your understanding and look forward to your continued involvement.

@pkgoogle
Copy link

pkgoogle commented Dec 2, 2024

Original Issue: tensorflow/tensorflow#60079

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

No branches or pull requests

2 participants