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

GPU: Provide general GPUChkErr functionality also externally and several unrelated changes #14062

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

davidrohr
Copy link
Collaborator

@mconcas : Sorry this took so long :(.
This adds a GPUCommonChkErr.h header, providing my GPUChkErr macros.
Currently, they must be used upon a GPUReconstruction object.
The reason is that I need to dispatch to the backend to get the errorcodes, so I could not easily make it static.

Would this work for you?

I could probably create a static version, which would automatically detect which GPUReconstruction class is created first, and attach to that, and then dispatch to that.
That should in principle cover all use cases, except for if someone would use multiple backends in the same application, which is in principle supported.

Copy link
Contributor

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

@alibuild
Copy link
Collaborator

Error while checking build/O2/fullCI_slc9 for 061b880 at 2025-03-14 09:52:

## sw/BUILD/O2-latest/log
ld.lld: error: undefined symbol: o2::gpu::GPUReconstructionHIPBackend::GPUChkErrStatic(long, char const*, int)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Full log here.

@davidrohr davidrohr changed the title GPU: Provide general GPUChkErr functionality also externally [WIP] GPU: Provide general GPUChkErr functionality also externally Mar 14, 2025
@davidrohr davidrohr changed the title [WIP] GPU: Provide general GPUChkErr functionality also externally GPU: Provide general GPUChkErr functionality also externally and several unrelated changes Mar 14, 2025
// Please #include "GPUReconstruction.h" in your code, if you use these 2!
#define GPUChkErr(x) GPUChkErrA(x, __FILE__, __LINE__, true)
#define GPUChkErrI(x) GPUChkErrA(x, __FILE__, __LINE__, false)
#define GPUChkErrS(x) o2::gpu::internal::GPUReconstructionChkErr(x, __FILE__, __LINE__, true)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mconcas : You should be able to use GPUChkErrS and GPUChkErrSI statically, if you link against the external provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants