You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tests are registered with CTest automatically. Individual targets follow the naming pattern `<TestName>_cpp` (CPU) and `<TestName>_cu` (CUDA).
101
93
102
94
---
@@ -116,7 +108,9 @@ Tests in `tests/` and `utests/` are **not** written with a traditional test fram
116
108
6. Use `// ONLY_CPU` in a test header to suppress the `_cu` target.
117
109
118
110
### Test File Structure
111
+
119
112
Every test header must define a `launch()` function returning `int`:
113
+
120
114
```cpp
121
115
#include<tests/main.h>
122
116
#include<fused_kernel/fused_kernel.h>
@@ -163,13 +157,15 @@ In CPU-only mode (no NVCC, no CLANG_HOST_DEVICE), these macros degrade to standa
163
157
The `FK_STATIC_STRUCT(StructName, StructAlias)` macro marks a struct as non-constructible and non-copyable (deletes default/copy/move constructors and assignment operators).
164
158
165
159
### Type Aliases
160
+
166
161
The library defines CUDA-compatible type aliases (also available in CPU mode):
162
+
167
163
```cpp
168
-
using uchar = unsignedchar;
169
-
using schar = signedchar;
170
-
using uint = unsignedint;
171
-
using ushort = unsignedshort;
172
-
using ulong = unsignedlong;
164
+
using uchar = unsignedchar;
165
+
using schar = signedchar;
166
+
using uint = unsignedint;
167
+
using ushort = unsignedshort;
168
+
using ulong = unsignedlong;
173
169
using longlong = longlong;
174
170
using ulonglong = unsignedlonglong;
175
171
```
@@ -190,7 +186,9 @@ Run `clang-format` using the `.clang-format` file at the repo root:
190
186
## Core API Patterns
191
187
192
188
### Executing Fused Operations
189
+
193
190
The primary entry point is `fk::executeOperations<DPPType>(stream, op1, op2, ...)`:
191
+
194
192
```cpp
195
193
#include<fused_kernel/fused_kernel.h>
196
194
usingnamespacefk;
@@ -263,3 +261,5 @@ See existing operations like `Mul`, `Add`, `SaturateCast` in `include/fused_kern
263
261
264
262
1.**Windows Ninja + NVCC path**: After CMake configure on Windows with Ninja, `<build_dir>/CMakeFiles/rules.ninja` may contain an incorrect path to `nvcc.exe`. The CI workflow patches this with PowerShell `Set-Content`. If you hit this locally, check that `CUDACXX` env var is set before invoking CMake and verify the generated `rules.ninja`.
265
263
264
+
2.**CUDA Compilation Availability**: CUDA compilation is supported and should not be declared blocked based on an unsuccessful ad hoc nvcc invocation; use the repository's documented VS Developer Shell/CMake build configuration and correct architecture/toolchain settings before concluding CUDA is unavailable.
Copy file name to clipboardExpand all lines: .github/workflows/cmake-windows-amd64.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ on:
8
8
9
9
jobs:
10
10
build:
11
-
runs-on: [self-hosted, windows, x64]
11
+
runs-on: [self-hosted, windows, x64, cuda]
12
12
13
13
strategy:
14
14
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
0 commit comments