This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Add CUDA fatbinary magic
ClosedPublic

Authored by jhuber6 on Mar 3 2022, 12:24 PM.

Details

Summary

Nvidia uses fatbinaries to bundle all of their device code. This patch
adds the magic number "0x50ed55ba" used in their propeitary format to
the list of magic identifies. This is technically undocumented and could
unlikely be changed by Nvidia in the future.

Diff Detail

Unit TestsFailed

Event Timeline

jhuber6 created this revision.Mar 3 2022, 12:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 12:24 PM
jhuber6 requested review of this revision.Mar 3 2022, 12:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 12:24 PM
tra accepted this revision.Mar 3 2022, 1:51 PM

LGTM with a nit.

llvm/lib/BinaryFormat/Magic.cpp
192–193

I'd move it up to case 0x50:

This revision is now accepted and ready to land.Mar 3 2022, 1:51 PM
jhuber6 updated this revision to Diff 412833.Mar 3 2022, 1:55 PM

Addressing nit

This revision was landed with ongoing or failed builds.Mar 14 2022, 5:09 PM
This revision was automatically updated to reflect the committed changes.