A comprehensive testing suite for validating ROCm (Radeon Open Compute) functionality with Python machine learning frameworks and libraries.
This project provides a collection of tests and utilities to verify ROCm installation and compatibility with popular Python ML frameworks including PyTorch, TensorFlow, Keras, and pgmpy. It's designed to help developers ensure their ROCm setup is working correctly for GPU-accelerated machine learning workloads.
- ROCm Installation Verification: Check if ROCm is properly installed and accessible
- GPU Information Retrieval: Display detailed GPU information using
rocm-smi - Framework Testing: Test PyTorch, TensorFlow, and Keras with ROCm backend
- Bayesian Network Testing: Validate pgmpy functionality for probabilistic modeling
- Comprehensive Test Suite: Multiple test scenarios for different use cases
- AMD GPU with ROCm support
- Ubuntu 20.04/22.04 or compatible Linux distribution
- Python 3.8+ with virtual environment support
Ensure ROCm is installed on your system. Follow the official ROCm Installation Guide.
git clone <repository-url>
cd ROCMpython3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txt# Run all tests
python -m pytest src/tests/ -v
# Run specific tests
python src/tests/test_rocm.py
python src/tests/test_pytorch.py
python src/tests/test_tensorflow.pyROCM/
├── README.md # Project documentation
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
├── .github/ # GitHub workflows and templates
├── .copilot/ # GitHub Copilot configuration
├── .vscode/ # VS Code settings
├── docs/ # Additional documentation
│ ├── directions.txt # Setup instructions
│ ├── git_directions.txt # Git workflow
│ └── github_directions.txt # GitHub integration
└── src/ # Source code
├── tests/ # Test modules
│ ├── test_rocm.py # ROCm installation tests
│ ├── test_pytorch.py # PyTorch ROCm tests
│ ├── test_tensorflow.py # TensorFlow ROCm tests
│ ├── test_keras.py # Keras compatibility tests
│ ├── test_pgmpy.py # Bayesian network tests
│ ├── test_tf_help.py # TensorFlow utilities
│ └── test_torch_min.py # Minimal PyTorch test
├── tools/ # Utility tools
└── utils/ # Helper utilities
- Verifies ROCm installation
- Checks
rocm-smiavailability - Displays GPU information and status
- Tests PyTorch ROCm backend availability
- Performs tensor operations on GPU
- Validates device placement and computation
- Complete MNIST neural network training
- Tests TensorFlow with ROCm backend
- Includes detailed training process explanation
- Verifies Keras availability within TensorFlow
- Checks version compatibility
- Bayesian network construction and inference
- Demonstrates probabilistic reasoning capabilities
- Create test files in
src/tests/ - Follow the existing naming convention:
test_<framework>.py - Include proper error handling and informative output
- Update this README with test descriptions
- Fork the repository
- Create a feature branch
- Add tests and documentation
- Submit a pull request
ROCm Not Detected
- Verify ROCm installation:
/opt/rocm/bin/rocm-smi - Check GPU compatibility with ROCm
- Ensure proper driver installation
PyTorch ROCm Issues
- Install ROCm-compatible PyTorch version
- Verify PYTORCH_ROCM_ARCH environment variable
- Check GPU memory availability
Virtual Environment Issues
- Install
python3-venv:sudo apt install python3-venv - Use system Python if distribution packages conflict
- Consider using conda for complex dependency management
- Check the
docs/directory for detailed setup instructions - Review test output for specific error messages
- Consult ROCm documentation for hardware-specific issues
This project is open source. See LICENSE file for details.
- AMD ROCm team for GPU compute platform
- PyTorch and TensorFlow communities for ROCm support
- Contributors to the Python scientific computing ecosystem