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

introduce option()s for backends to easily disable them #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hugobros3
Copy link
Contributor

I've been doing this by hand (editing CMakeLists.txt) for years, but I think we need a proper way to do this: disable backends at will, easily. For various reasons (LLVM linking conflicts, old broken installations for some dependency, buggy backend, ...) this is often required and thus needs to be facilitated.

This arguably also addresses the motivation for #51 by only attempting to find_package if a given backend is enabled.

Currently this defaults to try to enable all backends, before looking for their dependencies.

Alternatively we could:

  • Fail if a dependency is not meant but the backend is enabled
  • Do find_package first and remove the option if the dependencies aren't met
  • Forcefully disable backends when depdencies aren't met (with set(... FORCE))

@Hugobros3 Hugobros3 requested review from richardmembarth, PearCoding and stlemme and removed request for richardmembarth, PearCoding and stlemme July 23, 2024 09:31
target_link_libraries(runtime_pal PRIVATE runtime_base pal::pal)
list(APPEND RUNTIME_PLATFORMS runtime_pal)
option(AnyDSL_Runtime_ENABLE_PAL "Support for running kernels through AMD's PAL interface" ON)
if(AnyDSL_Runtime_ENABLE_PAL)
Copy link
Contributor

Choose a reason for hiding this comment

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

wrong indentation ;)

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