Skip to content

About

πŸ”₯ AI agent that ports CUDA code to AMD ROCm using local LLMs β€” FastAPI + React + Ollama | Live: rocmporter-agent.vercel.app

Topics

Resources

Stars

47 stars

Watchers

3 watching

Forks

Latest commit

Β 

History

68 Commits

Folders and files

Repository files navigation

⚑ ROCmPorter ⚑

Break free from CUDA lock-in. Ship on AMD in minutes.

ROCmPorter scans any GitHub repository for NVIDIA / CUDA dependencies, scores its AMD ROCm readiness with line-level evidence, and opens a pull request that migrates your code β€” automatically.


ROCmPorter scanning a CUDA repository and generating an AMD ROCm migration report

Live App Β  ROCm Ready

ROCm compile validation License: MIT FastAPI React Deploy PRs Welcome

πŸš€ Try the live app Β· ✨ Features Β· πŸ”§ How it works Β· πŸ€– Use in CI Β· πŸ’¬ Roadmap


🎯 Why ROCmPorter exists

A massive amount of GPU code is locked to NVIDIA CUDA β€” nvcc in the build, cudaMalloc in the kernels, torch.cuda everywhere, NVIDIA-only Docker images. That lock-in is expensive: NVIDIA GPUs cost more and are harder to get, while AMD GPUs (via ROCm) are often cheaper and more available.

The catch? Porting CUDA β†’ ROCm today means reading the entire repo by hand and rewriting every NVIDIA-specific line. Most teams never do it. So they stay stuck.

ROCmPorter automates the painful 90%:

Point it at a repo β†’ get evidence-backed findings and a readiness score β†’ generate verified ROCm patches β†’ open a migration pull request β€” in minutes, not months.



✨ Features

πŸ” Evidence-driven scans Every finding cites the exact file, line, and code snippet. No hand-waving β€” proof you can click.
πŸ“Š ROCm readiness score A 0–100 portability score + risk level + migration checklist for any repository.
πŸ€– Hybrid hipify + AI patches A deterministic CUDAβ†’HIP mapping pass converts the mechanical majority with zero AI; the model only handles the semantic remainder β€” with per-file provenance.
πŸ“š Docs-grounded AI The AI remainder is grounded in a curated ROCm migration knowledge base (warp-size 64, cuDNNβ†’MIOpen, rocThrust, torch-on-ROCm semantics…) β€” facts, not vibes.
πŸ§ͺ ROCm compile validation Migrated code is compile-checked with real hipcc in AMD's official ROCm container in CI β€” see the guide.
🧩 VS Code extension CUDA lock-in underlined as you code, HIP equivalents on hover, quick fixes, and one-click file hipify β€” vscode-extension/.
πŸš€ One-click Migration PRs Migrates every flagged file and opens a pull request on your repo. The moat feature.
βœ… Verify before apply Syntax checks, drift detection, artifact hashes, and diff replay before anything touches your code.
πŸ™ GitHub-native Sign in with GitHub, scan public and private repos, get PR-ready review artifacts.
πŸ“¦ Audit-grade exports Offline HTML / JSON / Markdown / diff / checksummed zip bundles for CI and compliance.
🏷️ CI Action + badge A GitHub Action that comments readiness on every PR, plus a live ROCm ready README badge.

πŸ”§ How it works

flowchart LR
    A["πŸ“ GitHub repo"] --> B["πŸ” Scan<br/>(clone + static analysis)"]
    B --> C["πŸ“Š Evidence<br/>score Β· findings Β· lines"]
    C --> D["πŸ€– AI patches<br/>CUDA β†’ ROCm/HIP"]
    D --> E["βœ… Verify<br/>syntax Β· drift Β· replay"]
    E --> F["πŸš€ Migration PR<br/>opened on your repo"]

    style A fill:#1a1a1f,stroke:#e31837,color:#fff
    style F fill:#1a1a1f,stroke:#22a04a,color:#fff
    style C fill:#111,stroke:#00c3b8,color:#fff
Loading
  1. Scan β€” deterministic static-analysis rules clone the repo and flag CUDA/NVIDIA assumptions, citing exact evidence.
  2. Score β€” findings roll up into a ROCm portability score, risk level, and migration checklist.
  3. Patch β€” a hosted LLM drafts ROCm/HIP patches, which are syntax-checked, risk-scored, and verified with diff replay before export or apply.
  4. Ship β€” export audit bundles, post GitHub PR reviews, or open a full-repo migration pull request with one click.

πŸ€– Use it in your CI

Add a ROCm readiness comment to every pull request with one workflow file:

