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

abi::__cxa_demangle #153

Open
nickjbrowning opened this issue Oct 15, 2024 · 4 comments
Open

abi::__cxa_demangle #153

nickjbrowning opened this issue Oct 15, 2024 · 4 comments

Comments

@nickjbrowning
Copy link
Collaborator

nickjbrowning commented Oct 15, 2024

OK, could we just remove the depencency on the GCC-specific abi::__cxa_demangle? And use the mangled type here instead?

Originally posted by @Luthaf in #131 (comment)

@nickjbrowning nickjbrowning changed the title OK, could we just remove the depencency on the GCC-specific abi::__cxa_demangle? And use the mangled type here instead? abi::__cxa_demangle Oct 15, 2024
@nickjbrowning
Copy link
Collaborator Author

nickjbrowning commented Oct 15, 2024

We need the unmangled types to construct e.g my_kernel<float> or my_kernel<double, int>. See here:

std::string kernel_name = getKernelName<scalar_t>("spherical_harmonics_kernel");

Do you have a better idea of doing this? The way I'm doing it is exactly the same way that NVRTC does it in their backend API...

@Luthaf
Copy link
Contributor

Luthaf commented Oct 16, 2024

Hmm, alright. Then it would be nice to move this code into a demangle_symbol function, with the appropriate #ifdef (like for dlopen & co). In the current state, I am a bit worried that we are making it a lot harder to get a windows build down the line.

@nickjbrowning
Copy link
Collaborator Author

windows has an equivalent function thats very similar so not too concerning. We can create a wrapper and ifdef the calls no problem.

@Luthaf
Copy link
Contributor

Luthaf commented Oct 17, 2024

I saw that the calls are already in an ifdef, so this should be doable later down the line. I would still create a wrapper to handle platform differences, but this should be good for now!

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

2 participants