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

Realm: Duplicate registration of function _ZN3cub11EmptyKernelIvEEvv #1583

Open
Tracked by #1032
mariodirenzo opened this issue Nov 2, 2023 · 5 comments
Open
Tracked by #1032

Comments

@mariodirenzo
Copy link

After including cub/cub.cuh in most of the translation units of HTR I started getting multiple copies of this warning message at the startup of the solver.
Is this expected? Is there anything I can do to silence these error messages?

@elliottslaughter, can you please add this issue to #1032 with low priority?

@seemamirch
Copy link
Contributor

This doesn't reproduce on sapling with legion (commit 3b3e14b)

@seemamirch
Copy link
Contributor

This is occurring due to template instantiation.
The template function is defined in util_device.cuh as
template <typename T> __global__ void EmptyKernel(void) { }

and then instantiated in the same file
typedef void (*EmptyKernelPtr)(); EmptyKernelPtr empty_kernel = EmptyKernel<void>;

cub/cub.cuh includes util_device.cuh

If cub/cub.cuh is included in multiple files - we get the warning i.e.
[0 - 7fa23f7bbc40] 0.000000 {4}{gpu}: duplicate registration of function _ZN3cub11EmptyKernelIvEEvv
i.e.
https://gitlab.com/StanfordLegion/legion/-/blob/master/runtime/realm/cuda/cuda_module.cc?ref_type=heads#L2851

The symbol is marked as 'weak' and gets resolved by the linker.
Should this warning be removed? If a function has multiple definitions (not weak symbols) then the linker does give an error.

@lightsighter
Copy link
Contributor

Does this only happen with the hijack on?

@seemamirch
Copy link
Contributor

Does this only happen with the hijack on?

Yes only with hijack on

@lightsighter
Copy link
Contributor

Since we're planning on removing the hijack (#1730) I think it's probably not worth removing the warning as it will go away automatically.

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

No branches or pull requests

3 participants