lablab-ai-amd-developer-hackathon/Sentinel-ROCm
2
1---2title: Sentinel - ROCm3license: mit4sdk: gradio5emoji: ๐6colorFrom: green7colorTo: gray8pinned: true9short_description: 'ROCm-Sentinel, a system designed to redefine how developers '10---11<div align="center">12 <img src="https://img.shields.io/badge/AMD-ROCm-ed1c24?style=for-the-badge&logo=amd&logoColor=white" alt="AMD ROCm" />13 <img src="https://img.shields.io/badge/AI_Agent-LangGraph-000000?style=for-the-badge&logo=openai&logoColor=white" alt="LangGraph" />14 <img src="https://img.shields.io/badge/UI-Gradio-ff7c00?style=for-the-badge" alt="Gradio" />15 16 <h1>๐ ROCm-Sentinel</h1>17 <p><strong>Secure AI Agent for Automated Migration from NVIDIA CUDA to AMD ROCm (HIP)</strong></p>18</div>19 20---21 22## ๐ About the Project23 24**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.25 26It 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.27 28---29 30## ๐ฏ Goals and Vision31 321. **Democratize Hardware:** Facilitate developers and companies in migrating their workloads from closed ecosystems to open and competitive platforms like AMD.332. **Secure Migration (Zero-Leak):** Go beyond simple "find and replace". Ensure the resulting code correctly manages unified memory and threads on AMD GPUs.343. **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.35 36---37 38## ๐ง Language Models (AI Agents)39 40Our multi-agent architecture (Translator + Auditor) is powered by state-of-the-art LLMs via the Fireworks AI API.41 42* ๐ข **Current Model in Use: `DeepSeek V3.1`**43 * 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.44* โญ **Recommended Model: `Qwen2.5-Coder 32B Instruct`**45 * 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.46 47---48 49## ๐ ๏ธ Technologies Used50 51* **Python 3** - Base language.52* **Gradio** - Interactive web interface construction.53* **LangGraph & LangChain** - Agent workflow orchestration (nodes and edges).54* **Fireworks AI** - Serverless inference provider for open-source LLM models.55 56---57 58## โ๏ธ Local Installation and Usage59 60Follow these steps to deploy ROCm-Sentinel on your local machine:61 621. **Clone the repository:**63 ```bash64 git clone [https://github.com/MrZRo/ROCm-Sentinel.git](https://github.com/MrZRo/ROCm-Sentinel.git)65 cd ROCm-Sentinel66 672. **Create and activate a virtual environment:**68 ```bash69 # En Windows70 python -m venv env71 source env/Scripts/activate72 73 # En Linux/Mac74 python3 -m venv env75 source env/bin/activate76 ```77 783. **Install dependencies:**79 ```bash80 pip install -r requirements.txt81 ```82 834. **Configure credentials:**84 ```bash85 FIREWORKS_API_KEY=tu_api_key_aqui86 ```87 885. **Configurar las credenciales:**89 ```bash90 FIREWORKS_API_KEY=your_api_key_here91 ```92 936. **Run the application:**94 ```bash95 Fpython app.py96 ```