Skip to content

Commit 2d4daba

Browse files
authored
spu v0.1.0-beta version (secretflow#1)
1 parent 915cf89 commit 2d4daba

File tree

599 files changed

+104548
-1
lines changed

Some content is hidden

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

599 files changed

+104548
-1
lines changed

.bazelrc

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
common --experimental_repo_remote_exec
2+
3+
build --incompatible_new_actions_api=false
4+
build --copt=-fdiagnostics-color=always
5+
build --enable_platform_specific_config
6+
7+
build --cxxopt=-std=c++17
8+
build --host_cxxopt=-std=c++17
9+
build --linkopt -fvisibility=hidden
10+
11+
12+
test --keep_going
13+
test --test_output=errors
14+
test --test_timeout=1800
15+
16+
# platform specific config
17+
# Bazel will automatic pick platform config since we have enable_platform_specific_config set
18+
build:macos --features=-supports_dynamic_linker
19+
build:macos --cxxopt -Wno-deprecated-enum-enum-conversion
20+
build:macos --cxxopt -Wno-deprecated-anon-enum-enum-conversion
21+
build:macos --copt -mmacosx-version-min=11.0
22+
23+
build:asan --strip=never
24+
build:asan --copt -fno-sanitize-recover=all
25+
build:asan --copt -fsanitize=address
26+
build:asan --copt -Og
27+
build:asan --copt -g
28+
build:asan --copt -fno-omit-frame-pointer
29+
build:asan --linkopt -fsanitize=address
30+
build:asan --linkopt -static-libasan
31+
32+
build:ubsan --strip=never
33+
build:ubsan --copt -fno-sanitize-recover=all
34+
build:ubsan --copt -fsanitize=undefined
35+
build:ubsan --copt -Og
36+
build:ubsan --copt -g
37+
build:ubsan --copt -fno-omit-frame-pointer
38+
build:ubsan --linkopt -fsanitize=undefined
39+
build:ubsan --linkopt -static-libubsan
40+
41+
build:macos-asan --features=asan
42+
build:macos-ubsan --features=ubsan
43+
44+
test:asan --strip=never
45+
test:asan --copt -fno-sanitize-recover=all
46+
test:asan --copt -fsanitize=address
47+
test:asan --copt -O0
48+
test:asan --copt -g
49+
test:asan --copt -fno-omit-frame-pointer
50+
test:asan --linkopt -fsanitize=address
51+
test:asan --linkopt -static-libasan
52+
53+
test:ubsan --strip=never
54+
test:ubsan --copt -fno-sanitize-recover=all
55+
test:ubsan --copt -fsanitize=undefined
56+
test:ubsan --copt -O0
57+
test:ubsan --copt -g
58+
test:ubsan --copt -fno-omit-frame-pointer
59+
test:ubsan --linkopt -fsanitize=undefined
60+
test:ubsan --linkopt -static-libubsan

.bazelversion

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.1.1

.clang-format

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Use the Google style in this project.
2+
BasedOnStyle: Google
3+
4+
IncludeBlocks: Regroup
5+
IncludeCategories:
6+
- Regex: '^<.*\.h>'
7+
Priority: 1
8+
- Regex: '^<.*'
9+
Priority: 2
10+
- Regex: '.*\.pb\.h"$'
11+
Priority: 5
12+
- Regex: '^"spu.*'
13+
Priority: 4
14+
- Regex: '^".*'
15+
Priority: 3

.clang-tidy

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
Checks: "abseil-cleanup-ctad,
2+
abseil-faster-strsplit-delimiter,
3+
abseil-duration-*,
4+
abseil-no-namespace,
5+
abseil-redundant-strcat-calls,
6+
abseil-str-cat-append,
7+
abseil-string-find-startswith,
8+
abseil-upgrade-duration-conversions
9+
bugprone-*,
10+
-bugprone-easily-swappable-parameters,
11+
google-build-using-namespace,
12+
google-explicit-constructor,
13+
google-global-names-in-headers,
14+
google-readability-casting,
15+
google-runtime-int,
16+
google-runtime-operator,
17+
misc-unused-using-decls,
18+
modernize-*,
19+
-modernize-use-trailing-return-type,
20+
-modernize-use-nodiscard,
21+
performance-*,
22+
readability-*,
23+
-readability-else-after-return,
24+
-readability-identifier-length,
25+
-readability-magic-numbers,
26+
-readability-named-parameter"
27+
28+
CheckOptions:
29+
- key: bugprone-argument-comment.StrictMode
30+
value: 1
31+
32+
- key: bugprone-dangling-handle.HandleClasses
33+
value: "std::basic_string_view;std::experimental::basic_string_view;absl::string_view"
34+
35+
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
36+
value: 1
37+
38+
# Ignore GoogleTest function macros.
39+
- key: readability-identifier-naming.FunctionIgnoredRegexp
40+
value: "(TEST|TEST_F|TEST_P|INSTANTIATE_TEST_SUITE_P|MOCK_METHOD|TYPED_TEST)"
41+
42+
- key: readability-identifier-naming.ClassCase
43+
value: "CamelCase"
44+
45+
- key: readability-identifier-naming.EnumCase
46+
value: "CamelCase"
47+
48+
- key: readability-identifier-naming.EnumConstantCase
49+
value: "CamelCase"
50+
51+
- key: readability-identifier-naming.ParameterCase
52+
value: "lower_case"
53+
54+
- key: readability-identifier-naming.PrivateMemberCase
55+
value: "lower_case"
56+
57+
- key: readability-identifier-naming.PrivateMemberSuffix
58+
value: "_"
59+
60+
- key: readability-identifier-naming.StructCase
61+
value: "CamelCase"
62+
63+
- key: readability-identifier-naming.TypeAliasCase
64+
value: "CamelCase"
65+
66+
- key: readability-identifier-naming.UnionCase
67+
value: "CamelCase"
68+
69+
- key: readability-identifier-naming.FunctionCase
70+
value: "CamelBack"

.gitignore

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# devtools
2+
.idea/
3+
*.plist
4+
clion/
5+
*.swp
6+
tags
7+
sftp-config.json
8+
build_cmakelist.py
9+
.akconfig
10+
.cloudide/
11+
*.code-workspace
12+
vipclient-*
13+
*.pb.h
14+
*.pb.cc
15+
compile_commands.json
16+
.clangd
17+
Pipfile
18+
19+
# python-package
20+
/dist
21+
*.egg-info
22+
__pycache__
23+
build
24+
_build
25+
26+
# bazel
27+
bazel-*
28+
29+
# cmake related
30+
abseil-cpp
31+
bld
32+
bld.install
33+
CMakeCache.txt
34+
cmake_install.cmake
35+
CTestTestfile.cmake
36+
37+
# mixed
38+
.DS_Store
39+
.ipynb_checkpoints
40+
trace.*log
41+
42+
dump/
43+
44+
# clangd cache
45+
.cache
46+
external
47+
48+
#brpc
49+
rpc_data
50+
51+
ppdump/
52+
coverity*/
53+
idir/
54+
55+
spu_wheel.name
56+
*.whl

.vscode/extensions.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"recommendations": [
3+
"BazelBuild.vscode-bazel",
4+
"eamodio.gitlens",
5+
"matepek.vscode-catch2-test-adapter",
6+
"ms-python.python",
7+
"ms-vscode.cpptools",
8+
"jgclark.vscode-todo-highlight",
9+
"ms-vscode-remote.remote-ssh",
10+
"zxh404.vscode-proto3",
11+
"llvm-vs-code-extensions.vscode-clangd",
12+
]
13+
}

