Skip to content

feat: add swiglu op with NVIDIA and CPU backends#10

Merged
voltjia merged 3 commits into
feat/dev-infrafrom
feat/dev-swiglu
Mar 6, 2026
Merged

feat: add swiglu op with NVIDIA and CPU backends#10
voltjia merged 3 commits into
feat/dev-infrafrom
feat/dev-swiglu

Conversation

@bitzyz
Copy link
Copy Markdown
Contributor

@bitzyz bitzyz commented Mar 4, 2026

  1. Updated common utilities (src/common/cuda/kernel_commons.h)
  • Added CUDA block size constants
  • Added device property query functions for optimal block size selection
  • Added type aliases for cuda_bfloat16 and cuda_bfloat162
  1. Added base operator (src/base/swiglu.h)
  2. Added CUDA backend (src/cuda/swiglu/kernel.h)
  3. Added CPU backend (src/cpu/swiglu/swiglu.h)
  4. Added NVIDIA backend (src/nvidia/swiglu/kernel.h)
  5. Added tests (tests/test_swiglu.py)
  • Comprehensive test suite covering multiple shapes, strides, and data types

@bitzyz bitzyz self-assigned this Mar 4, 2026
@bitzyz bitzyz force-pushed the feat/dev-swiglu branch from 614f033 to 9316251 Compare March 5, 2026 01:43
@bitzyz bitzyz requested a review from voltjia March 5, 2026 01:43
@bitzyz
Copy link
Copy Markdown
Contributor Author

bitzyz commented Mar 5, 2026

image

Comment thread src/base/swiglu.h Outdated
Comment thread src/base/swiglu.h Outdated
Comment thread src/common/cuda/kernel_commons.h Outdated
Comment thread src/common/cuda/kernel_commons.h Outdated
Comment thread src/common/cuda/kernel_commons.h Outdated
Comment thread src/cuda/swiglu/kernel.cuh Outdated
Comment thread tests/test_swiglu.py
Comment thread tests/test_swiglu.py
Comment thread tests/test_swiglu.py Outdated
Comment thread tests/test_swiglu.py Outdated
@bitzyz bitzyz changed the title feat: add op with NVIDIA and CPU backends feat: add swiglu op with NVIDIA and CPU backends Mar 6, 2026
@bitzyz bitzyz force-pushed the feat/dev-swiglu branch 2 times, most recently from 1e9571b to 1abe108 Compare March 6, 2026 07:57
@bitzyz
Copy link
Copy Markdown
Contributor Author

bitzyz commented Mar 6, 2026

image

Comment thread src/common/cuda/kernel_commons.h Outdated
Comment thread src/common/cuda/kernel_commons.h Outdated
Comment thread src/common/cuda/kernel_commons.h
@bitzyz
Copy link
Copy Markdown
Contributor Author

bitzyz commented Mar 6, 2026

image

@bitzyz bitzyz force-pushed the feat/dev-swiglu branch from 1abe108 to fb5adb2 Compare March 6, 2026 08:32
@voltjia
Copy link
Copy Markdown
Collaborator

voltjia commented Mar 6, 2026

image

@voltjia voltjia merged commit 42f1e20 into feat/dev-infra Mar 6, 2026
@voltjia voltjia deleted the feat/dev-swiglu branch March 6, 2026 08:40
@voltjia voltjia mentioned this pull request Apr 24, 2026
78 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants