Joseph Huber 228c8f9cc0 [ObjectYAML] Add offloading binary implementations for obj2yaml and yaml2obj
This patchs adds the necessary code for inspecting or creating offloading
binaries using the standing `obj2yaml` and `yaml2obj` features in LLVM.

Depends on D127774

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D127776
2022-07-01 21:13:18 -04:00

26 lines
802 B
YAML

# RUN: yaml2obj %s | obj2yaml | FileCheck %s
!Offload
Members:
- ImageKind: IMG_Cubin
OffloadKind: OFK_OpenMP
Flags: 0
String:
- Key: "triple"
Value: "nvptx64-nvidia-cuda"
- Key: "arch"
Value: "sm_70"
Content: "deadbeef"
# CHECK: --- !Offload
# CHECK-NEXT: Members:
# CHECK-NEXT: - ImageKind: IMG_Cubin
# CHECK-NEXT: OffloadKind: OFK_OpenMP
# CHECK-NEXT: Flags: 0
# CHECK-NEXT: String:
# CHECK-NEXT: - Key: triple
# CHECK-NEXT: Value: nvptx64-nvidia-cuda
# CHECK-NEXT: - Key: arch
# CHECK-NEXT: Value: sm_70
# CHECK-NEXT: Content: DEADBEEF
# CHECK-NEXT: ...