I think the symbol for syncthreads is missing. Therefore, I've added this into the clang_cuda_device_functions.h.
This also solve an issue on GitHub opened about half a year ago.
Ref: https://github.com/clangd/clangd/issues/404
Paths
| Differential D96102
[clangd] Fix missing __syncthreads. AbandonedPublic Authored by oToToT on Feb 4 2021, 9:05 PM.
Details Summary I think the symbol for syncthreads is missing. Therefore, I've added this into the clang_cuda_device_functions.h. This also solve an issue on GitHub opened about half a year ago.
Diff Detail
Unit TestsFailed Event TimelineHerald added subscribers: usaxena95, kadircet, arphaman. · View Herald TranscriptFeb 4 2021, 9:05 PM Comment Actions I doubt this compiles: https://godbolt.org/z/c51v5d even with adjusted type, this fails because __syncthreads is a builtin (right now): https://godbolt.org/z/jP7e6h (and __nvvm_bar_sync requires an argument). Comment Actions OK, I've found what's wrong with my fix here. I should check for the clangd compile mechanism with more detail to fix this problem. Sorry for disturbance. Comment Actions
No worries. I'm not sure how clangd handles builtins, but I guess that is a general thing it should as this is not the only one people might want to use :)
Revision Contents
Diff 321649 clang/lib/Headers/__clang_cuda_device_functions.h
|
clang-tidy: error: This file is intended to be used with CUDA-9+ only. [clang-diagnostic-error]
not useful