CoolFace
Apppublic

Darkweb007/cuda-kernels

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
App README

cuda-kernels

One Space, three tabs:

  1. 1.Push to Hub — push any local folder to a Hugging Face Hub repo (model/dataset/space) without the CLI.
  2. 2.Sliding-window attention — a from-scratch CUDA kernel, JIT-compiled and run live on this Space's GPU, benchmarked against dense PyTorch attention.
  3. 3.Kernel fusion compiler — auto-fuses y = gelu(x*w + b) into one CUDA kernel, compiles it, and runs it live against the naive 3-kernel-launch version.

Tabs 2 and 3 need an actual GPU attached to this Space. If you see "No CUDA GPU visible to this Space," switch hardware to ZeroGPU (or any CUDA GPU tier) in Settings, or run:

bash
python -c "from huggingface_hub import HfApi; HfApi().request_space_hardware('Darkweb007/cuda-kernels', 'zero-a10g')"

Tab 1 details

Push any local folder to the Hugging Face Hub (model, dataset, or Space repo) without the CLI. Built to push long-context-attention-kernels and cuda-fusion-compiler up as Hub repos.

Setup

bash
pip install -r requirements.txt

Get a token with write access from https://huggingface.co/settings/tokens.

Run

bash
python app.py

Opens a local Gradio UI at http://127.0.0.1:7860. You can either paste your token into the "HF Access Token" field each time, or set it once as an environment variable and leave the field blank:

bash
export HF_TOKEN=hf_xxxxxxxxxxxx
python app.py

Using it

  1. 1.Click Check token to confirm you're authenticated.
  2. 2.Fill in Repo ID as your-username/repo-name.
  3. 3.Pick Repo type — model for a kernels/code repo, dataset for data, space if the folder includes an app.py you want running live (Gradio Spaces auto-detect app.py + requirements.txt, so this same tool could even push itself).
  4. 4.Point Local folder to push at the absolute path of the project directory (e.g. the long-context-attention-kernels folder).
  5. 5.Click Push to Hugging Face. The repo is created if it doesn't exist (exist_ok=True, so re-running is safe and just updates it), then the whole folder is uploaded in one commit.

The log panel shows progress and the final Hub URL. .git, __pycache__, build/, and compiled .so files are excluded automatically.

Notes

  • —This never deletes anything remotely; upload_folder adds/updates files in the target repo.
  • —For very large files (model checkpoints), Hugging Face Hub uses Git LFS — upload_folder handles this automatically for files it detects as large binaries.
  • —Never commit a token into a repo. This app only ever holds it in memory for the current session.