ROCmPorter – AI-Powered CUDA to AMD ROCm Migration Agent

:high_voltage: ROCmPorter — AI-Powered CUDA to AMD ROCm Migration Agent

Hi AMD Developer Community! :waving_hand:

I’m excited to share ROCmPorter, an open-source developer tool I built to make migrating NVIDIA/CUDA-based projects to the AMD ROCm ecosystem easier, faster, and more transparent.

:red_circle: Live Demo:

:octopus: GitHub Repository:

-–

:bullseye: Why I Built ROCmPorter

A large amount of GPU software is tightly coupled to NVIDIA CUDA.

Projects often contain things like:

- “cudaMalloc”

- “cudaMemcpy”

- “torch.cuda”

- CUDA kernels

- “nvcc”

- NVIDIA-specific Docker images

- CUDA-only dependencies

- CUDA build configurations

Migrating such projects to AMD ROCm can require developers to manually inspect hundreds or thousands of lines of code.

My goal with ROCmPorter was simple:

«Give it a GitHub repository, identify CUDA lock-in, measure ROCm portability, generate migration changes, validate them, and help developers move toward AMD ROCm.»

-–

:rocket: What ROCmPorter Can Do

:magnifying_glass_tilted_left: Evidence-Driven Repository Scanning

ROCmPorter scans a GitHub repository and identifies CUDA/NVIDIA dependencies throughout the project.

Instead of giving generic warnings, every finding includes:

File → Line Number → Code Snippet → Compatibility Issue → Migration Direction

This makes every result inspectable and easier for developers to understand.

-–

:bar_chart: ROCm Readiness Score

After scanning a repository, ROCmPorter calculates a:

0–100 ROCm Readiness Score

The report also includes:

- Portability risk level

- CUDA/NVIDIA findings

- Compatibility issues

- Migration recommendations

- Migration checklist

- File-level evidence

The idea is to give developers a quick understanding of how difficult a CUDA → ROCm migration may be before they begin modifying the code.

-–

:brain: Hybrid CUDA → HIP Migration Engine

One of the most important design decisions in ROCmPorter was not relying completely on AI.

The migration pipeline combines deterministic transformations with AI-based reasoning.

Migration Flow

GitHub Repository

↓

Static Analysis

↓

ROCm Readiness Score

↓

Deterministic CUDA → HIP Conversion

↓

AI Semantic Migration

↓

Verification

↓

Migration Pull Request

Straightforward CUDA patterns are converted using deterministic mappings.

AI is used only when deeper semantic understanding is required.

This approach helps make the migration process more predictable and easier to review.

-–

:robot: AI-Assisted Migration

For CUDA code that cannot be converted through simple deterministic mappings, ROCmPorter can generate ROCm/HIP migration patches using an AI layer.

The AI migration system is designed around ROCm migration knowledge such as:

- CUDA → HIP API migration

- cuDNN → MIOpen alternatives

- rocThrust

- AMD GPU architecture considerations

- ROCm PyTorch behavior

- GPU portability issues

- Wavefront differences

Generated changes can then be inspected before being applied.

-–

:white_check_mark: Verification Before Apply

Generated migration patches go through verification steps before touching the repository.

ROCmPorter supports checks such as:

- Syntax validation

- Drift detection

- Diff verification

- Artifact hashing

- Migration replay checks

The goal is to make AI-assisted migration more auditable rather than blindly accepting generated code.

-–

:test_tube: ROCm Compile Validation

ROCmPorter also includes ROCm compile validation using:

“hipcc”

Migrated code can be compile-checked inside a ROCm environment through CI.

This moves the workflow beyond simply generating CUDA → HIP code and toward validating whether the generated code can actually compile within the ROCm toolchain.

-–

:rocket: One-Click Migration Pull Requests

After analysis and migration, ROCmPorter can generate a repository-wide migration and create a:

CUDA → ROCm Migration Pull Request

This allows developers to review the migration using a familiar GitHub workflow instead of manually copying generated code.

-–

:laptop: VS Code Extension

I also built a VS Code extension for ROCmPorter.

It can help developers identify CUDA lock-in directly while coding.

Features include:

- CUDA compatibility diagnostics

- HIP alternatives on hover

- Quick fixes

- CUDA → HIP suggestions

- One-click file hipify

The goal is to help developers think about AMD ROCm portability during development, not only after a project is finished.

-–

:gear: GitHub CI Integration

ROCmPorter can also be integrated into GitHub Actions.

Repositories can automatically receive a ROCm readiness check on pull requests.

This makes it possible to monitor whether new changes increase or decrease AMD ROCm portability over time.

-–

:label: ROCm Readiness Badge

Projects can display their current ROCm readiness score directly inside their README through a generated badge.

This could help projects communicate how portable their codebase is toward AMD GPU environments.

-–

:hammer_and_wrench: Tech Stack

Frontend

- React 19

- Vite

- React Router

Backend

- Python

- FastAPI

- Static analysis engine

- Git repository analysis

AMD / GPU

- AMD ROCm

- HIP

- “hipcc”

- CUDA → HIP migration logic

AI

- Pluggable LLM migration layer

- ROCm migration knowledge base

Authentication & Database

- Supabase

- PostgreSQL

- GitHub OAuth

- Google OAuth

Developer Integration

- GitHub Actions

- VS Code Extension

Deployment

- Vercel

- Render

-–

:globe_with_meridians: Try It Live

You can test ROCmPorter with a public GitHub repository here:

Paste a repository URL and ROCmPorter will analyze the project and generate its ROCm readiness report.

-–

:laptop: Source Code

The entire project is availablable at the above top of my post

The project is open source under the MIT License.

-–

:crystal_ball: What I Want to Build Next

The next major goal for ROCmPorter is:

Real AMD GPU Execution Validation

Currently, ROCmPorter can analyze, migrate, verify, and perform ROCm compile validation.

The next step is to validate migrated projects by actually executing them on AMD GPU infrastructure.

Other ideas on the roadmap include:

- More CUDA API coverage

- Better cross-file migration reasoning

- Expanded ROCm compatibility rules

- More advanced CI validation

- AMD Developer Cloud integration

- Runtime performance comparison

- Team migration workflows

-–

:speech_balloon: Feedback From the AMD Community

This project is still evolving, and I would genuinely appreciate feedback from developers working with:

ROCm, HIP, AMD GPUs, CUDA migration, PyTorch on ROCm, GPU tooling, or HPC workloads.

I would especially love to hear about:

- CUDA migration edge cases ROCmPorter should detect

- Important ROCm compatibility rules I may be missing

- Better ways to validate generated HIP code

- Additional AMD tooling that could be integrated

- Real-world CUDA repositories worth testing

Contribution :heart:

Built for the AMD ROCm ecosystem. :rocket:

Hello, the README in the repo says deterministic hipify pass first, AI for the remainder, which is the right shape. What it never says is whether that pass is actual HIPIFY from ROCm or your own mapping table. That matters a lot for how people judge coverage, since hipify-clang does real semantic translation through Clang and can dump its full supported CUDA API list, and hand-rolled tables drift from it fast. Worth one line in the README either way. One other thing, the post says MIT and open source but leaves out that AI patches, migration PRs and private repos are on the 29 dollar Pro tier. In my opinion its much better to say it yourself than have someone find the pricing page.