Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVIEW] migrating cumlHandle_impl (and related dependencies) into raft #3

Merged
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ac5ed0f
FEA initial migration of device and host buffers into raft
teju85 Apr 28, 2020
2f81d83
FEA added cudaruntime utils which will be used in raft repo
teju85 Apr 28, 2020
92aed07
FEA added allocator interface
teju85 Apr 28, 2020
dea9676
DOC doxygen updates
teju85 Apr 28, 2020
1921918
FEA added raft::handle_t
teju85 Apr 28, 2020
5770850
FEA added cusolver/cublas/cusparse wrappers and updated raft/handle.hpp
teju85 Apr 28, 2020
92daf4d
FIX updated project name in cmake file
teju85 Apr 28, 2020
c93afda
ENH added googletest build for unit-testing
teju85 Apr 28, 2020
0d369d2
ENH added proper include-dirs and link libraries for the unit-test to…
teju85 Apr 28, 2020
81d5a70
ENH initial commit for cudart_utils unit-tests
teju85 Apr 28, 2020
731b238
Merge branch 'branch-0.14' of https://github.com/rapidsai/raft into f…
teju85 May 4, 2020
7039a55
FIX enabled ABI to make gtests running again
teju85 May 4, 2020
b398243
FIX updated allocator header include in device buffer
teju85 May 5, 2020
64377cb
TEST added unit-tests for device_buffer
teju85 May 5, 2020
2946799
FIX updated allocator header include in host buffer
teju85 May 5, 2020
b058aca
TEST added unit-tests for host_buffer
teju85 May 5, 2020
48390f6
FIX handle/cublas/cusolver header compilation issues
teju85 May 5, 2020
ed543ce
TEST added unit-tests for handle_t
teju85 May 5, 2020
db38255
CI updated style.sh with the latest checks
teju85 May 5, 2020
a07b3af
FIX ignore commented lines in include_checker
teju85 May 5, 2020
6aecf50
ENH added .clang-format file
teju85 May 5, 2020
46949e8
FIX clang-format fixes
teju85 May 5, 2020
f8b9b4c
DOC update changelog
teju85 May 5, 2020
bfa5218
ENH added .clang-tidy. Courtesy: xgboost
teju85 May 6, 2020
30d47d7
FEA added clang tidy checker script from cuml
teju85 May 6, 2020
8e49e38
ENH updated cmakelists to always dump compilation database for clang-…
teju85 May 6, 2020
b094809
BUG updated ignore arg to clang tidy script
teju85 May 6, 2020
3203035
DOC added a note about RAII in the Allocator class doxygen comments
teju85 May 6, 2020
1242497
FIX keep the C-style string for THROW macro, as using std::array insi…
teju85 May 7, 2020
a285885
FIX clang-tidy fixes for cudart_utils.h
teju85 May 7, 2020
03fc6ed
FIX use pass-by-value + std::move in ctor
teju85 May 7, 2020
2884c2d
FIX clang tidy fixes for allocator.hpp
teju85 May 7, 2020
eab2c5e
FIX compilation issue with cudart_utils.cpp
teju85 May 7, 2020
05c6b3e
FIX clang tidy fixes for allocator and buffer classes
teju85 May 7, 2020
fa1af0d
FIX clang tidy fixes for cublas wrappers
teju85 May 7, 2020
1acc966
FIX clang tidy fixes for cusolver wrappers
teju85 May 7, 2020
235eac6
FIX clang-format fixes
teju85 May 7, 2020
e670c3a
FIX clang tidy fixes for cusparse wrappers
teju85 May 7, 2020
619b5c5
FIX clang-tidy errors for handle_t
teju85 May 7, 2020
5eba7be
FIX clang-format fixes
teju85 May 7, 2020
ad5db0f
DOC dropped documentation url for clang-format/clang-tidy options
teju85 May 7, 2020
deb02e6
ENH added check for local variable naming as well
teju85 May 11, 2020
1acb2b6
ENH added check for constexpr variable as well
teju85 May 11, 2020
6126ab6
FIX all clang-tidy fixes
teju85 May 11, 2020
ef9d0c2
ENH added more explicit identifier-naming checks
teju85 May 11, 2020
873a51f
ENH added warp_size constexpr method
teju85 May 11, 2020
73b75f5
FIX reduced code duplication in create_resources
teju85 May 11, 2020
93c1a98
FIX apply critical section on various "get handle" methods
teju85 May 11, 2020
4a55d57
ENH updated build to find rmm installation from conda-env
teju85 May 11, 2020
0ac33c7
ENH made default allocator to use RMM
teju85 May 11, 2020
90c139a
ENH moved all allocator and buffer logic under appropriate folders/na…
teju85 May 11, 2020
e09393f
ENH updated tests and other interfaces to the new mr design
teju85 May 11, 2020
7a5b15f
allow users to call buffer operations without an explicit stream para…
teju85 May 11, 2020
58c490c
ENH added support for constructing host buffer from device buffer
teju85 May 11, 2020
2fb8f74
FIX clang-format fixes
teju85 May 11, 2020
e47a7a0
Merge branch 'branch-0.14' of https://github.com/rapidsai/raft into f…
teju85 May 12, 2020
eb4db02
CI enabled googletest
teju85 May 12, 2020
4b0619e
FIX use RAII-style lock_guard
teju85 May 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

