char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Bowen Hanfix: apply clang-format to CUDA macros (#16017)f1fbffb5c

char/aliceai-t5-moe
4.8 KiB171 linesraw
1---
2Language:        Cpp
3AlignAfterOpenBracket: Align
4AlignArrayOfStructures: Left
5AlignConsecutiveAssignments: AcrossComments
6AlignConsecutiveBitFields: AcrossComments
7AlignConsecutiveDeclarations: AcrossComments
8AlignConsecutiveMacros: AcrossComments
9# AlignConsecutiveShortCaseStatements: AcrossComments
10AlignEscapedNewlines: Left # LeftWithLastLine
11AlignOperands:   Align
12AlignTrailingComments:
13  Kind: Always
14  OverEmptyLines: 1
15AllowAllArgumentsOnNextLine: true
16AllowAllParametersOfDeclarationOnNextLine: false
17# AllowBreakBeforeNoexceptSpecifier: OnlyWithParen
18AllowShortBlocksOnASingleLine: Never
19AllowShortCaseLabelsOnASingleLine: false
20AllowShortFunctionsOnASingleLine: Inline
21AllowShortIfStatementsOnASingleLine: Never
22AllowShortLambdasOnASingleLine: Inline
23AllowShortLoopsOnASingleLine: false
24AlwaysBreakBeforeMultilineStrings: true
25# Treat CUDA keywords/attributes as "attribute macros" and avoid breaking lines inside them
26AttributeMacros:
27  - __host__
28  - __device__
29  - __global__
30  - __forceinline__
31  - __launch_bounds__
32BinPackArguments: true
33BinPackParameters: false # OnePerLine
34BitFieldColonSpacing: Both
35BreakBeforeBraces: Custom # Attach
36BraceWrapping:
37  AfterCaseLabel:  true
38  AfterClass:      false
39  AfterControlStatement: false
40  AfterEnum:       false
41  AfterFunction:   false
42  AfterNamespace:  false
43  AfterObjCDeclaration: false
44  AfterStruct:     false
45  AfterUnion:      false
46  AfterExternBlock: false
47  BeforeCatch:     false
48  BeforeElse:      false
49  BeforeLambdaBody: false
50  BeforeWhile: false
51  IndentBraces:    false
52  SplitEmptyFunction: false
53  SplitEmptyRecord: false
54  SplitEmptyNamespace: false
55# BreakAdjacentStringLiterals: true
56BreakAfterAttributes: Never
57BreakBeforeBinaryOperators: None
58BreakBeforeInlineASMColon: OnlyMultiline
59BreakBeforeTernaryOperators: false
60# BreakBinaryOperations: Never
61BreakConstructorInitializers: AfterColon
62# BreakFunctionDefinitionParameters: false
63BreakInheritanceList: AfterComma
64BreakStringLiterals: true
65# BreakTemplateDeclarations: Yes
66ColumnLimit:     120
67CommentPragmas:  '^ IWYU pragma:'
68CompactNamespaces: false
69ConstructorInitializerIndentWidth: 4
70ContinuationIndentWidth: 4
71Cpp11BracedListStyle: false
72DerivePointerAlignment: false
73DisableFormat:   false
74EmptyLineBeforeAccessModifier: Leave
75EmptyLineAfterAccessModifier: Never
76ExperimentalAutoDetectBinPacking: false
77FixNamespaceComments: true
78IncludeBlocks:   Regroup
79IncludeCategories:
80  - Regex:           '".*"'
81    Priority:        1
82    SortPriority:    0
83  - Regex:           '^<.*\.h>'
84    Priority:        2
85    SortPriority:    0
86  - Regex:           '^<.*'
87    Priority:        3
88    SortPriority:    0
89  - Regex:           '.*'
90    Priority:        4
91    SortPriority:    0
92IncludeIsMainRegex: '([-_](test|unittest))?$'
93IncludeIsMainSourceRegex: ''
94IndentAccessModifiers: false
95IndentCaseBlocks: true
96IndentCaseLabels: true
97IndentExternBlock: NoIndent
98IndentGotoLabels: false
99IndentPPDirectives: AfterHash
100IndentWidth:     4
101IndentWrappedFunctionNames: false
102InsertBraces:    true # NOTE: may lead to incorrect formatting
103InsertNewlineAtEOF: true
104JavaScriptQuotes: Leave
105JavaScriptWrapImports: true
106KeepEmptyLinesAtTheStartOfBlocks: false
107LambdaBodyIndentation: Signature
108LineEnding: LF
109MacroBlockBegin: ''
110MacroBlockEnd:   ''
111MaxEmptyLinesToKeep: 1
112NamespaceIndentation: None
113ObjCBinPackProtocolList: Auto
114ObjCBlockIndentWidth: 4
115ObjCSpaceAfterProperty: true
116ObjCSpaceBeforeProtocolList: true
117PPIndentWidth: -1
118PackConstructorInitializers: CurrentLine
119PenaltyBreakAssignment: 2
120PenaltyBreakBeforeFirstCallParameter: 1
121PenaltyBreakComment: 300
122PenaltyBreakFirstLessLess: 120
123PenaltyBreakString: 1000
124PenaltyBreakTemplateDeclaration: 10
125PenaltyExcessCharacter: 1000000
126PenaltyReturnTypeOnItsOwnLine: 200
127PointerAlignment: Middle
128QualifierAlignment: Left
129#QualifierOrder: ['static', 'inline', 'friend', 'constexpr', 'const', 'volatile', 'type', 'restrict']
130RawStringFormats:
131  - Language:        Cpp
132    Delimiters:
133      - cc
134      - CC
135      - cpp
136      - Cpp
137      - CPP
138      - 'c++'
139      - 'C++'
140    CanonicalDelimiter: ''
141ReferenceAlignment: Middle
142ReflowComments:  false # IndentOnly
143SeparateDefinitionBlocks: Always
144SortIncludes:    CaseInsensitive
145SortUsingDeclarations: LexicographicNumeric
146SpaceAfterCStyleCast: true
147SpaceAfterLogicalNot: false
148SpaceAfterTemplateKeyword: true
149SpaceBeforeAssignmentOperators: true
150SpaceBeforeCpp11BracedList: false
151SpaceBeforeCtorInitializerColon: true
152SpaceBeforeInheritanceColon: true
153SpaceBeforeParens: ControlStatements
154SpaceBeforeRangeBasedForLoopColon: true
155SpaceInEmptyBlock: false
156SpaceInEmptyParentheses: false
157SpacesBeforeTrailingComments: 2
158SpacesInAngles:  Never
159SpacesInContainerLiterals: true
160SpacesInLineCommentPrefix:
161  Minimum: 1
162  Maximum: -1
163SpacesInParentheses: false
164SpacesInSquareBrackets: false
165SpaceBeforeSquareBrackets: false
166Standard:        c++17
167TabWidth:        4
168UseTab:          Never
169WhitespaceSensitiveMacros: ['STRINGIZE']
170...
171