tensorflow-metal 1.0.1 crashes in protobuf init code

I have a custom model that runs just fine on the CPU under tensorflow-2.13.0rc1. I'd go to the stable 1.12.0, however there's no pip version that can be installed on an ARM-based computer.

If I install tensorflow-metal 1.0.1 the same model crashes in what appears to be a protobuf initialization:

0   libtensorflow_framework.2.dylib	       0x31e103724 google::protobuf::Message::InitializationErrorString() const + 88
1   libarrow.600.dylib            	       0x168dc95c0 google::protobuf::MessageLite::ParseFromArray(void const*, int) + 276
2   libmetal_plugin.dylib         	       0x371c0b400 metal_plugin::P_Optimize(void*, TF_Buffer const*, TF_GrapplerItem const*, TF_Buffer*, TSL_Status*) + 88
3   libtensorflow_cc.2.dylib      	       0x359f5196c tensorflow::grappler::CGraphOptimizer::Optimize(tensorflow::grappler::Cluster*, tensorflow::grappler::GrapplerItem const&, tensorflow::GraphDef*) + 116

This is on an M2 Ultra with macOS 13.4.1.

Can anyone from the tensorflow-metal team look at what's going on?

Thanks!

Hi jollyturns,

  1. Can you, please, share the code snippet so we can take a closer look?
  2. While we are investigating the issue, try installing protobuf==3.20.3, python3 -m pip install protobuf==3.20.3 --force-reinstall, this might unblock you

I'll try to come up with the simplest version of the code that crashes. In the meantime here's a stack trace of the crash. I should have mentioned this is on Python 3.10, with protobuf 3.20.3 as you indicated.

Thanks for looking into this!

Same error, here is the stack trace :

tensorflow-metal 1.0.1 crashes in protobuf init code
 
 
Q