This is an archive of the discontinued LLVM Phabricator instance.

[NVPTX] Add ex2 f16 support
ClosedPublic

Authored by npmiller on Feb 7 2022, 9:45 AM.

Details

Summary

This patch adds builtins and intrinsics for the f16 and f16x2 variants of the ex2 instruction.

These two variants were added in PTX7.0, and are supported by sm_75 and above.

Note that this isn't wired with the exp2 llvm intrinsic because the ex2 instruction is only available in its approx variant.

Running ptxas on the assembly generated by the test f16-ex2.ll works as expected.

Depends on D118977

Diff Detail

Event Timeline

npmiller created this revision.Feb 7 2022, 9:45 AM
npmiller requested review of this revision.Feb 7 2022, 9:45 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 7 2022, 9:45 AM
tra added a subscriber: tra.Feb 7 2022, 11:49 AM

Is the patch is ready for review?

Yes, it should be good to be reviewed.

tra accepted this revision.Feb 22 2022, 2:20 PM
This revision is now accepted and ready to land.Feb 22 2022, 2:20 PM
This revision was landed with ongoing or failed builds.Feb 23 2022, 1:57 PM
Closed by commit rG69a8350c232a: [NVPTX] Add ex2.approx.f16/f16x2 support (authored by npmiller, committed by tra). · Explain Why
This revision was automatically updated to reflect the committed changes.