# .github/workflows/rocm-readiness.yml
name: ROCm readiness
on: [pull_request]
permissions:
  pull-requests: write
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: pavansai20052004-hue/rocmporter-agent@main
        # optional:
        # with:
        #   fail-below: '50'   # fail the check if readiness drops below 50

Every PR gets a live comment with the score, risk, and top findings β€” updated in place on each push.

README badge

Show your repo's latest ROCm readiness anywhere:

![ROCm ready](https://rocmporter-api.onrender.com/api/badge/OWNER/REPO)

Green β‰₯ 80 Β· amber β‰₯ 50 Β· red below. (The badge at the top of this page is live for pytorch/extension-cpp.)


πŸ–ΌοΈ See it in action

The best way to experience ROCmPorter is live. The hosted app features an animated scanning sequence, a 3D hero, a full dashboard, and one-click migration PRs.

Paste any public GitHub repository and watch it scan in real time β€” no signup required.

What you'll see:

  • πŸ” An evidence-backed report β€” every CUDA finding with its exact file, line, and snippet
  • πŸ“Š A ROCm readiness score (0–100) with risk level and a migration checklist
  • πŸ€– AI patches with a live radar-scan animation and a staged results reveal
  • πŸš€ A "Open Migration PR" button that ports the whole repo and opens a pull request

πŸ’³ Pricing

Plan Price For
Free $0 forever Unlimited public-repo scans, full reports, migration checklist, offline exports
Pro $29/mo (or β‚Ή via Razorpay) AI patches Β· one-click migration PRs Β· verify + safe apply/rollback Β· private repos
Team Custom CI/CD pipelines Β· AMD Developer Cloud validation Β· shared bundles & seats

Payments via Stripe (global) or Razorpay (India β€” UPI, cards, netbanking). Card details never touch our servers.


🧱 Tech stack

  • Frontend β€” React 19 + Vite, React Router, a custom dark design system with 3D/motion (no heavy libraries). Hosted on Vercel.
  • Backend β€” FastAPI (Python), deterministic static-analysis engine, git cloning, hosted-LLM patch generation. Hosted on Render.
  • Auth + DB β€” Supabase (GitHub + Google OAuth, Postgres, row-level security).
  • AI β€” pluggable provider (OpenAI / Groq / OpenRouter / Together / DeepSeek / Anthropic, or local Ollama for dev).
  • Payments β€” Stripe + Razorpay.
frontend/   React app (landing, auth, dashboards, scanner)
backend/    FastAPI API (scan, patch, migrate, billing, badge)
action.yml  GitHub Action (PR readiness comments)
supabase/   Database schema

πŸš€ Deployment

ROCmPorter is a two-part app: the frontend (Vercel) and the backend (Render β€” it needs a real server for git + scanning; it cannot run on serverless).

See DEPLOY.md for the full runbook and SETUP.md for enabling auth, GitHub/Google login, and payments.

πŸ’» Run locally

# Backend (FastAPI)
cd backend
python -m venv .venv && .venv/Scripts/pip install -r requirements.txt
.venv/Scripts/python -m uvicorn app.main:app --reload --port 8000

# Frontend (Vite)
cd frontend
npm install
npm run dev

For local AI patches, run Ollama with a coding model; or set LLM_PROVIDER + LLM_API_KEY to use a hosted model. Full config in backend/.env.example.


πŸ’¬ Roadmap

  • Evidence-backed CUDA scans + readiness score
  • AI single-file ROCm patches with verification
  • GitHub + Google auth, private-repo scanning
  • One-click full-repo Migration PRs
  • GitHub Action + live readiness badge
  • Stripe + Razorpay billing
  • Hybrid migration engine β€” deterministic hipify pass first, AI only for the semantic remainder (per-file "N deterministic + AI remainder" provenance)
  • ROCm compile validation β€” hipcc checks in AMD's official container on every PR (guide)
  • VS Code extension β€” inline CUDA lock-in diagnostics, HIP hovers, one-click hipify (vscode-extension/)
  • Docs-grounded patches β€” AI remainder grounded in a curated CUDAβ†’HIP knowledge base (18 API-family notes, deterministic retrieval)
  • Cross-file migration context β€” migration PRs read local headers for consistency, up to 10 files per PR
  • GPU execution validation on AMD Developer Cloud (self-hosted runner receipt)
  • Team workspaces & shared audit history

🀝 Contributing

Issues and PRs are welcome. Found CUDA that ROCmPorter missed? Open an issue with the repo and file.

πŸ“„ License

MIT Β© 2026 GJV Pavansai


Built for the AMD ecosystem β€” helping the world escape CUDA lock-in.

About

πŸ”₯ AI agent that ports CUDA code to AMD ROCm using local LLMs β€” FastAPI + React + Ollama | Live: rocmporter-agent.vercel.app

Topics

Resources

Stars

47 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages