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

documenting fix for clang error: reference to host function from device #97

Open
dokipen3d opened this issue Feb 19, 2021 · 1 comment

Comments

@dokipen3d
Copy link
Contributor

Here is what happens if you use clang 10 (see my other issues for how to get that working)....

coriander/soft/llvm-10.0.0/lib/clang/10.0.0/include/cuda_wrappers/new:57:7: error: reference to
      __host__ function 'free' in __device__ function
    ::free(ptr);
      ^

The fix seems to be to

  1. update the __clang_cuda_runtime_wrapper.h file with the extern C definitions for new and delete which reference ::malloc and ::free. then...
  2. include fake_funcs.h in cocl ABOVE the header which pulls in clangs new cuda wrapper prematurely.

Hopefully soon I'll get round to doing some PRs for these to get us all to be able to use clang 10. I'll make a separate issue for clang 11 as that requires some updates cocl as there are some clang API breakages.

@vidalperezbohoyo
Copy link

vidalperezbohoyo commented Aug 28, 2021

Sorry im noob. I dont know how to do that. Please can you explain step by step how to that? Thanks
I have clang 8 i think

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