feat: initial commit.
This commit is contained in:
65
.clangd
Normal file
65
.clangd
Normal file
@ -0,0 +1,65 @@
|
||||
# https://clangd.llvm.org/config
|
||||
|
||||
# Apply a config conditionally to all C files
|
||||
If:
|
||||
PathMatch: .*\.(c|h)$
|
||||
|
||||
---
|
||||
|
||||
# Apply a config conditionally to all C++ files
|
||||
If:
|
||||
PathMatch: .*\.(c|h)pp
|
||||
|
||||
---
|
||||
|
||||
# Apply a config conditionally to all CUDA files
|
||||
If:
|
||||
PathMatch: .*\.cuh?
|
||||
CompileFlags:
|
||||
Add:
|
||||
# Allow variadic CUDA functions
|
||||
- "-Xclang=-fcuda-allow-variadic-functions"
|
||||
|
||||
---
|
||||
|
||||
# Tweak the clangd parse settings for all files
|
||||
CompileFlags:
|
||||
CompilationDatabase: .
|
||||
Add:
|
||||
- -x
|
||||
- cuda
|
||||
# report all errors
|
||||
- "-std=c++17"
|
||||
- "-ferror-limit=0"
|
||||
- "-ftemplate-backtrace-limit=0"
|
||||
- "-I/usr/local/lib/python3.10/dist-packages/torch/include"
|
||||
- "-I/usr/local/lib/python3.10/dist-packages/torch/include/torch/csrc/api/include"
|
||||
- "-DGLOG_USE_GLOG_EXPORT"
|
||||
Remove:
|
||||
- -stdpar
|
||||
# strip CUDA fatbin args
|
||||
- "-Xfatbin*"
|
||||
- "-Xcompiler*"
|
||||
- "-Xcudafe*"
|
||||
- "-rdc=*"
|
||||
- "-gpu=*"
|
||||
- "--diag_suppress*"
|
||||
# strip CUDA arch flags
|
||||
- "-gencode*"
|
||||
- "--generate-code*"
|
||||
# strip gcc's -fcoroutines
|
||||
- -fcoroutines
|
||||
# strip CUDA flags unknown to clang
|
||||
- "-ccbin*"
|
||||
- "--compiler-options*"
|
||||
- "--expt-extended-lambda"
|
||||
- "--expt-relaxed-constexpr"
|
||||
- "-forward-unknown-to-host-compiler"
|
||||
- "-Werror=cross-execution-space-call"
|
||||
Diagnostics:
|
||||
Suppress:
|
||||
- "variadic_device_fn"
|
||||
- "attributes_not_allowed"
|
||||
# The NVHPC version of _NVCXX_EXPAND_PACK macro triggers this clang error.
|
||||
# Temporarily suppressing it, but should probably fix
|
||||
- "template_param_shadow"
|
Reference in New Issue
Block a user