fix: apply clang-format to CUDA macros (#16017)
clang-format previously broke long CUDA macros (e.g. __launch_bounds__) into
unreadable line breaks inside template declarations, such as:
template<int D, int ncols, int nwarps, int VKQ_stride,
typename KQ_acc_t, bool use_logit_softcap>
__launch_bounds__(nwarps*ggml_cuda_get_physical_warp_size(), 1)
This change adjusts formatting rules so that CUDA macros remain consistent
and aligned with the surrounding template syntax.
This commit is contained in:
parent
51abc96bdc
commit
f1fbffb5c0
|
|
@ -22,6 +22,13 @@ AllowShortIfStatementsOnASingleLine: Never
|
||||||
AllowShortLambdasOnASingleLine: Inline
|
AllowShortLambdasOnASingleLine: Inline
|
||||||
AllowShortLoopsOnASingleLine: false
|
AllowShortLoopsOnASingleLine: false
|
||||||
AlwaysBreakBeforeMultilineStrings: true
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
|
# Treat CUDA keywords/attributes as "attribute macros" and avoid breaking lines inside them
|
||||||
|
AttributeMacros:
|
||||||
|
- __host__
|
||||||
|
- __device__
|
||||||
|
- __global__
|
||||||
|
- __forceinline__
|
||||||
|
- __launch_bounds__
|
||||||
BinPackArguments: true
|
BinPackArguments: true
|
||||||
BinPackParameters: false # OnePerLine
|
BinPackParameters: false # OnePerLine
|
||||||
BitFieldColonSpacing: Both
|
BitFieldColonSpacing: Both
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue