tensorflow / tensorflow/text

Errors building tensorflow-text on apple silicon even when using matching versions of tensorflow 2.10

Open
#1,077 54 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.3k
Forks
379
Avg merge
3h 30m
Merged PRs (30d)
8

Description

I'm trying to build the tensorflow-text on a M1 Mac because tensorflow-text is not released for Apple silicon.

When compiling using ./oss_scripts/run_build.sh I see following errors:

In file included from tensorflow_text/core/kernels/byte_splitter_tflite.cc:18:
external/org_tensorflow/tensorflow/lite/kernels/shim/tflite_op_shim.h:128:35: error: no member named 'OpName' in 'tensorflow::text::ByteSplitterWithOffsetsOp<tflite::shim::Runtime::kTfLite>'
    resolver->AddCustom(ImplType::OpName(), GetTfLiteRegistration());
                        ~~~~~~~~~~^
tensorflow_text/core/kernels/byte_splitter_tflite.cc:28:53: note: in instantiation of member function 'tflite::shim::TfLiteOpKernel<tensorflow::text::ByteSplitterWithOffsetsOp>::Add' requested here
      tensorflow::text::ByteSplitterWithOffsetsOp>::Add(resolver);

I would also love to know if anyone is able to get tensorflow-text 2.10 to work on apple silicon.

Setup and reproduce

Tensorflow is installed via conda
conda install -c apple tensorflow-deps=2.10.0
python -m pip install tensorflow-macos==2.10.0
python -m pip install tensorflow-metal==0.6
Bazel is installed from home-brew
brew install bazelisk
Tensorflow-text is downloaded from release page
wget https://github.com/tensorflow/text/archive/refs/tags/v2.10.0.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the build with ./oss_scripts/run_build.sh and the TensorFlow 2.10 Apple Silicon setup described in the issue. Read tensorflow_text/core/kernels/byte_splitter_tflite.cc alongside external/org_tensorflow/tensorflow/lite/kernels/shim/tflite_op_shim.h, then verify that tensorflow-text 2.10 builds successfully on Apple silicon without the reported OpName error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos, python
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.