This is an archive of the discontinued LLVM Phabricator instance.

[mlir][python][f16] add ctype python binding support for f16
ClosedPublic

Authored by aartbik on Jun 2 2022, 3:23 PM.

Details

Summary

Similar to complex128/complex64, float16 has no direct support
in the ctypes implementation. This fixes the issue by using a
custom F16 type to change the view in and out of MLIR code

Diff Detail

Event Timeline

aartbik created this revision.Jun 2 2022, 3:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2022, 3:23 PM
aartbik requested review of this revision.Jun 2 2022, 3:23 PM
wrengr accepted this revision.Jun 2 2022, 4:49 PM
wrengr added inline comments.
mlir/python/mlir/runtime/np_to_memref.py
37

+1 for factoring this out :)

This revision is now accepted and ready to land.Jun 2 2022, 4:49 PM