-
Notifications
You must be signed in to change notification settings - Fork 151
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
base: develop
Are you sure you want to change the base?
Conversation
Once documentation and tests are added, I will remove from draft. |
|
||
extObj = ".o" | ||
extCo = ".co" | ||
extCoRaw = ".co.raw" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the meaning of raw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, ".raw" is an extension used to identify the co file after linking but before compression. Files with this extension live in the build_tmp/ directory and are the input for the compression via bundling step.
bundler, | ||
"--compress", | ||
"--type=o", | ||
"--bundle-align=4096", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did we get 4096 and should it be fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter was recommended to me by the compiler team. @yxsamliu how does this parameter affect the output? Is it needed in this case?
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:
getAssemblyCodeObjectFiles
has been renamed tobuildAssemblyCodeObjectFiles
to match the name of source kernel functions.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 hipBLASLt bench