Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code object compression via bundling #2054

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

bstefanuk
Copy link
Contributor

@bstefanuk bstefanuk commented Nov 21, 2024

Summary:

This PR adds a compression layer to all final code objects, thereby generating smaller libraries at the expense of build time. Includes minor refactoring.

Outcomes:

  • A new clang-offload-bundler invocation is added after assembly object linking.
  • getAssemblyCodeObjectFiles has been renamed to buildAssemblyCodeObjectFiles to match the name of source kernel functions.
Build Time Size
Feature, gfx900 1m36.450s 29M
Develop, gfx900 1m29.974s 76M
Feature, gfx90a   435M
Develop, gfx90a 7m24.915s 1.6G

Compression ratio for gfx900: 2.66
Compression ratio for gfx90a: 3.74

Testing and Environment:

Docker: Ubuntu 24.04, ROCm 6.4 RC stack, AMD clang version 18.0.0, AMD clang-offload-bundler version 18.0.0

Tested with rocBLAS test client

@bstefanuk bstefanuk marked this pull request as ready for review November 21, 2024 20:33
@bstefanuk bstefanuk self-assigned this Nov 21, 2024
@bstefanuk bstefanuk marked this pull request as draft November 21, 2024 20:35
@bstefanuk bstefanuk marked this pull request as ready for review November 26, 2024 16:51
Copy link
Contributor

@TorreZuk TorreZuk left a comment

Choose a reason for hiding this comment

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

LGTM if rocblas Tensile tests all pass.

Tensile/BuildCommands/SharedCommands.py Show resolved Hide resolved
Tensile/BuildCommands/SourceCommands.py Show resolved Hide resolved
fix: lint error 1

feat: add hsaco compression

fix: remove unused and debug code

refactor: move build commands to module
chore: type-hints, doc-comments and errors

fix: static tox errors

chore: type-hints, doc-comments and errors

fix: static tox errors

fix: static tox errors

fix: missing param in benchmark client

fix: delete irrelevant files

fix: don't compress source kernels

fix: tox static errors

fix: tox errors 2

fix: bad exception creating co filenames
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.

3 participants