Fix macos oss build.
Fix macos oss build.

Explicitly match the inline elements to avoid type mismatch.

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/10930 from Intel-tensorflow:kanvi/f16-bug-fix 3587ef104f9b47c2fd05dda1f0008cd3b53da421
