HomePhabricator

[mlir][gpu] Add support for f16 when lowering to nvvm intrinsics

Authored by herhut on Jun 9 2020, 8:20 AM.

Description

[mlir][gpu] Add support for f16 when lowering to nvvm intrinsics

Summary:
The NVVM target only provides implementations for tanh etc. on f32 and
f64 operands. To also support f16, we now insert operations to extend to f32
and truncate back to f16 around the intrinsic call.

Differential Revision: https://reviews.llvm.org/D81473