.vscode/settings.json

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"C_Cpp.intelliSenseEngine": "Disabled",
3+
"C_Cpp.autocomplete": "Disabled",
4+
"clangd.arguments": [
5+
"--header-insertion=never"
6+
],
7+
"testMate.cpp.discovery.testListCaching": true,
8+
"testMate.cpp.test.parallelExecutionOfExecutableLimit": 8,
9+
"testMate.cpp.test.advancedExecutables": [
10+
{
11+
"pattern": "bazel-bin/**/*{_test}",
12+
"cwd": "${workspaceFolder}",
13+
"gtest": {
14+
"testGrouping": {
15+
"groupBySource": {
16+
"label": "${sourceRelPath[1:]}"
17+
}
18+
}
19+
}
20+
}
21+
],
22+
"files.watcherExclude": {
23+
"**/.git/**": true,
24+
"**/.cache/**": true,
25+
"**/bazel-*/**": true,
26+
"**/external/**": true
27+
},
28+
"bazel.enableCodeLens": true,
29+
"editor.formatOnSave": true,
30+
"editor.bracketPairColorization.enabled": true,
31+
"editor.guides.bracketPairs": "active",
32+
"[dockerfile]": {
33+
"editor.quickSuggestions": {
34+
"strings": true
35+
},
36+
"editor.formatOnSave": false,
37+
},
38+
"python.formatting.provider": "black",
39+
"esbonio.sphinx.confDir": ""
40+
}

.vscode/tasks.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"tasks": [
3+
{
4+
"label": "Build and Test all (Debug)",
5+
"type": "shell",
6+
"command": "bazel test //... -c dbg --spawn_strategy=standalone --strip=never",
7+
"group": {
8+
"kind": "build",
9+
},
10+
"problemMatcher": "$gcc",
11+
},
12+
{
13+
"label": "Build and Test all (Fast)",
14+
"type": "shell",
15+
"command": "bazel test //...",
16+
"group": {
17+
"kind": "build",
18+
},
19+
"problemMatcher": "$gcc",
20+
},
21+
{
22+
"label": "Build and Test all (Release)",
23+
"type": "shell",
24+
"command": "bazel test //... -c opt",
25+
"group": {
26+
"kind": "build",
27+
},
28+
"problemMatcher": "$gcc",
29+
},
30+
]
31+
}

BUILD.bazel

Whitespace-only changes.

0 commit comments

Comments
 (0)