Installation Guide
This guide walks you through installing HPC-AI-Optimization-Lab on your system.
Prerequisites
Before installing, ensure your system meets the following requirements:
Hardware Requirements
- GPU: NVIDIA CUDA-capable GPU (Compute Capability 7.0+)
- Recommended: Volta (7.0), Ampere (8.0), or Hopper (9.0) architecture
- Memory: 8GB+ GPU memory recommended for large kernels
Software Requirements
- Operating System: Linux (Ubuntu 20.04+, CentOS 8+, or similar)
- CUDA Toolkit: 12.4 or later
- CMake: 3.24 or later
- Compiler: GCC 11+ or Clang 14+
- Python (optional): 3.9+ for Python bindings
Installation Methods
Method 1: Clone and Build (Recommended)
bash
# Clone the repository
git clone https://github.com/LessUp/hpc-ai-optimization-lab.git
cd hpc-ai-optimization-lab
# Create build directory
mkdir build && cd build
# Configure with CMake
cmake .. -DCMAKE_BUILD_TYPE=Release
# Build the project
cmake --build . -j$(nproc)
# Run tests (optional)
ctest --output-on-failure1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Method 2: Build with Examples
bash
# Configure with examples enabled
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_EXAMPLES=ON
# Build
cmake --build . -j$(nproc)
# Run an example
./bin/examples/relu_example1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Method 3: Build with Python Bindings
bash
# Install Python dependencies first
pip install nanobind numpy
# Configure with Python bindings
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_PYTHON_BINDINGS=ON \
-DPython_EXECUTABLE=$(which python3)
# Build
cmake --build . -j$(nproc)1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Verifying Installation
After building, verify your installation:
bash
# Run all tests
ctest --output-on-failure
# Run a specific test
./tests/elementwise/test_relu
# Check Python binding (if enabled)
python3 -c "import hpc_ai_opt; print(hpc_ai_opt.__version__)"1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
Troubleshooting
If you encounter issues:
- CUDA not found: Ensure
CUDA_HOMEorCUDA_PATHis set - CMake version too old: Install newer CMake from https://cmake.org/download/
- Compilation errors: Verify GCC 11+ or Clang 14+ is installed
- Test failures: Check GPU availability and CUDA driver version
For more help, see the Troubleshooting Guide.
Next Steps
- Follow the Quick Start Guide for your first kernel
- Explore the API Documentation
- Check out Examples