AMD AI Analyzer - VS Code Extension
Version: 1.7.0
Publisher: AMD
License: SEE LICENSE IN LICENSE
A Visual Studio Code extension for analyzing AI models with AMD AI Analyzer. This extension provides comprehensive tools for visualizing, analyzing, and optimizing AI workloads for AMD hardware.
Overview
The AMD AI Analyzer extension integrates AI model analysis capabilities directly into Visual Studio Code. It enables developers to:
- Analyze AI model performance and partitioning
- Visualize computation graphs (original, optimized, and mapped)
- Examine NPU operator insights and hardware timing
- View detailed performance metrics and timeline analysis
- Manage multiple analysis sessions from a unified navigator view
Features
🔍 Analysis Views
- Partition Summary: Detailed breakdown of model operators and partitioning decisions
- NPU Insights Summary: Hardware-specific operator analysis for Neural Processing Units
- Performance Summary: Comprehensive performance metrics and bottleneck identification
- Timeline View: Hardware execution timeline with timing information
📊 Graph Visualization
- Original Graph: Visualize the unmodified AI model computation graph
- Optimized Graph: View the graph after optimization passes
- Mapped Graph: See how operations map to hardware accelerators
- Partition Graph: Understand model partitioning across execution targets
🎯 Workspace Integration
- Context Menu Integration: Right-click folders in the Explorer to analyze with AI Analyzer
- Navigator Tree View: Dedicated sidebar for managing analysis sessions and reports
- Multi-folder Support: Analyze multiple model folders simultaneously
- Session Persistence: Maintain analysis state across VS Code sessions
🛠️ Development Features
- Output Logging: Comprehensive logs in dedicated output channel
- Environment Configuration: Flexible Python environment setup
- Auto Port Management: Automatic port allocation for analyzer backend (8000-8100)
- Internal Mode: Development flag (
AI_ANALYZER_INTERNAL) for extended debugging
Requirements
System Requirements
- VS Code Version: 1.102.0 or higher
- Operating System: Linux, macOS, or Windows
- Python Environment: Python 3.12 with AMD AI Analyzer package installed
Python Environment Setup
RyzenAI
https://ryzenai.docs.amd.com/en/latest/inst.html
Ryzen AIAnalyzer
https://ryzenai.docs.amd.com/en/latest/ai_analyzer.html
The extension requires a Python environment with the aianalyzer package installed. The environment should be accessible via:
- Conda environment activation script
- Virtual environment activation script
- Direct Python executable path
Configuration
Extension Settings
This extension contributes the following settings:
aianalyzer.activateScript
e.g., /proj/aiebuilds/ryzen-ai/ryzen-ai-TA/main/ryzenai_main_daily_latest/lnx64/bin/activate
- Type:
string
- Default: ``
- Description: Path to the activation script for AI Analyzer Python environment
First-Time Setup
- Open VS Code Command Palette (
Ctrl+Shift+P or Cmd+Shift+P)
- Run command: AI Analyzer: Select Environment Folder
- Browse to your Python environment folder containing the
aianalyzer package
- The extension will validate and configure the environment
Usage
Analyzing a Folder
- Right-click any folder in the VS Code Explorer
- Select "Open in AI Analyzer"
- The analyzer will launch and populate the AI Analyzer view
Method 2: Navigator View
- Click the AI Analyzer icon in the Activity Bar (left sidebar)
- Click the "Open Folder" button (folder icon in view title)
- Select a folder to analyze
Viewing Reports
Once analysis completes, reports appear in the AI Analyzer navigator tree:
- Expand the folder node to see available reports
- Click any report to open it in the editor
- Multiple reports can be open simultaneously
Available Commands
Access these commands via Command Palette (Ctrl+Shift+P):
- AI Analyzer: Open Folder - Manually select a folder to analyze
- AI Analyzer: Show AI Analyzer View - Open the navigator sidebar
- AI Analyzer: Show Logs - View extension output logs
- AI Analyzer: Select Environment Folder - Configure Python environment
- AI Analyzer: Debug Environment - Display environment variable diagnostics
Navigator View Features
- Refresh: Reload the tree view (refresh icon in title bar)
- Close Folder: Remove a folder from analysis (close icon on folder nodes)
- Active Report Tracking: Currently open report is highlighted in the tree
Known Issues
- Port 8000 must be available or within range 8000-8100
- Large model analyses may take several minutes to complete
- Webview state is not persisted between VS Code restarts
Release Notes
Version 1.7.0
- Enhanced logging and debugging capabilities
- Improved environment configuration workflow
Contributing
This extension is developed by AMD. For issues, feedback, or contributions, please contact the development team.
License
See LICENSE file for details.
Enjoy analyzing your AI models with AMD AI Analyzer! 🚀