Installation#

SplineOps: Spline Operations#

SplineOps is a Python and C++-based N-dimensional signal-processing library with support for GPU computing.

Installation#

You need at least Python 3.11 to install SplineOps.

Create and activate your Python virtual environment (on Unix or MacOS)

python -m venv splineops-env
source splineops-env/bin/activate

On Windows,

python -m venv splineops-env
./splineops-env/Scripts/Activate

To deactivate the environment use

deactivate

Minimal requirement:

pip install numpy scipy matplotlib

Simply install SplineOps using pip

pip install splineops

GPU Compatibility#

You can benefit of cupy to deploy the Spline Interpolation module in SplineOps. If a specific CUDA version is required, do

pip install cupy cuda-version=12.3

Install cupy development environment in editable mode

pip install -e .[dev_cupy]

Potential other CuPy libraries (CuPy from Conda-Forge)

pip install cupy cutensor cudnn nccl

Development Environment#

Install development environment in editable mode

pip install -e .[dev]

Resize Native Backend#

The resize module uses the native CPU _lsresize extension when it is available. Set SPLINEOPS_ACCEL=never to force the Python fallback, or SPLINEOPS_ACCEL=always to require the native extension during benchmarking.

Useful benchmark entry points:

python scripts/benchmark_resize_pr.py --profile oblique-pr --output-dir /tmp/splineops_resize_pr_oblique_pr
python scripts/benchmark_resize_pr.py --output-dir /tmp/splineops_resize_pr_current
python scripts/benchmark_resize_projection_methods.py --profile standard --output-csv /tmp/splineops_projection_methods.csv
python scripts/benchmark_resize_native.py --backend both --output-csv /tmp/splineops_native.csv
python scripts/benchmark_resize_libraries.py --output-csv /tmp/splineops_libraries.csv
python scripts/summarize_resize_benchmarks.py report \
  --native /tmp/splineops_native.csv \
  --libraries /tmp/splineops_libraries.csv \
  --output /tmp/splineops_resize_report.md

For upstream PR preparation notes and interpretation guidelines, see scripts/resize_pr_readiness.md, scripts/resize_oblique_pr_brief.md, and scripts/resize_upstream_pr_description.md. For a close-out summary of the resize optimization session, see scripts/resize_session_handoff.md.