## New Features
- Initial RAFT version
- PR #3: defining raft::handle_t, device_buffer, host_buffer, allocator classes

## Improvements

Expand Down
11 changes: 2 additions & 9 deletions ci/checks/style.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright (c) 2020, NVIDIA CORPORATION.
#####################
# cuML Style Tester #
# RAFT Style Tester #
#####################

# Ignore errors and set path
Expand Down Expand Up @@ -41,15 +41,9 @@ else
fi

# Check for a consistent #include syntax
# TODO: keep adding more dirs as and when we update the syntax
HASH_INCLUDE=`python cpp/scripts/include_checker.py \
cpp/bench \
cpp/comms/mpi/include \
cpp/comms/mpi/src \
cpp/comms/std/include \
cpp/comms/std/src \
cpp/include \
cpp/examples \
cpp/test \
2>&1`
HASH_RETVAL=$?
if [ "$RETVAL" = "0" ]; then
Expand All @@ -66,7 +60,6 @@ else
fi

# Check for a consistent code format
# TODO: keep adding more dirs when we add more source folders in cuml
FORMAT=`python cpp/scripts/run-clang-format.py 2>&1`
FORMAT_RETVAL=$?
if [ "$RETVAL" = "0" ]; then
Expand Down
157 changes: 157 additions & 0 deletions cpp/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
# Refer to the following link for the explanation of each params:
# http://releases.llvm.org/8.0.1/tools/clang/docs/ClangFormatStyleOptions.html
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
# This is deprecated
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
# disabling the below splits, else, they'll just add to the vertical length of source files!
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
# Kept the below 2 to be the same as `IndentWidth` to keep everything uniform
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
CanonicalDelimiter: ''
BasedOnStyle: google
# Enabling comment reflow causes doxygen comments to be messed up in their formats!
ReflowComments: false
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# We are C++14, but clang-format puts this under `Cpp11` itself
Standard: Cpp11
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
# Be consistent with indent-width, even for people who use tab for indentation!
TabWidth: 2
UseTab: Never
...
170 changes: 170 additions & 0 deletions cpp/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
# Refer to the following link for the explanation of each params:
# https://releases.llvm.org/8.0.1/tools/clang/tools/extra/docs/clang-tidy/checks/list.html
Checks: 'clang-diagnostic-*,clang-analyzer-*,modernize-*,-modernize-make-*,-modernize-raw-string-literal,google-*,-google-default-arguments,-clang-diagnostic-#pragma-messages,readability-identifier-naming,-*,modernize-*,-modernize-make-*,-modernize-raw-string-literal,google-*,-google-default-arguments,-clang-diagnostic-#pragma-messages,readability-identifier-naming'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle: none
User: snanditale
CheckOptions:
- key: google-build-namespaces.HeaderFileExtensions
value: ',h,hh,hpp,hxx'
- key: google-global-names-in-headers.HeaderFileExtensions
value: ',h,hh,hpp,hxx'
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.BranchThreshold
value: '4294967295'
- key: google-readability-function-size.LineThreshold
value: '4294967295'
- key: google-readability-function-size.NestingThreshold
value: '4294967295'
- key: google-readability-function-size.ParameterThreshold
value: '4294967295'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-readability-function-size.VariableThreshold
value: '4294967295'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
- key: google-runtime-int.SignedTypePrefix
value: int
- key: google-runtime-int.TypeSuffix
value: ''
- key: google-runtime-int.UnsignedTypePrefix
value: uint
- key: google-runtime-references.WhiteListTypes
value: ''
- key: modernize-loop-convert.MaxCopySize
value: '16'
- key: modernize-loop-convert.MinConfidence
value: reasonable
- key: modernize-loop-convert.NamingStyle
value: CamelCase
- key: modernize-pass-by-value.IncludeStyle
value: llvm
- key: modernize-pass-by-value.ValuesOnly
value: '0'
- key: modernize-replace-auto-ptr.IncludeStyle
value: llvm
- key: modernize-replace-random-shuffle.IncludeStyle
value: llvm
- key: modernize-use-auto.MinTypeNameLength
value: '5'
- key: modernize-use-auto.RemoveStars
value: '0'
- key: modernize-use-default-member-init.IgnoreMacros
value: '1'
- key: modernize-use-default-member-init.UseAssignment
value: '0'
- key: modernize-use-emplace.ContainersWithPushBack
value: '::std::vector;::std::list;::std::deque'
- key: modernize-use-emplace.SmartPointers
value: '::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr'
- key: modernize-use-emplace.TupleMakeFunctions
value: '::std::make_pair;::std::make_tuple'
- key: modernize-use-emplace.TupleTypes
value: '::std::pair;::std::tuple'
- key: modernize-use-equals-default.IgnoreMacros
value: '1'
- key: modernize-use-noexcept.ReplacementString
value: ''
- key: modernize-use-noexcept.UseNoexceptFalse
value: '1'
- key: modernize-use-nullptr.NullMacros
value: 'NULL'
- key: modernize-use-transparent-functors.SafeMode
value: '0'
- key: modernize-use-using.IgnoreMacros
value: '1'
- key: readability-identifier-naming.ClassCase
value: lower_case
- key: readability-identifier-naming.ClassPrefix
value: ''
- key: readability-identifier-naming.ClassSuffix
value: ''
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: k
- key: readability-identifier-naming.ConstexprVariableSuffix
value: ''
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: k
- key: readability-identifier-naming.EnumConstantSuffix
value: ''
- key: readability-identifier-naming.EnumPrefix
value: ''
- key: readability-identifier-naming.EnumSuffix
value: ''
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.FunctionPrefix
value: ''
- key: readability-identifier-naming.FunctionSuffix
value: ''
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
- key: readability-identifier-naming.GlobalConstantSuffix
value: ''
- key: readability-identifier-naming.IgnoreFailedSplit
value: '0'
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.MemberPrefix
value: ''
- key: readability-identifier-naming.MemberSuffix
value: ''
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.NamespacePrefix
value: ''
- key: readability-identifier-naming.NamespaceSuffix
value: ''
- key: readability-identifier-naming.PrivateMemberPrefix
value: ''
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.ProtectedMemberPrefix
value: ''
- key: readability-identifier-naming.ProtectedMemberSuffix
value: _
- key: readability-identifier-naming.StaticConstantCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantPrefix
value: k
- key: readability-identifier-naming.StaticConstantSuffix
value: ''
- key: readability-identifier-naming.StructCase
value: lower_case
- key: readability-identifier-naming.StructPrefix
value: ''
- key: readability-identifier-naming.StructSuffix
value: ''
- key: readability-identifier-naming.TypeAliasCase
value: lower_case
- key: readability-identifier-naming.TypeAliasPrefix
value: ''
- key: readability-identifier-naming.TypeAliasSuffix
value: ''
- key: readability-identifier-naming.TypeTemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.TypeTemplateParameterPrefix
value: ''
- key: readability-identifier-naming.TypeTemplateParameterSuffix
value: ''
- key: readability-identifier-naming.TypedefCase
value: lower_case
- key: readability-identifier-naming.TypedefPrefix
value: ''
- key: readability-identifier-naming.TypedefSuffix
value: ''
...

Loading