-
Install Docker:
- For Ubuntu:
sudo apt-get update && sudo apt-get install docker.io - For other systems, follow the official Docker installation guide: https://docs.docker.com/get-docker/
- For Ubuntu:
-
Pull the chipStar 'latest' image:
docker pull pveleskopglc/chipstar:latest -
Run the container:
docker run -it pveleskopglc/chipstar:latest /bin/bashThis command starts an interactive session without binding any GPUs to the container - a couple of OpenCL CPU runtimes are setup already.
-
Execute a matrix multiply sample:
CHIP_DEVICE_TYPE=cpu CHIP_BE=opencl ~/chipStar/build/samples/0_MatrixMultiply/MatrixMultiply Device name 13th Gen Intel(R) Core(TM) i9-13900K Running 1 iterations hipLaunchKernel 0 time taken: 185.903 hipLaunchKernel BEST TIME: 185.903 GPU real time taken(ms): 193.007 matrixMultiplyCPUReference time taken(ms): 2861.23 Verification PASSED!
This process will set up Docker, pull the latest chipStar image, start a container with the necessary environment, and run a sample application to verify the setup.
To run the Docker image with GPU support, follow these steps:
-
Run the Docker container with GPU support:
docker run -it --device /dev/dri/card0 --device /dev/dri/card1 \ --device /dev/dri/renderD128 --device /dev/dri/renderD129 \ --group-add 110 --group-add 44 --privileged \ -e NEOReadDebugKeys=1 -e OverrideGpuAddressSpace=48 \ pveleskopglc/chipstar:latest /bin/bashNote: For kernel 6.8+, the
NEOReadDebugKeys=1andOverrideGpuAddressSpace=48environment variables are required for Intel GPU detection. -
Unload PoCL module to expose Intel GPUs (if available):
module unload pocl/main-llvm-22.0-native -
Run a GPU-accelerated sample:
CHIP_DEVICE_TYPE=gpu CHIP_BE=opencl ~/chipStar/build/samples/0_MatrixMultiply/MatrixMultiply
This process allows you to run the chipStar Docker image with GPU support, enabling GPU-accelerated computations within the container.
- Base: Ubuntu latest
- User: 'chipStarUser' with sudo, video, render group access
- Core tools: gcc, g++, cmake, python3, git, OpenCL dev environment
- LLVM/Clang: 22.0 with the native (integrated) SPIR-V backend (
llvm/22.0-native) - Lmod: For environment module management
- POCL: Portable OpenCL implementation (built from
mainfor LLVM 22 support) - Intel OneAPI: Via Miniconda, includes MKL, TBB, DPC++
- Level Zero API: For low-level device control
Purpose: Comprehensive chipStar development environment, supporting both open-source and Intel proprietary frameworks.
This layer builds upon the base image and adds:
- Python virtual environment setup
- C++ linting tools installation
Key components:
- Python3 venv: For isolated Python environment
- clang-tools (version 0.13.0): Provides static analysis and linting capabilities for C++
- cpp-linter (version 1.10.0): A tool for linting C++ code
Purpose: Enhances the development environment with code quality tools specifically for C++ projects, enabling better code analysis and consistency checks.
This layer builds upon the base image and adds:
- Additional Python packages
- LLVM/Clang 22 (native SPIR-V backend) environment setup
- Vim common tools
- chipStar build and installation
Key components:
- PyYAML: Python package for YAML parsing
- LLVM/Clang 22 (native SPIR-V backend): Loaded via
llvm/22.0-nativemodule - Vim common: Includes 'xxd' utility
- chipStar:
- Cloned from GitHub
- Built with CMake (Release mode, HIPBLAS enabled)
- Installed system-wide
- Test suite built (for OpenCL backend, CPU device type)
Purpose: Provides a complete environment for chipStar development and testing.