PR #9246: Perform elementwise BF16 math natively in platforms that support it.
PR #9246: Perform elementwise BF16 math natively in platforms that support it.

Imported from GitHub PR https://github.com/openxla/xla/pull/9246

Perform elementwise BF16 math natively in platforms that support it, e.g., Hopper GPUs.

In xla/service/gpu, we check the platform using Cuda compute capability. We don't have access to that in llvm_ir, so we pass an optional bool to say whether native BF16 support is there. We make it optional with default to false, to avoid a very large refactoring that would touch most functions in llvm_ir.
Copybara import of the project:

--
4376a642bd6bbf9d553bd6b030cdebf9efb9a97b by Dimitris Vardoulakis <dvardoulakis@nvidia.com>:

Perform elementwise BF16 math natively in platforms that support it, e.g., Hopper GPUs.

After Ben's recent change to not substitute i16 for BF16 in llvm, the only change needed is to enable BF16 in gpu_float_support.

Merging this change closes #9246

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/9246 from dimvar:native-bf16-support-hopper 4376a642bd6bbf9d553bd6b030cdebf9efb9a97b
