Skip to content

Commit 6e59c45

Browse files
committed
cudnn prerelease_2:
Improvements over prerelease 1: [Feature] Added missing python bindings for several pointwise ops. [Feature] SDPA flash attention feature parity with the backend API. [Bug fixes] Shape inferencing fixes for dgrad, wgrad where the output dimension cannot be computed deterministically. Under investigation and development: - We are still working on additional features for SDPA back prop. - CPU overhead when using the python bindings are under investigation. - Better error messages and logging Miscelleanous updates to the v0.x API: [Bug fix] Some tests were failing on Ampere GPUs because no plans with 0 size were available. This has been fixed. [Bug fix] Median of three sampling was incorrectly sorting the results, when cudnnFind was used. This has been fixed. [Feature] Layer Norm API has been added. And can be used with the v0.x API. Note: This pre-release is experimental
1 parent 12f35fa commit 6e59c45

File tree

2,737 files changed

+32784
-287027
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,737 files changed

+32784
-287027
lines changed

.clang-format

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Google
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: true
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlinesLeft: true
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: false
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: All
18+
AlwaysBreakAfterReturnType: All
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: false
22+
BinPackParameters: false
23+
BraceWrapping:
24+
AfterClass: false
25+
AfterControlStatement: false
26+
AfterEnum: false
27+
AfterFunction: false
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: false
31+
AfterUnion: false
32+
BeforeCatch: false
33+
BeforeElse: false
34+
IndentBraces: false
35+
BreakBeforeBinaryOperators: None
36+
BreakBeforeBraces: Attach
37+
BreakBeforeTernaryOperators: true
38+
BreakConstructorInitializersBeforeComma: false
39+
ColumnLimit: 120
40+
CommentPragmas: '^ IWYU pragma:'
41+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
42+
ConstructorInitializerIndentWidth: 4
43+
ContinuationIndentWidth: 4
44+
Cpp11BracedListStyle: true
45+
DerivePointerAlignment: true
46+
DisableFormat: false
47+
ExperimentalAutoDetectBinPacking: false
48+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
49+
IncludeCategories:
50+
- Regex: '^<.*\.h>'
51+
Priority: 1
52+
- Regex: '^<.*'
53+
Priority: 2
54+
- Regex: '.*'
55+
Priority: 3
56+
IndentCaseLabels: true
57+
IndentWidth: 4
58+
IndentWrappedFunctionNames: false
59+
KeepEmptyLinesAtTheStartOfBlocks: false
60+
MacroBlockBegin: ''
61+
MacroBlockEnd: ''
62+
MaxEmptyLinesToKeep: 1
63+
NamespaceIndentation: None
64+
ObjCBlockIndentWidth: 2
65+
ObjCSpaceAfterProperty: false
66+
ObjCSpaceBeforeProtocolList: false
67+
PenaltyBreakBeforeFirstCallParameter: 1
68+
PenaltyBreakComment: 300
69+
PenaltyBreakFirstLessLess: 120
70+
PenaltyBreakString: 1000
71+
PenaltyExcessCharacter: 1000000
72+
PenaltyReturnTypeOnItsOwnLine: 200
73+
PointerAlignment: Left
74+
ReflowComments: true
75+
SortIncludes: false
76+
SpaceAfterCStyleCast: false
77+
SpaceBeforeAssignmentOperators: true
78+
SpaceBeforeParens: ControlStatements
79+
SpaceInEmptyParentheses: false
80+
SpacesBeforeTrailingComments: 2
81+
SpacesInAngles: false
82+
SpacesInContainerLiterals: true
83+
SpacesInCStyleCastParentheses: false
84+
SpacesInParentheses: false
85+
SpacesInSquareBrackets: false
86+
Standard: Auto
87+
TabWidth: 4
88+
UseTab: Never
89+
---
90+
Language: Json
91+
# Don't format .json files.
92+
DisableFormat: true
93+
...
94+

CMakeLists.txt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
cmake_minimum_required(VERSION 3.17)
22

3-
project(cudnn_frontend VERSION 0.9)
3+
project(cudnn_frontend VERSION 1.0.0)
44

55
option(CUDNN_FRONTEND_BUILD_SAMPLES "Defines if samples are built or not." ON)
6+
option(CUDNN_FRONTEND_BUILD_UNIT_TESTS "Defines if unittests are built or not." OFF)
7+
8+
if(MSVC OR MSYS OR MINGW)
9+
option(CUDNN_FRONTEND_BUILD_PYTHON_BINDINGS "Defines if python bindings are built or not." OFF)
10+
add_compile_options(/W4 /WX)
11+
else()
12+
option(CUDNN_FRONTEND_BUILD_PYTHON_BINDINGS "Defines if python bindings are built or not." ON)
13+
add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wno-error=attributes -Wno-attributes -Wno-error=unused-function -Wno-unused-function)
14+
endif()
615

716
add_library(cudnn_frontend INTERFACE)
817

@@ -12,8 +21,16 @@ target_include_directories(
1221
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
1322
)
1423

15-
target_compile_features(cudnn_frontend INTERFACE cxx_std_11)
24+
target_compile_features(cudnn_frontend INTERFACE cxx_std_17)
25+
26+
if (CUDNN_FRONTEND_BUILD_SAMPLES)
27+
add_subdirectory(samples)
28+
endif()
29+
30+
if (CUDNN_FRONTEND_BUILD_UNIT_TESTS)
31+
add_subdirectory(test)
32+
endif()
1633

17-
if (${CUDNN_FRONTEND_BUILD_SAMPLES})
18-
add_subdirectory(samples)
34+
if (CUDNN_FRONTEND_BUILD_PYTHON_BINDINGS)
35+
add_subdirectory(python_bindings)
1936
endif()

0 commit comments

Comments
 (0)