Skip to content

[Comgr] Add lit test for unbundling compressed amdgcnspirv bundles#2545

Open
lamb-j wants to merge 1 commit into
amd-stagingfrom
comgr/spirv-unbundle-compressed-test
Open

[Comgr] Add lit test for unbundling compressed amdgcnspirv bundles#2545
lamb-j wants to merge 1 commit into
amd-stagingfrom
comgr/spirv-unbundle-compressed-test

Conversation

@lamb-j
Copy link
Copy Markdown
Collaborator

@lamb-j lamb-j commented May 14, 2026

Summary

Existing amd/comgr/test-lit/unbundle.hip covers --offload-compress for AMDGCN archs (gfx900, gfx1030) but no test exercises the compressed + amdgcnspirv combination. This PR adds a spirv-tests/ lit test that:

  • builds a compressed bitcode bundle for amdgcnspirv,
  • sanity-checks the CCOB magic and the bundle entry ID (hip-spirv64-amd-amdhsa--amdgcnspirv),
  • extracts the entry through Comgr's AMD_COMGR_ACTION_UNBUNDLE,
  • verifies the SPIR-V magic word (0x07230203) of the unbundled payload, and
  • translates it back to LLVM IR via spirv-translator and FileChecks the original device function is present.

Gated on comgr-has-spirv-translator, matching the rest of spirv-tests/.

Existing unbundle.hip covers --offload-compress for AMDGCN archs
(gfx900, gfx1030) but no test exercises the compressed + amdgcnspirv
combination. Add a spirv-tests/ test that:

- builds a compressed bitcode bundle for amdgcnspirv,
- sanity-checks the CCOB magic and the bundle entry ID,
- extracts the amdgcnspirv entry through Comgr's unbundle action,
- verifies the SPIR-V magic of the unbundled payload, and
- translates it back to LLVM IR via spirv-translator and FileChecks
  the original device function is present.
@lamb-j lamb-j requested a review from chinmaydd as a code owner May 14, 2026 20:00
Copy link
Copy Markdown

@chinmaydd chinmaydd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, narrowly scoped test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants