Error when trying to use Tensorflow mixed-precision on M1 Pro

I tried training my model on my M1 Pro using Tensorflow's mixed-precision, hoping it will boost the performance, but I got an error: .../mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm:289:0: error: 'mps.select' op failed to verify that all of {true_value, false_value, result} have same element type

.../mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm:289:0: note: see current operation: %5 = "mps.select"(%4, %3, %2) : (tensor<1xi1>, tensor<1xf16>, tensor<1xf32>) -> tensor<1xf16>

  • It might worth adding that I'm fine tuning a model that was originally trained in fp32, but I think that shouldn't be a problem. Let me know if that assumption is incorrect and if so, what I need to change for it to work.

Add a Comment