-
Notifications
You must be signed in to change notification settings - Fork 94
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
Modernize CMake setup for HIP #1334
Conversation
Do we push to have this in 1.6.0 ? |
@pratikvn No, I would aim for the next release |
Is it for NVIDIA device? We keep the CAS also for HIP on NVIDIA devices. does this pull request drop the hip support on NVIDIA devices? for |
that's only true if we compile on a node that has AMD GPUs, otherwise compilation fails. CMake has a standard way to specify the architecture flags that also provides CAS-like support for autodetection at configure time instead of compile-time.
yes, I think this is a step we should take because otherwise we will be carrying around a lot of complexity (build system and source code) we don't need because we already have a CUDA backend.
no, CMake's scoping rules (initialized with values from CACHE, overwritten locally per nested subdirectory) allow us to change the |
Good news on the hip-cuda front: https://gitlab.kitware.com/cmake/cmake/-/issues/25143 |
c9c200b
to
24a945a
Compare
This reverts commit c8ea7f4.
Co-authored-by: Yuhsiang M. Tsai <yhmtsai@gmail.com>
- fix incorrect CMake version requirement - remove explicit RPATH additions - clean up configure log Co-authored-by: Yuhsiang M. Tsai <yhmtsai@gmail.com> Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
The static builds involve changing the linker for HIP, which can't really be represented in pkg-config
@upsj I don't need static linking anymore, feel free to break this 😆 |
## Setup all CMAKE variables to find HIP and its dependencies | ||
set(GINKGO_HIP_MODULE_PATH "${HIP_PATH}/cmake") | ||
list(APPEND CMAKE_MODULE_PATH "${GINKGO_HIP_MODULE_PATH}") | ||
if (GINKGO_HIP_PLATFORM MATCHES "${HIP_PLATFORM_AMD_REGEX}") | ||
if (GINKGO_HIP_PLATFORM_AND) |
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.
There is a typo: AND
-> AMD
CMake has (or has gained) many features that we have our custom workarounds for, which I think we should remove soon
Some of these changes are more opinionated than others, so I'm happy to discuss them in more detail.
TODO: