Specify hsa path relative to aiter lib*so compiled#1811
Open
Specify hsa path relative to aiter lib*so compiled#1811
Conversation
d4c8701 to
4a40109
Compare
Contributor
|
ah, ye ge? great to see you here. |
Contributor
|
I am updating aiter in PyTorch, and also need a way to avoid specifying env var AITER_ASM_DIR. made a proposal in #1862 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
MHA api refactoring brings AITER_ASM_DIR back which was removed before in #1597. This can bring back the issues in https://ontrack-internal.amd.com/browse/SWDEV-565755 for future TE + aiter mha backend
Technical Details
Add compile-time envs AITER_USE_AITER_ASM_DIR and AITER_REL_PATH_LIB_TO_HSA to search hsaco from a pre-agreed relative path from the compiled lib*.so. Therefore downstream libraries like TE/jax-aiter do not need to set AITER_ASM_DIR anymore.
AITER_USE_AITER_ASM_DIR: default value 1, which is the original flow which user still need to set the AITER_ASM_DIR env. If set to 0, the compilation goes the proposed flow
AITER_REL_PATH_LIB_TO_HSA: default value "./", which means that aiter lib*.so's (libmha_fwd/bwd.so) need to be under the same location with hsa dir
Test Plan
Testing aiter optest without specifying AITER_ASM_DIR
Test Result
Passed
Old flow not changed:
New flow works fine:
Submission Checklist