Start here
Getting started
Requirements
The current main branch requires:
- Python 3.10 or newer;
- Linux or a Linux-like CUDA development environment;
- an NVIDIA GPU, driver, and CUDA Toolkit with
nvcc; - a C++17 compiler and Python development headers;
- Eigen 3 headers at
/usr/include/eigen3; - Python build dependencies: Setuptools, Wheel, Cython, NumPy, PyCUDA, and PyMetis.
GPU target: generated build commands currently use
sm_89. A different GPU architecture requires changing the hard-coded -arch=sm_89 flags in YASPS before JIT compilation.
On Debian or Ubuntu, install the host tools and Eigen with:
sudo apt-get update
sudo apt-get install build-essential python3-dev libeigen3-dev
Install from the repository
Clone YASPS, enter the Python package directory, and install it into an isolated environment:
git clone https://github.com/txstc55/yasps.git
cd yasps/yasps
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install .
Verify CUDA and the package
Run this where the NVIDIA GPU is visible:
python - <<'PY'
import pycuda.autoinit
import pycuda.driver as cuda
import yasps
print("CUDA device:", cuda.Device(0).name())
print("YASPS package:", yasps.__file__)
print("YASPS import: OK")
PY
The command should print the device name, the installed package path, and YASPS import: OK.