tensorflow/text

build from source master branch fails

ashsha21 opened this issue · 3 comments

Compiling the master branch fails with the following errors

./oss_scripts/run_build.sh
platform : Mac M1 (ARM 64)
bazel : 5.3.0

Has anyone build text wheel that would work with Apple M1 max ?

-- Error ---

In file included from tensorflow_text/core/kernels/byte_splitter_kernel.cc:15:
In file included from ./tensorflow_text/core/kernels/byte_splitter_kernel.h:19:
./tensorflow_text/core/kernels/byte_splitter_kernel_template.h:137:37: error: no member named 'FillOutputTensor' in 'tensorflow::text::ByteSplitterWithOffsetsOptflite::shim::Runtime::kTf'
SH_RETURN_IF_ERROR(this->template FillOutputTensor<unsigned char, uint8_t>(
~~~~ ^
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/status_macros.h:53:31: note: expanded from macro 'SH_RETURN_IF_ERROR'
::absl::Status status = (VA_ARGS);
^~~~~~~~~~~
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/op_kernel.h:202:45: note: in instantiation of member function 'tensorflow::text::ByteSplitterWithOffsetsOptflite::shim::Runtime::kTf::Invoke' requested here
return static_cast<SubType&>(*this).Invoke(ctx);
^
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/tf_op_shim.h:105:59: note: in instantiation of member function 'tflite::shim::OpKernelShim<tensorflow::text::ByteSplitterWithOffsetsOp, tflite::shim::Runtime::kTf>::Invoke' requested here
OP_REQUIRES_OK(c, ::tensorflow::FromAbslStatus(impl
->Invoke(&ctx)));
^
tensorflow_text/core/kernels/byte_splitter_kernel.cc:24:25: note: in instantiation of member function 'tflite::shim::TfOpKerneltensorflow::text::ByteSplitterWithOffsetsOp::Compute' requested here
ByteSplitterWithOffsetsOpKernel);
^
In file included from tensorflow_text/core/kernels/byte_splitter_kernel.cc:15:
In file included from ./tensorflow_text/core/kernels/byte_splitter_kernel.h:19:
./tensorflow_text/core/kernels/byte_splitter_kernel_template.h:139:37: error: no member named 'FillOutputTensor' in 'tensorflow::text::ByteSplitterWithOffsetsOptflite::shim::Runtime::kTf'
SH_RETURN_IF_ERROR(this->template FillOutputTensor<int64_t, int64_t>(
~~~~ ^
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/status_macros.h:53:31: note: expanded from macro 'SH_RETURN_IF_ERROR'
::absl::Status _status = (VA_ARGS);
^~~~~~~~~~~
In file included from tensorflow_text/core/kernels/byte_splitter_kernel.cc:15:
In file included from ./tensorflow_text/core/kernels/byte_splitter_kernel.h:19:
./tensorflow_text/core/kernels/byte_splitter_kernel_template.h:141:37: error: no member named 'FillOutputTensor' in 'tensorflow::text::ByteSplitterWithOffsetsOptflite::shim::Runtime::kTf'
SH_RETURN_IF_ERROR(this->template FillOutputTensor<int32_t, int32_t>(
~~~~ ^
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/status_macros.h:53:31: note: expanded from macro 'SH_RETURN_IF_ERROR'
::absl::Status _status = (VA_ARGS);
^~~~~~~~~~~
In file included from tensorflow_text/core/kernels/byte_splitter_kernel.cc:15:
In file included from ./tensorflow_text/core/kernels/byte_splitter_kernel.h:19:
./tensorflow_text/core/kernels/byte_splitter_kernel_template.h:143:37: error: no member named 'FillOutputTensor' in 'tensorflow::text::ByteSplitterWithOffsetsOptflite::shim::Runtime::kTf'
SH_RETURN_IF_ERROR(this->template FillOutputTensor<int32_t, int32_t>(
~~~~ ^
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/status_macros.h:53:31: note: expanded from macro 'SH_RETURN_IF_ERROR'
::absl::Status _status = (VA_ARGS);
^~~~~~~~~~~
In file included from tensorflow_text/core/kernels/byte_splitter_kernel.cc:15:
In file included from ./tensorflow_text/core/kernels/byte_splitter_kernel.h:19:
./tensorflow_text/core/kernels/byte_splitter_kernel_template.h:305:22: error: no member named 'FillOutputTensor' in 'tensorflow::text::ByteSplitByOffsetsOptflite::shim::Runtime::kTf'
this->template FillOutputTensor<absl::string_view, tensorflow::tstring>(
~~~~ ^
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/status_macros.h:53:31: note: expanded from macro 'SH_RETURN_IF_ERROR'
::absl::Status status = (VA_ARGS);
^~~~~~~~~~~
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/op_kernel.h:202:45: note: in instantiation of member function 'tensorflow::text::ByteSplitByOffsetsOptflite::shim::Runtime::kTf::Invoke' requested here
return static_cast<SubType&>(*this).Invoke(ctx);
^
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/tf_op_shim.h:105:59: note: in instantiation of member function 'tflite::shim::OpKernelShim<tensorflow::text::ByteSplitByOffsetsOp, tflite::shim::Runtime::kTf>::Invoke' requested here
OP_REQUIRES_OK(c, ::tensorflow::FromAbslStatus(impl
->Invoke(&ctx)));
^
tensorflow_text/core/kernels/byte_splitter_kernel.cc:28:25: note: in instantiation of member function 'tflite::shim::TfOpKerneltensorflow::text::ByteSplitByOffsetsOp::Compute' requested here
ByteSplitByOffsetsOpKernel);
^
In file included from tensorflow_text/core/kernels/byte_splitter_kernel.cc:15:
In file included from ./tensorflow_text/core/kernels/byte_splitter_kernel.h:19:
./tensorflow_text/core/kernels/byte_splitter_kernel_template.h:307:37: error: no member named 'FillOutputTensor' in 'tensorflow::text::ByteSplitByOffsetsOptflite::shim::Runtime::kTf'
SH_RETURN_IF_ERROR(this->template FillOutputTensor<int32_t, int64_t>(
~~~~ ^
bazel-out/darwin_arm64-opt/bin/external/local_config_tf/include/tensorflow/lite/kernels/shim/status_macros.h:53:31: note: expanded from macro 'SH_RETURN_IF_ERROR'
::absl::Status _status = (VA_ARGS);
^~~~~~~~~~~
6 errors generated.

This error is because it cannot find the function FillOutputTensor. We added this recently to core TF, so likely you need to update to a nightly version of TF if you want to build from HEAD. Another option would be to build from the latest stable branch - 2.11.

Thanks @broken - Is dependency DAG with version numbers for various TF packages available somewhere ? I was able to download prebuilt wheel for now but had to use 2.8 to get that working.

We match our versions to TensorFlow's to make it easy. So our 2.11.x will work with TF 2.11.x, TF Text 2.8.x with TF 2.8.x, etc. TF Text releases normally go out the day after core TF.

When building TF Text from HEAD, it should work with the HEAD (or latest nightly) of TF.