Repository navigation
Adding IREE_EXTERNAL_HAL_DRIVERS cmake var. - #9380
Merged
Merged
Conversation
Collaborator
Author
|
/cc @powderluv I think this gives you what you want 🤞 |
This allows for out-of-tree drivers by specifying the static library target and registration function, ala LLVM_EXTERNAL_PROJECTS. To test this the ROCM driver has been moved to an external driver and can be enabled with -DIREE_EXTERNAL_HAL_DRIVERS=rocm during cmake config. With some bazel work we'd be able to make the internal drivers work this way too and remove a lot of boilerplate. For now the existing options are preserved.
benvanik
force-pushed
the
benvanik-external-hal-drivers
branch
from
June 8, 2022 00:26
f4eca54 to
4e6af05
Compare
benvanik
marked this pull request as ready for review
June 8, 2022 00:26
benvanik
requested review from
GMNGeoffrey,
ThomasRaoux and
stellaraccident
as code owners
June 8, 2022 00:26
benvanik
enabled auto-merge
June 8, 2022 04:35
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.
This allows for out-of-tree drivers by specifying the static library
target and registration function, ala LLVM_EXTERNAL_PROJECTS.
To test this the ROCM driver has been moved to an external driver and can
be enabled with
-DIREE_EXTERNAL_HAL_DRIVERS=rocmduring cmake config.Note that now there's no need to change any IREE files to add a driver; the
targets can be defined before IREE is added as a subproject or will be included
via vars to allow for specifying the driver purely via cmake flags.
With some bazel work we'd be able to make the internal drivers work this
way too and remove a lot of boilerplate. For now the existing options are
preserved.
Fixes #9336.