| --- |
| title: Sentinel - ROCm |
| license: mit |
| sdk: gradio |
| emoji: π |
| colorFrom: green |
| colorTo: gray |
| pinned: true |
| short_description: 'ROCm-Sentinel, a system designed to redefine how developers ' |
| --- |
| <div align="center"> |
| <img src="https://img.shields.io/badge/AMD-ROCm-ed1c24?style=for-the-badge&logo=amd&logoColor=white" alt="AMD ROCm" /> |
| <img src="https://img.shields.io/badge/AI_Agent-LangGraph-000000?style=for-the-badge&logo=openai&logoColor=white" alt="LangGraph" /> |
| <img src="https://img.shields.io/badge/UI-Gradio-ff7c00?style=for-the-badge" alt="Gradio" /> |
| |
| <h1>π ROCm-Sentinel</h1> |
| <p><strong>Secure AI Agent for Automated Migration from NVIDIA CUDA to AMD ROCm (HIP)</strong></p> |
| </div> |
|
|
| --- |
|
|
| ## π About the Project |
|
|
| **ROCm-Sentinel** is an AI-assisted tool designed to break vendor lock-in in hardware-accelerated software development. Using an Agentic Workflow, the application takes native NVIDIA CUDA code and automatically translates it to AMD HIP (Heterogeneous-Compute Interface for Portability), ensuring a smooth transition into the AMD ROCm ecosystem. |
|
|
| It acts as more than just a syntactic translator; it incorporates an autonomous **Security Auditor** that reviews the generated code for memory leaks, parallelism issues, and architecture-specific optimizations for AMD. |
|
|
| --- |
|
|
| ## π― Goals and Vision |
|
|
| 1. **Democratize Hardware:** Facilitate developers and companies in migrating their workloads from closed ecosystems to open and competitive platforms like AMD. |
| 2. **Secure Migration (Zero-Leak):** Go beyond simple "find and replace". Ensure the resulting code correctly manages unified memory and threads on AMD GPUs. |
| 3. **Interactive Workflow:** Provide a user-friendly interface where the developer acts as a supervisor (Human-in-the-Loop), guiding the agent through real-time chat. |
|
|
| --- |
|
|
| ## π§ Language Models (AI Agents) |
|
|
| Our multi-agent architecture (Translator + Auditor) is powered by state-of-the-art LLMs via the Fireworks AI API. |
|
|
| * π’ **Current Model in Use: `DeepSeek V3.1`** |
| * The project is currently configured to run on DeepSeek V3.1, a highly capable model with exceptional logical reasoning and lightning-fast response times for interactive demonstration. |
| * β **Recommended Model: `Qwen2.5-Coder 32B Instruct`** |
| * For production environments and complex code repositories, we **strongly recommend** switching the configuration to the Qwen 2.5 Coder model. Being trained specifically on deep programming syntax, it offers superior fidelity when translating pointers and complex C++/CUDA directives. |
|
|
| --- |
|
|
| ## π οΈ Technologies Used |
|
|
| * **Python 3** - Base language. |
| * **Gradio** - Interactive web interface construction. |
| * **LangGraph & LangChain** - Agent workflow orchestration (nodes and edges). |
| * **Fireworks AI** - Serverless inference provider for open-source LLM models. |
|
|
| --- |
|
|
| ## βοΈ Local Installation and Usage |
|
|
| Follow these steps to deploy ROCm-Sentinel on your local machine: |
|
|
| 1. **Clone the repository:** |
| ```bash |
| git clone [https://github.com/MrZRo/ROCm-Sentinel.git](https://github.com/MrZRo/ROCm-Sentinel.git) |
| cd ROCm-Sentinel |
| |
| 2. **Create and activate a virtual environment:** |
| ```bash |
| # En Windows |
| python -m venv env |
| source env/Scripts/activate |
| |
| # En Linux/Mac |
| python3 -m venv env |
| source env/bin/activate |
| ``` |
| |
| 3. **Install dependencies:** |
| ```bash |
| pip install -r requirements.txt |
| ``` |
| |
| 4. **Configure credentials:** |
| ```bash |
| FIREWORKS_API_KEY=tu_api_key_aqui |
| ``` |
|
|
| 5. **Configurar las credenciales:** |
| ```bash |
| FIREWORKS_API_KEY=your_api_key_here |
| ``` |
|
|
| 6. **Run the application:** |
| ```bash |
| Fpython app.py |
| ``` |