Skip to content

Commit b61a5a6

Browse files
author
Albert Andaluz
committed
Updated worker tags (upstream from main)
1 parent aaff04a commit b61a5a6

5 files changed

Lines changed: 19 additions & 19 deletions

File tree

.github/copilot-instructions.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ The library has CPU and CUDA backends. HIP support is architecturally possible b
1616
---
1717

1818
## Repository Layout
19-
2019
```
2120
FusedKernelLibrary/
2221
├── .clang-format # LLVM-based style, 4-space indent, 120-char column limit
@@ -44,7 +43,6 @@ FusedKernelLibrary/
4443
├── utests/ # Unit tests (header .h files, auto-discovered)
4544
└── benchmarks/ # Benchmarks (disabled by default, ENABLE_BENCHMARK=ON)
4645
```
47-
4846
---
4947

5048
## Build System
@@ -56,15 +54,13 @@ FusedKernelLibrary/
5654
- **MSVC**: Visual Studio 2022 or Visual Studio 2026 (MSVC_VERSION >= 1930) required;
5755

5856
### Configure and Build (typical)
59-
```bash
6057
# Linux (Ninja)
6158
cmake -G "Ninja" -B build -DCMAKE_BUILD_TYPE=Release -S .
62-
cmake --build build --config Release
59+
cmake --build build --config Release --parallel 32
6360

6461
# Windows (Ninja, inside VS Developer Shell)
6562
cmake -G "Ninja" -B build -DCMAKE_BUILD_TYPE=Release -S .
66-
cmake --build build --config Release
67-
```
63+
cmake --build build --config Release --parallel 32
6864

6965
### Key CMake Options
7066
| Option | Default | Description |
@@ -91,12 +87,8 @@ cmake --build build --config Release
9187
---
9288

9389
## Running Tests
94-
95-
```bash
9690
cd build
9791
ctest --build-config Release --output-junit test_results.xml
98-
```
99-
10092
Tests are registered with CTest automatically. Individual targets follow the naming pattern `<TestName>_cpp` (CPU) and `<TestName>_cu` (CUDA).
10193

10294
---
@@ -116,7 +108,9 @@ Tests in `tests/` and `utests/` are **not** written with a traditional test fram
116108
6. Use `// ONLY_CPU` in a test header to suppress the `_cu` target.
117109

118110
### Test File Structure
111+
119112
Every test header must define a `launch()` function returning `int`:
113+
120114
```cpp
121115
#include <tests/main.h>
122116
#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
163157
The `FK_STATIC_STRUCT(StructName, StructAlias)` macro marks a struct as non-constructible and non-copyable (deletes default/copy/move constructors and assignment operators).
164158

165159
### Type Aliases
160+
166161
The library defines CUDA-compatible type aliases (also available in CPU mode):
162+
167163
```cpp
168-
using uchar = unsigned char;
169-
using schar = signed char;
170-
using uint = unsigned int;
171-
using ushort = unsigned short;
172-
using ulong = unsigned long;
164+
using uchar = unsigned char;
165+
using schar = signed char;
166+
using uint = unsigned int;
167+
using ushort = unsigned short;
168+
using ulong = unsigned long;
173169
using longlong = long long;
174170
using ulonglong = unsigned long long;
175171
```
@@ -190,7 +186,9 @@ Run `clang-format` using the `.clang-format` file at the repo root:
190186
## Core API Patterns
191187

192188
### Executing Fused Operations
189+
193190
The primary entry point is `fk::executeOperations<DPPType>(stream, op1, op2, ...)`:
191+
194192
```cpp
195193
#include <fused_kernel/fused_kernel.h>
196194
using namespace fk;
@@ -263,3 +261,5 @@ See existing operations like `Mul`, `Add`, `SaturateCast` in `include/fused_kern
263261

264262
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`.
265263

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.
265+

.github/workflows/cmake-linux-amd64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: [self-hosted, linux, x64]
11+
runs-on: [self-hosted, linux, x64, cuda]
1212

1313
strategy:
1414
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.

.github/workflows/cmake-linux-arm64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: [self-hosted, linux, arm64]
11+
runs-on: [self-hosted, linux, arm64, cuda]
1212

1313
strategy:
1414
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.

.github/workflows/cmake-windows-amd64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: [self-hosted, windows, x64]
11+
runs-on: [self-hosted, windows, x64, cuda]
1212

1313
strategy:
1414
# 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.

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
copilot-setup-steps:
88
# Run Copilot setup on the self-hosted Linux x64 runner
9-
runs-on: [self-hosted, linux, x64]
9+
runs-on: [self-hosted, linux, x64, cuda]
1010

1111
permissions:
1212
contents: read

0 commit comments

Comments
 (0)