Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
300f21b
Initial implementation for ALPAKA integration to SOFIE
sanjibansg Apr 11, 2025
fc9846c
GPU ALPAKA Support in GEMM
sanjibansg Apr 11, 2025
419b354
fix: errors with the generation function
sanjibansg Apr 11, 2025
6481c05
fix: defining intermediate and initialized tensors
sanjibansg Aug 18, 2025
e31303f
feat: use sofieblas efficiently and add leaky relu, sigmoid support
sanjibansg Oct 14, 2025
afae7c3
feat: add basic binary kernel
sanjibansg Oct 17, 2025
c845fe7
feat: add cast kernel
sanjibansg Oct 17, 2025
3d9f812
feat: add squeeze, unsqueeze, flatten and reshape
sanjibansg Oct 21, 2025
284405e
feat: add support for basic unary
sanjibansg Oct 21, 2025
d64a40f
feat: add support for Constant operator
sanjibansg Oct 21, 2025
ac8d662
feat: add support for shape operator
sanjibansg Oct 22, 2025
d75eac3
feat: add support for Basic Binary operations
sanjibansg Nov 20, 2025
f7e44ad
fix: compilation issues due to faulty rebase
sanjibansg Nov 23, 2025
b4cd917
fix: parameteric inputs for range operator
sanjibansg Nov 23, 2025
2016794
fix: linking issue because of incorrect symbols
sanjibansg Nov 24, 2025
f35d9d9
fix: cmake script for tests
sanjibansg Nov 27, 2025
cdc6a9f
fix: define failures in EmitFromRoot.cxx.in (#6)
Saransh-cpp Dec 2, 2025
3ffbe46
fix: layout inconsistencies in alpaka code generation
sanjibansg Dec 14, 2025
1979a11
feat: turn off emitting from ROOT files and skip tests with multiple …
sanjibansg Dec 15, 2025
59aeac4
feat: support for google tests for inference code with alpaka impleme…
sanjibansg Dec 15, 2025
815a80c
feat: test cases for leaky relu operator
sanjibansg Jan 26, 2026
671b4b0
fix: sigmoid operator gpu implementation and test
sanjibansg Jan 26, 2026
2fe07bb
feat: Support for heterogeneous inference of transpose operator
sanjibansg Mar 3, 2026
ccebeb3
feat: Support for heterogeneous inference on concat operator
sanjibansg Mar 5, 2026
4b179ea
feat: Support for heterogeneous inference on scatter elements operator
sanjibansg Mar 5, 2026
50d478e
fix: split operator implementation and multiple buffer return
sanjibansg Mar 9, 2026
5af24cf
feat: Support for heterogeneous inference on tile operator
sanjibansg Mar 12, 2026
6dac663
feat: tests for heterogeneous inference of Gather operator
sanjibansg Mar 13, 2026
0d205e9
feat: tests for heterogeneous inference of Expand operator
sanjibansg Mar 16, 2026
1f0ebc6
feat: Support for heterogeneous inference on gathernd operator
sanjibansg Mar 16, 2026
19cdc11
fix: tensor management for expand and cast operators
sanjibansg Mar 19, 2026
c3b892a
feat: alpaka wait only before blas calls
sanjibansg Mar 30, 2026
ba9643e
feat: Support for heterogeneous inference on comparison operators
sanjibansg Apr 13, 2026
6ba3f29
feat: Support for heterogeneous inference for slice and unary operators
sanjibansg Apr 13, 2026
7f27cd4
feat: Support for heterogeneous inference for where operator
sanjibansg Apr 13, 2026
860d34f
feat: Support for heterogeneous inference for reduce and softplus ope…
sanjibansg Apr 13, 2026
4433ca2
feat: Make ROOT usage optional
sanjibansg Apr 28, 2026
dae834e
feat: Support for heterogeneous inference for Conv operator
sanjibansg May 7, 2026
2b6ede3
feat: infer methods using alpaka views
sanjibansg May 11, 2026
ff9d6cf
feat: Support for inference on batchnorm operator
sanjibansg May 11, 2026
16d8fab
feat: fusion
sanjibansg May 19, 2026
21740c6
fix: several fixes with operator initialization and cpu generation
sanjibansg May 21, 2026
2a98dca
feat: project restructure and benchmark tool
sanjibansg May 24, 2026
b7e5178
feat: Trilu and Logic operator implementations, several GPU optimizat…
sanjibansg May 27, 2026
dbd19b6
feat: structural change, add github ci workflow
sanjibansg Jun 16, 2026
2242c25
fix: ci container setup for tests and benchmarking
sanjibansg Jun 17, 2026
f9a4a85
feat: profiler support for inference on heterogeneous inference
sanjibansg Jun 17, 2026
7e177be
fix: self hosted runners for github ci tests and benchmark
sanjibansg Jun 19, 2026
c51ab63
test: fix ci
gigabyte132 Jun 19, 2026
7e3351f
test: fix ci
gigabyte132 Jun 19, 2026
2ecf981
fix: temp suspend unbound variables errors in CI
sanjibansg Jun 24, 2026
58f17f8
fix ci: root privileges for installation and further testing
sanjibansg Jul 13, 2026
bdd8b51
feat: Add GTests for Conv GPU batch>1 inference (#20)
harz05 Jul 13, 2026
98a95d7
fix: add error handling and logging to model generator scripts (#16)
harz05 Jul 13, 2026
b4c0a86
feat: add GTests for Conv GPU groups>1 inference (#22)
harz05 Jul 20, 2026
c7baf38
feat: restructure unit tests into operator categories
sanjibansg Jul 20, 2026
0897275
feat: GPU Occupancy in benchmarking results
sanjibansg Jul 20, 2026
801c461
test: add grouped + batched Conv GPU inference with bias (#24)
harz05 Jul 20, 2026
ff26a53
feat: Support for inference of Pool operators (MaxPool, AvgPool, Glob…
harz05 Jul 21, 2026
a416121
fix: wrong pad indices in pool operator for asymmetric padding (#28)
harz05 Jul 22, 2026
280bb96
feat: Support for inference of the Elu operator in heterogeneous arch…
harz05 Jul 23, 2026
b4b0520
test: add GTests for Conv GPU bias, 1D and 3D paths (#31)
harz05 Aug 6, 2026
73ea599
fix: double-counted dilation in Conv operator for CPU and GPU (#34)
harz05 Aug 10, 2026
c7e873a
feat: Support for inference of ScatterND operator on heterogeneous ar…
sanjibansg Aug 11, 2026
0341b0a
ci: use lxplus-like container from ngt
sanjibansg Aug 13, 2026
3eb84a9
ci: hardcode number of processes to run on in the ci
sanjibansg Aug 13, 2026
1d44e3e
ci: remove setup build env from benchmarks
sanjibansg Aug 13, 2026
350f978
ci: configurable ci execution for tests and benchmark
sanjibansg Aug 13, 2026
0088d4f
ci: change runner for tests to l40s
sanjibansg Aug 13, 2026
c6fe12d
ci: remove cvmfs cuda referencing from tests
sanjibansg Aug 13, 2026
816ee49
ci: only run one tests ci check in gpu/alpaka branch
sanjibansg Aug 13, 2026
6acbb9e
ci: experiment tests ci on NVIDIA L40S
sanjibansg Aug 13, 2026
4b25a97
ci: fix authorization username
sanjibansg Aug 13, 2026
f947627
ci: source gtest for the testing ci
sanjibansg Aug 13, 2026
2bf0005
ci: fix build setup for tests ci
sanjibansg Aug 13, 2026
a8fa4c6
ci: fix cuda architecture variable for tests ci
sanjibansg Aug 13, 2026
770dba0
ci: fix fetching generated header files for tests ci
sanjibansg Aug 13, 2026
c0ac192
ci: fix gtest fixture for testing ci
sanjibansg Aug 13, 2026
dd661d2
ci: rename /runci to /runtest for tests ci and improvements on button…
sanjibansg Aug 13, 2026
fc95974
ci: auto check for other runners to run tests and benchmark on NVIDIA…
sanjibansg Aug 13, 2026
86a0996
ci: fix workflow configuration to restrict to l40s for nvidia testing…
sanjibansg Aug 13, 2026
8bfbfe2
ci: parameterize command to choose runners for running ci tests and b…
sanjibansg Aug 13, 2026
d9ed70a
ci: reply comment with the workflow details for tests and benchmarks
sanjibansg Aug 13, 2026
583c8fd
ci: post a notification once the benchmark ci is finished
sanjibansg Aug 13, 2026
1810c5d
ci: ci triggers only by PR comments
sanjibansg Aug 13, 2026
ed8f301
ci: fix flavour identifier during reporting successful trigger of ci …
sanjibansg Aug 13, 2026
552c556
tests: add gtest for conv gpu SAME_UPPER autopad (#35)
harz05 Aug 13, 2026
7ddd1b5
ci: post link to new benchmarking results upon completion
sanjibansg Aug 13, 2026
54b2bea
feat: implement kernel only mode for heterogeneous architectures
sanjibansg Aug 13, 2026
89e2af0
feat: Support for inference of selu operation on heterogeneous archit…
harz05 Aug 14, 2026
7ba016d
feat: Support for inference of RMSNorm, GroupNorm and CumSum operator…
sanjibansg Aug 19, 2026
4e86875
feat: Support for inference of SDPA, MambaScan, RWKV, and GriffinRGLR…
sanjibansg Aug 19, 2026
38dbbf3
fix: math symbols and namespace units to avoid clash during similar t…
sanjibansg Aug 19, 2026
d1146d0
feat: use safe math impl and add mamba model for benchmarking
sanjibansg Aug 20, 2026
3f51ff3
Support for dynamic parametric inputs in inference on heterogeneous a…
harz05 Sep 15, 2026
a1c2419
Support for Pad operator for inference on heterogeneous architectures…
harz05 Sep 15, 2026
bb9d847
feat: Support for inference of NonZero Operator on heterogeneous arch…
ioantreas Sep 16, 2026
c8eb9da
feat: memory optimization and kernel fusion for inference on heteroge…
ioantreas Oct 2, 2026
c4caf22
feat: update standalone sofie with root upstream (#59)
sanjibansg Oct 4, 2026
86bed43
feat: Support for stride-aware processing to support inference on inp…
sanjibansg Oct 19, 2026
ca8c5ad
feat: remove internal dependencies, framework restructure, and minor …
sanjibansg Oct 21, 2026
1cf8dec
Backend neutral alpaka tests with a HIP build and fixes for Reduce an…
harz05 Oct 22, 2026
67f03a7
feat: Support for external stream, custom memory pool and debug mode …
sanjibansg Oct 23, 2026
484f93c
feat: Support for Gelu operator for inference on heterogeneous archit…
harz05 Oct 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.onnx binary
*.onnx.data binary
*.pt2 binary
278 changes: 278 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
name: Benchmark

on:
issue_comment:
types: [created]
workflow_dispatch:
inputs:
warmup:
description: "Warmup iterations"
default: "5"
iterations:
description: "Timed iterations"
default: "100"

concurrency:
group: benchmark-${{ github.event.issue.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write
issues: write

env:
CUDA_ARCH: "native"
BUILD_TYPE: Release
BENCH_WARMUP: ${{ github.event.inputs.warmup || '5' }}
BENCH_ITERS: ${{ github.event.inputs.iterations || '100' }}
DEPS_CACHE: /tmp/sofie-cmake-deps

jobs:
parse-command:
name: Parse trigger
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'issue_comment' &&
github.event.issue.pull_request != null &&
contains(fromJSON('["sanjibansg","lmoneta"]'), github.event.comment.user.login) &&
startsWith(github.event.comment.body, '/runbenchmark')
)
outputs:
runner_label: ${{ steps.parse.outputs.runner_label }}
valid: ${{ steps.parse.outputs.valid }}
flavor: ${{ steps.parse.outputs.flavor }}
valid_flavors: ${{ steps.parse.outputs.valid_flavors }}
steps:
- name: React to trigger comment
if: github.event_name == 'issue_comment'
uses: actions/github-script@v7
with:
script: |
await github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: 'eyes'
});
- name: Parse runner flavor
id: parse
uses: actions/github-script@v7
with:
script: |
// default flavor keyed by name -> actual self-hosted runner label
const flavors = {
l40s: 'ml4ep-l40s',
h100: 'ml4ep-h100',
'h100-47gb': 'ml4ep-h100-47gb',
};
let flavor = 'l40s';
let valid = true;
if (context.eventName === 'issue_comment') {
const m = context.payload.comment.body.trim().match(/^\/runbenchmark(?:\s+(\S+))?/i);
if (m && m[1]) {
flavor = m[1].toLowerCase();
valid = Object.prototype.hasOwnProperty.call(flavors, flavor);
}
}
core.setOutput('flavor', flavor);
core.setOutput('valid', String(valid));
core.setOutput('runner_label', valid ? flavors[flavor] : '');
core.setOutput('valid_flavors', Object.keys(flavors).join(', '));
- name: Post run link
if: github.event_name == 'issue_comment'
uses: actions/github-script@v7
with:
script: |
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: `\`/runbenchmark\` (${{ steps.parse.outputs.flavor }}): triggered - [view run](${runUrl})`
});

benchmark:
name: Benchmark Comparison
needs: parse-command
if: needs.parse-command.outputs.valid == 'true'
runs-on: ${{ needs.parse-command.outputs.runner_label }}
container: registry.cern.ch/ngt/lxplus-like:9
timeout-minutes: 120

steps:
- name: GPU check
run: nvidia-smi
- name: Resolve PR info
id: pr
if: github.event_name == 'issue_comment'
uses: actions/github-script@v7
with:
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.issue.number
});
core.setOutput('number', pr.data.number);
core.setOutput('merge_ref', `refs/pull/${pr.data.number}/merge`);
core.setOutput('base_ref', pr.data.base.ref);

- name: Checkout PR branch
uses: actions/checkout@v4
with:
path: sofie-pr
ref: ${{ github.event_name == 'issue_comment' && steps.pr.outputs.merge_ref || github.ref }}

- name: Checkout base branch
if: github.event_name == 'issue_comment'
uses: actions/checkout@v4
with:
ref: ${{ steps.pr.outputs.base_ref }}
path: sofie-main

- name: Cache FetchContent dependencies
uses: actions/cache@v4
with:
path: ${{ env.DEPS_CACHE }}
key: cmake-deps-bench-${{ hashFiles('sofie-pr/benchmark/CMakeLists.txt') }}
restore-keys: cmake-deps-bench-

- name: Configure PR build
run: |
cmake -B sofie-pr/build -S sofie-pr \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DSOFIE_BENCHMARK=ON \
-DSOFIE_BENCHMARK_BACKEND=CUDA \
"-DSOFIE_BENCHMARK_CUDA_ARCH=${{ env.CUDA_ARCH }}" \
"-DCMAKE_CUDA_ARCHITECTURES=${{ env.CUDA_ARCH }}" \
"-DFETCHCONTENT_BASE_DIR=${{ env.DEPS_CACHE }}"

- name: Build PR benchmark
run: cmake --build sofie-pr/build --target sofie_benchmark -j10

- name: Run PR benchmark
working-directory: sofie-pr/build/benchmark
run: |
./sofie_benchmark \
-w ${{ env.BENCH_WARMUP }} \
-n ${{ env.BENCH_ITERS }} \
| tee benchmark_pr.txt
- name: Check whether base branch supports the benchmark harness
id: base_support
if: github.event_name == 'issue_comment'
run: |
if grep -q "option(SOFIE_BENCHMARK " sofie-main/CMakeLists.txt 2>/dev/null; then
echo "supported=true" >> "$GITHUB_OUTPUT"
else
echo "supported=false" >> "$GITHUB_OUTPUT"
echo "::warning::${{ steps.pr.outputs.base_ref }} does not define the SOFIE_BENCHMARK option yet - skipping the base-branch comparison."
fi

- name: Configure base build
if: github.event_name == 'issue_comment' && steps.base_support.outputs.supported == 'true'
run: |
cmake -B sofie-main/build -S sofie-main \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DSOFIE_BENCHMARK=ON \
-DSOFIE_BENCHMARK_BACKEND=CUDA \
"-DSOFIE_BENCHMARK_CUDA_ARCH=${{ env.CUDA_ARCH }}" \
"-DCMAKE_CUDA_ARCHITECTURES=${{ env.CUDA_ARCH }}" \
"-DFETCHCONTENT_BASE_DIR=${{ env.DEPS_CACHE }}"

- name: Build base benchmark
if: github.event_name == 'issue_comment' && steps.base_support.outputs.supported == 'true'
run: cmake --build sofie-main/build --target sofie_benchmark -j10

- name: Run base benchmark
if: github.event_name == 'issue_comment' && steps.base_support.outputs.supported == 'true'
working-directory: sofie-main/build/benchmark
run: |
./sofie_benchmark \
-w ${{ env.BENCH_WARMUP }} \
-n ${{ env.BENCH_ITERS }} \
| tee benchmark_main.txt

- name: Build comparison summary
id: summary
if: always()
run: |
{
echo "summary<<BENCH_EOF"
echo "### Benchmark results (${{ needs.parse-command.outputs.flavor }})"
echo ""
if [ "${{ github.event_name }}" = "issue_comment" ] && [ "${{ steps.base_support.outputs.supported }}" = "true" ]; then
echo "Comparing against \`${{ steps.pr.outputs.base_ref }}\`"
elif [ "${{ github.event_name }}" = "issue_comment" ]; then
echo "_\`${{ steps.pr.outputs.base_ref }}\` does not yet support the SOFIE_BENCHMARK harness - showing PR results only._"
fi
echo ""
echo '```'
echo "── PR ──────────────────────────────────────────────────────────────"
cat sofie-pr/build/benchmark/benchmark_pr.txt 2>/dev/null || echo "(no results)"
if [ -f sofie-main/build/benchmark/benchmark_main.txt ]; then
echo ""
echo "── ${{ steps.pr.outputs.base_ref }} ──────────────────────────────────────────────"
cat sofie-main/build/benchmark/benchmark_main.txt
fi
echo '```'
echo "BENCH_EOF"
} >> "$GITHUB_OUTPUT"

- name: Post results as PR comment
if: always() && github.event_name == 'issue_comment'
uses: marocchino/sticky-pull-request-comment@v2
with:
number: ${{ steps.pr.outputs.number }}
header: benchmark
message: ${{ steps.summary.outputs.summary }}

- name: Write job summary
if: always()
run: echo "${{ steps.summary.outputs.summary }}" >> "$GITHUB_STEP_SUMMARY"

- name: Notify benchmark completion
if: always() && github.event_name == 'issue_comment'
uses: actions/github-script@v7
with:
script: |
const status = '${{ job.status }}' === 'success' ? '✅ completed' : '❌ failed';
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: `\`/runbenchmark\` (${{ needs.parse-command.outputs.flavor }}): Benchmark ${status} - [view results](${runUrl})`
});

- name: Upload benchmark results
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{ github.run_id }}
path: |
sofie-pr/build/benchmark/benchmark_pr.txt
sofie-main/build/benchmark/benchmark_main.txt
if-no-files-found: ignore

report-invalid-flavor:
name: Report invalid runner flavor
needs: parse-command
runs-on: ubuntu-latest
if: >-
always() && github.event_name == 'issue_comment' &&
needs.parse-command.result == 'success' &&
needs.parse-command.outputs.valid == 'false'
steps:
- uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
body: `\`/runbenchmark\`: unknown runner flavor \`${{ needs.parse-command.outputs.flavor }}\`. ` +
`Valid options: ${{ needs.parse-command.outputs.valid_flavors }} (or omit for the default, l40s).`
});
Loading