Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
de5c112
feat(ci): optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
e91fff5
feat(ci): optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
576c2b8
feat(ci): optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
f1e4bb8
feat(ci): optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
43d51c8
feat(ci): optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
d96de27
feat(ci): optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
c7d669b
feat(ci): optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
a652ec8
feat(ci): optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
ebd8e20
refactor(ci): optimize workflow pipeline and update docker configurat…
Eamon2009 May 29, 2026
c2d78c8
refactor : optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
ff173b4
refactor : optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
8db6cd1
refactor : optimize workflow pipeline and update docker configurations
Eamon2009 May 29, 2026
07288d9
Added MIT LICENSE to this project Quadtrix.cpp
Eamon2009 May 29, 2026
d01af15
Refactor Dockerfile to use ARG for CUDA version
codeaddict-119 May 29, 2026
ed37774
Refactor Dockerfile for backend dependencies
codeaddict-119 May 29, 2026
ab46bde
Refactor Dockerfile to use ARG for CUDA version (#57)
Eamon2009 May 29, 2026
068cdb7
refactor : Dockerfile.backend optimize workflow pipeline
Eamon2009 May 29, 2026
07826e1
refactor : Dockerfile.backend optimize workflow pipeline
Eamon2009 May 29, 2026
7f4d25a
refactor : Dockerfile.backend optimize workflow pipeline
Eamon2009 May 29, 2026
dcd14e1
refactor : Dockerfile.backend optimize workflow pipeline
Eamon2009 May 29, 2026
2139c1d
Delete .devops/Dockerfile.frontend
Eamon2009 May 29, 2026
74b46ec
Delete .devops/Dockerfile.dev.frontend
Eamon2009 May 29, 2026
0770909
refactor : Dockerfile.backend optimize workflow pipeline
Eamon2009 May 29, 2026
f0ae40b
refactor : Dockerfile.backend optimize workflow pipeline
Eamon2009 May 29, 2026
9f909f4
refactored (CI): consolidated manual Docker build jobs into a matrix …
Eamon2009 May 29, 2026
0ff70b2
refactored (CI): consolidated manual Docker build jobs into a matrix …
Eamon2009 May 29, 2026
31e960d
refactor(ui): rewrite ThinkingIndicator to use inline styles and CSS …
Eamon2009 May 30, 2026
31ef90d
refactor : message bubble layout to use inline styles
Eamon2009 May 30, 2026
9b19a92
refactor(ui): complete inline-style migration and update auto-scroll …
Eamon2009 May 30, 2026
250b2fc
refactor(ui): complete inline-style migration for MessageAvatar compo…
Eamon2009 May 30, 2026
7e4270d
refactor(ui): rewrite EmptyState component using pure inline styles
Eamon2009 May 30, 2026
5e05bec
refactored(tensor): vectorize element-wise addition and scalar scalin…
Eamon2009 May 30, 2026
8149064
refactor(main): redesign training loop to log per-step and sample dur…
Eamon2009 May 30, 2026
b188e6b
feat: implement GPT training loop with multi-GPU and memory optimizat…
Eamon2009 May 30, 2026
6519631
Update README.md with new banner for qudtrix.cpp
Eamon2009 May 30, 2026
3b66875
docs:report [run_20260530_165216](~791 tok/s) (#60)
codeaddict-119 May 31, 2026
9c28555
docs: report [run_20260530_165216] (~791 tok/s) (#62)
Eamon2009 May 31, 2026
1d9e2da
chore: clang-format configuration file based on LLVM (#63)
codeaddict-119 May 31, 2026
f43c6b5
ci: add manual PR checks workflow with slash command support
Eamon2009 May 31, 2026
6facc3e
ci: add manual PR checks workflow with slash command support
Eamon2009 May 31, 2026
ac58214
ci: add manual PR checks workflow with slash command support
Eamon2009 May 31, 2026
40b8bd9
feat(cuda): add attention forward backward kernel declarations (#64)
Eamon2009 May 31, 2026
4aac832
feat(cuda): add checkpoint metadata struct and stub functions
Eamon2009 Jun 1, 2026
4769605
feat(cuda): introduce core type definitions and error handling utilities
Eamon2009 Jun 1, 2026
7c94958
feat(cuda): add TokenBatchView struct and DataLoader stub class
Eamon2009 Jun 1, 2026
c62c869
feat(cuda): add GeLU activation forward and backward declarations
Eamon2009 Jun 1, 2026
28117dc
feat(cuda): add gradient norm calculation and clipping interfaces
Eamon2009 Jun 1, 2026
3bdf5be
feat(cuda): add LayerNorm forward and backward kernel declarations
Eamon2009 Jun 1, 2026
3dba73a
refactor(ci): organize workflow into push-triggered QA and manual doc…
Eamon2009 Jun 2, 2026
309183f
Fix formatting and update CI workflow steps
Eamon2009 Jun 2, 2026
ac39866
Enhance CI with macOS binary build and release
Eamon2009 Jun 2, 2026
99e848b
Merge branch 'master' of https://github.com/Eamon2009/Quadtrix.cpp
Eamon2009 Jun 2, 2026
e38ff85
feat(docker): add Dockerfile for frontend application
Eamon2009 Jun 2, 2026
b120ffd
feat(docker): add Dockerfile for frontend application
Eamon2009 Jun 2, 2026
9156bba
refactor(ci): remove release job from GitHub actions
Eamon2009 Jun 2, 2026
8898418
ci: add unified release and docker build workflow
Eamon2009 Jun 2, 2026
f4f3bf3
ci: add unified release and docker build workflow
Eamon2009 Jun 2, 2026
af5a207
Refactor macOS build workflow for arm64 architecture
Eamon2009 Jun 2, 2026
58f89df
Update release workflow to remove macOS x64 build
Eamon2009 Jun 2, 2026
1718c3d
perf: update execution time benchmarks in csv
Eamon2009 Jun 3, 2026
4897122
ci(docker): refactor image build workflow and add frontend job
Eamon2009 Jun 3, 2026
275ecd1
ci(docker): refactor image build workflow and add frontend job
Eamon2009 Jun 3, 2026
947c760
ci(docker): refactor image build workflow and add frontend job
Eamon2009 Jun 3, 2026
3b65553
Remove frontend job from Docker Images workflow
Eamon2009 Jun 3, 2026
1d63e8b
Update release workflow to remove s390x and add notes
Eamon2009 Jun 3, 2026
e29f1bf
feat: add local orchestration script for frontend and backend servers
Eamon2009 Jun 3, 2026
5f95d0f
chore(deps): bump actions/github-script from 7 to 9 (#71)
dependabot[bot] Jun 4, 2026
e4d3409
feat(cuda): introduce log_message utility and LogLevel enum
Eamon2009 Jun 4, 2026
71e9abe
feat(cuda): add cuBLAS handle wrapper and matmul operations
Eamon2009 Jun 4, 2026
7c9db4e
feat(cuda): implement core Tensor, TensorShape, and TensorView abstra…
Eamon2009 Jun 4, 2026
dbf79df
refactor: untie embedding and lm_head weights and to quadtrix
Eamon2009 Jun 4, 2026
7c461b8
feat(cuda): add NCCL communicator wrapper and all-reduce primitives
Eamon2009 Jun 4, 2026
c5d06b6
Update README.md with workflow badges
Eamon2009 Jun 4, 2026
e040025
kernels: add AdamW optimization kernel with stochastic rounding Intr…
Eamon2009 Jun 6, 2026
c3dc5ae
cudnn: implement cached SDPA forward graph using cuDNN frontend
Eamon2009 Jun 6, 2026
49099ae
feat(cuda): implement Packed128 memory vectorization utilities
Eamon2009 Jun 6, 2026
b41b989
feat: add distributed sharded DataLoader for binary token files
Eamon2009 Jun 6, 2026
58ab604
feat(multi-gpu): add foundational utilities for ZeRO sharding
Eamon2009 Jun 7, 2026
b91f867
feat(utils): add I/O and memory error-checking wrappers
Eamon2009 Jun 7, 2026
8110186
feat : add PyTorch-compatible Mersenne Twister random utilities
Eamon2009 Jun 7, 2026
54b727b
README : Enhance README with header and workflow badges
Eamon2009 Jun 7, 2026
9b34e36
utils:`fopenCheck`, `freadCheck`, `fwriteCheck`, `fcloseCheck`, and `…
Eamon2009 Jun 7, 2026
d45dcb9
Merge branch 'master' of https://github.com/Eamon2009/Quadtrix.cpp
Eamon2009 Jun 7, 2026
a89ab1c
mfu: add GPU specifications database and utilities for MFU estimation
Eamon2009 Jun 7, 2026
fd41e1b
Modify project title in README.md
Eamon2009 Jun 7, 2026
a20fc03
Merge branch 'exp' into master
Eamon2009 Jun 8, 2026
da9168e
Merge branch 'Eamon2009-patch-1' into master
Eamon2009 Jun 8, 2026
d5cadb6
Update README to remove image and clean up content
Eamon2009 Jun 8, 2026
5d5a763
Refactor core architecture and optimize CUDA features (#75)
codeaddict-119 Jun 8, 2026
383534f
Add CUDA kernels, optimize CI, and update documentation (#74)
codeaddict-119 Jun 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
BasedOnStyle: LLVM
IndentWidth: 6
UseTab: Never
TabWidth: 6
ContinuationIndentWidth: 6
BreakBeforeBraces: Allman
ColumnLimit: 100
PointerAlignment: Right
ReferenceAlignment: Right
SortIncludes: CaseInsensitive
IncludeBlocks: Regroup
SpaceBeforeParens: ControlStatements
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceInEmptyBlock: false
BreakConstructorInitializers: BeforeColon
ConstructorInitializerIndentWidth: 6
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
BinPackArguments: false
BinPackParameters: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortBlocksOnASingleLine: Empty
Cpp11BracedListStyle: true
SpacesInAngles: Never
12 changes: 12 additions & 0 deletions .devops/Dockerfile.dev.frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:20-alpine

WORKDIR /app

COPY frontend/package*.json ./
RUN npm ci

COPY frontend/ ./

EXPOSE 5173

CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
22 changes: 22 additions & 0 deletions .devops/Dockerfile.frontend
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:20-alpine AS build

WORKDIR /app

COPY frontend/package*.json ./
RUN npm ci

COPY frontend/ ./

ARG VITE_API_BASE_URL=/api
ENV VITE_API_BASE_URL=${VITE_API_BASE_URL}

RUN npm run build

FROM nginx:1.27-alpine AS runtime

COPY .devops/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html

EXPOSE 80

CMD ["nginx", "-g", "daemon off;"]
84 changes: 62 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: CI

on:
push:
branches: [master, dev]
workflow_dispatch:
inputs:
image:
description: "Which image to build?"
description: "Which image to build? (cpp=C++ engine, cpu=PyTorch CPU, cuda=PyTorch CUDA, all=all three)"
required: true
type: choice
options:
- cpp
- cpu
- cuda
- all
push:
push_image:
description: "Push to ghcr.io?"
required: true
default: "true"
Expand All @@ -23,10 +21,10 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_PREFIX: ghcr.io/${{ github.repository_owner }}/quadtrix

jobs:


file-integrity:
name: File integrity
if: github.event_name == 'push'
Expand All @@ -44,9 +42,9 @@ jobs:
failed=0
for f in "${files[@]}"; do
if [ -f "$f" ]; then
echo " $f"
echo "PASS: $f"
else
echo "$f MISSING"
echo "FAIL: $f -- MISSING"
failed=1
fi
done
Expand All @@ -66,8 +64,8 @@ jobs:
args: "check engine/ --ignore E501 --exit-zero"


build-cpp:
name: C++ compile check
build-binary-linux:
name: Binary (ubuntu-latest)
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
Expand All @@ -85,10 +83,43 @@ jobs:
- name: Smoke test
run: ./quadtrix --help || true

- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: quadtrix-linux-amd64
path: quadtrix
retention-days: 7


build-binary-macos:
name: Binary (macos-14)
if: github.event_name == 'push'
runs-on: macos-14
steps:
- uses: actions/checkout@v4

- name: Compile main.cpp
run: |
g++ -std=c++17 -O3 \
-I. -Iinclude \
-o quadtrix main.cpp

- name: Smoke test
run: ./quadtrix --help || true

- name: Package binary
run: tar -czf quadtrix-macos-arm64.tar.gz quadtrix

- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: quadtrix-macos-arm64
path: quadtrix-macos-arm64.tar.gz
retention-days: 7

build-cpp-image:
name: Build cpp
if: github.event_name == 'workflow_dispatch' && (inputs.image == 'cpp' || inputs.image == 'all')
name: "Build -- cpp (C++ engine - linux/amd64 + arm64)"
if: ${{ github.event_name == 'workflow_dispatch' && (inputs.image == 'cpp' || inputs.image == 'all') }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -99,8 +130,11 @@ jobs:
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Set lowercase image prefix
run: echo "IMAGE_PREFIX=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/quadtrix" >> $GITHUB_ENV

- name: Login to GHCR
if: inputs.push == 'true'
if: ${{ inputs.push_image == 'true' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -123,16 +157,16 @@ jobs:
context: .
file: .devops/Dockerfile.cpp
platforms: linux/amd64,linux/arm64
push: ${{ inputs.push == 'true' }}
push: ${{ inputs.push_image == 'true' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=cpp
cache-to: type=gha,mode=max,scope=cpp


build-cpu-image:
name: Build cpu
if: github.event_name == 'workflow_dispatch' && (inputs.image == 'cpu' || inputs.image == 'all')
name: "Build -- cpu (PyTorch CPU - linux/amd64 + arm64)"
if: ${{ github.event_name == 'workflow_dispatch' && (inputs.image == 'cpu' || inputs.image == 'all') }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -143,8 +177,11 @@ jobs:
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Set lowercase image prefix
run: echo "IMAGE_PREFIX=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/quadtrix" >> $GITHUB_ENV

- name: Login to GHCR
if: inputs.push == 'true'
if: ${{ inputs.push_image == 'true' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -167,16 +204,16 @@ jobs:
context: .
file: .devops/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ inputs.push == 'true' }}
push: ${{ inputs.push_image == 'true' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=cpu
cache-to: type=gha,mode=max,scope=cpu


build-cuda-image:
name: Build cuda
if: github.event_name == 'workflow_dispatch' && (inputs.image == 'cuda' || inputs.image == 'all')
name: "Build -- cuda (PyTorch CUDA - linux/amd64 only)"
if: ${{ github.event_name == 'workflow_dispatch' && (inputs.image == 'cuda' || inputs.image == 'all') }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -186,8 +223,11 @@ jobs:

- uses: docker/setup-buildx-action@v3

- name: Set lowercase image prefix
run: echo "IMAGE_PREFIX=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/quadtrix" >> $GITHUB_ENV

- name: Login to GHCR
if: inputs.push == 'true'
if: ${{ inputs.push_image == 'true' }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -210,8 +250,8 @@ jobs:
context: .
file: .devops/Dockerfile.backend
platforms: linux/amd64
push: ${{ inputs.push == 'true' }}
push: ${{ inputs.push_image == 'true' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=cuda
cache-to: type=gha,mode=max,scope=cuda
cache-to: type=gha,mode=max,scope=cuda
Loading
Loading