Skip to content

Commit 1531d8c

Browse files
committed
Update reduction
1 parent 735feee commit 1531d8c

File tree

39 files changed

+558
-612
lines changed

39 files changed

+558
-612
lines changed

.clangd

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
---
2-
If:
3-
PathMatch: [.*\.c, .*\.h]
4-
CompileFlags:
5-
Add: [-xc, -std=c11]
6-
Remove: [-xc++, -std=c++*]
7-
Diagnostics:
8-
ClangTidy:
9-
Remove:
10-
- modernize-*
11-
- cppcoreguidelines-*
12-
- performance-*
13-
- google-*
14-
- cert-dcl58-cpp
15-
- cert-err58-cpp
16-
- misc-new-delete-overloads
17-
- misc-non-private-member-variables-in-classes
18-
- misc-uniqueptr-reset-release
19-
---
20-
If:
21-
PathMatch: [.*\.cpp, .*\.cu, .*\.hpp, .*\.cuh]
221
CompileFlags:
232
Add:
243
- -std=c++20
@@ -36,6 +15,10 @@ CompileFlags:
3615
- -Xcompiler*
3716
- -arch=*
3817

18+
Index:
19+
Background: Build
20+
StandardLibrary: Yes
21+
3922
Diagnostics:
4023
UnusedIncludes: None
4124
MissingIncludes: None

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"--header-insertion=never",
2929
"--header-insertion-decorators",
3030
"--background-index",
31-
// "-j=8",
31+
"-j=16",
3232
"--pch-storage=memory",
3333
"--function-arg-placeholders=false",
3434
],

configs/lib-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ OpTest:
77
- nInputs: 256
88
divider: 4
99
- nInputs: 2048
10-
divider: 4
10+
divider: 4
11+
MulReduction:
12+
- nInputs: 32

csrc/include/pmpp/pch.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#pragma once
2+
3+
#include <cuda_runtime.h>
4+
#include <torch/torch.h>
5+
#include <torch/python.h>
6+
#include <type_traits>
7+
#include <algorithm>
8+
9+
#include "pmpp/system.hpp"
10+
#include "pmpp/types/cu_types.cuh"
11+
#include "pmpp/types/cxx_types.hpp"
12+
#include "pmpp/types/torch_types.hpp"

csrc/include/pmpp/types/c_types.h

Lines changed: 0 additions & 9 deletions
This file was deleted.

csrc/include/pmpp/types/concepts.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <iterator>
44
#include <ranges>
5+
#include <type_traits>
56

67
namespace pmpp
78
{

csrc/include/pmpp/types/cu_types.cuh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#pragma once
2+
13
#include <cuda_bf16.h>
24
#include <cuda_fp16.h>
35
#include <cuda_fp8.h>

csrc/include/pmpp/types/types.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#pragma once
2+
3+
#include "pmpp/types/concepts.hpp"
4+
#include "pmpp/types/cu_types.cuh"
5+
#include "pmpp/types/cxx_types.hpp"
6+
#include "pmpp/types/torch_types.hpp"

csrc/lib/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ target_include_directories(
1313
$<INSTALL_INTERFACE:include>
1414
)
1515

16+
target_precompile_headers(
17+
${LIB_NAME} PUBLIC
18+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/pmpp/pch.hpp>
19+
$<INSTALL_INTERFACE:include/pmpp/pch.hpp>
20+
)
21+
1622
target_link_libraries(
1723
${LIB_NAME}
1824
PUBLIC
25+
Python::Python
1926
${TORCH_LIBRARIES}
2027
fmt::fmt
2128
msft_proxy

0 commit comments

Comments
 (0)