Skip to main content

cu3GPPChan Python Bindings

Python interface to the GPU-accelerated cu3gppchan C++/CUDA library via nanobind.

Prerequisites

Component Version
Python 3.10+
CUDA Toolkit 12.x+
GPU SM 8.0+ (Ampere / Hopper)
numpy any
h5py any
pyyaml any
cupy (optional) cupy-cuda13x — required for StatisticalChannel and FadingChannel

The wheel build invokes the repo CMake project and packages both _cu3gppchan*.so and libchanModels.so into the wheel. The target machine must still provide the CUDA driver/runtime and system libraries such as HDF5.

Build a Wheel

# From the repository root:
bash scripts/build_wheel.sh --clean

# Install the generated wheel
python3 -m pip install dist/cu3gppchan-*.whl

# Verify import and basic config construction
python3 scripts/use_python_wheel.py

Set CUDA architectures with:

CU3GPPCHAN_CUDA_ARCHS="80;90" bash scripts/build_wheel.sh --clean

For editable development:

bash scripts/build.sh --python
python3 -m pip install -e python/

Verify:

import cu3gppchan
print(cu3gppchan.__version__)  # 0.1.1

Wheel smoke tests

The build smoke-tests each wheel with python/tests/test_wheel_smoke.py:

  • Tier 1 (import + config construction) runs everywhere.
  • Tier 2 (FadingChannel / StatisticalChannel GPU runs) auto-skips when no cupy/CUDA device is present.

Run manually against an installed wheel:

pip install "cu3gppchan[test]"
pytest python/tests/test_wheel_smoke.py -v

Package Structure

python/
  pyproject.toml
  src/cu3gppchan/
    __init__.py              Public API re-exports
    _cu3gppchan*.so          nanobind C++ extension (built by CMake)
    libchanModels.so         bundled runtime library used by the extension
    statistical_channel.py   StatisticalChannel — system-level SLS wrapper
    fading_channel.py        FadingChannel — link-level TDL/CDL wrapper
    channel_config.py        TdlChannelConfig / CdlChannelConfig
    channel_api_ref.py       3GPP TR 38.901 reference data
    cuda_utils.py            CUDA stream and array helpers

API Overview

Low-Level Bindings (no CuPy needed)

These are direct nanobind wrappers of C++ classes. Use when you manage GPU memory yourself or only need configuration objects.

Class Description
SimConfig Simulation parameters (frequency, bandwidth, run mode)
SystemLevelConfig Scenario, topology (sites, sectors, UTs)
LinkLevelConfig Fading type, delay profile, mobility
ExternalConfig External cell/UT/antenna configuration
TdlConfig / TdlChan TDL channel config and engine
CdlConfig / CdlChan CDL channel config and engine
StatisChanModel System-level stochastic channel engine
GauNoiseAdder AWGN noise on GPU
OfdmModulate / OfdmDeModulate OFDM mod/demod
Scenario Enum: UMa, UMi, RMa, etc.

High-Level Wrappers (require CuPy)

These provide a Pythonic interface with CuPy array I/O and automatic GPU memory management.

StatisticalChannel — System-Level Channel

from cu3gppchan import (
    StatisticalChannel, SimConfig, SystemLevelConfig,
    LinkLevelConfig, ExternalConfig, Scenario,
)

sim_cfg = SimConfig(center_freq_hz=3.5e9, bandwidth_hz=100e6, run_mode=1)
sys_cfg = SystemLevelConfig(scenario=Scenario.UMa, n_site=1, n_ut=10)
link_cfg = LinkLevelConfig(fast_fading_type=2)  # CDL
ext_cfg = ExternalConfig()

chan = StatisticalChannel(sim_cfg, sys_cfg, link_cfg, ext_cfg)

# Run one TTI
chan.run(ref_time=0.0)

FadingChannel — Link-Level TDL / CDL

from cu3gppchan import FadingChannel, TdlChannelConfig

config = TdlChannelConfig(
    n_cell=1, n_ue=1,
    n_bs_ant=4, n_ue_ant=4,
    delay_profile='A',
    delay_spread_ns=30,
    max_doppler_hz=5,
    sc_spacing_hz=30e3,
)

chan = FadingChannel(config)
rx_signal = chan.run(tx_signal, ref_time=0.0, snr_db=20.0)

Configuration Classes

Class Description
TdlChannelConfig TDL channel parameters (profiles A–E, delay spread, Doppler)
CdlChannelConfig CDL channel parameters (antenna arrays, spatial correlation)
CellParam Per-cell parameters (position, antenna panel)
UtParamCfg Per-UT parameters (position, velocity, type)
AntPanelConfig Antenna panel geometry [M_g, N_g, M, N, P] per TR 38.901

Enums

Enum Values
Scenario UMa, UMi, RMa, InH, InF
SensingTargetType ISAC target types
UeType UE mobility types

Running Tests

# Static analysis (flake8 / pylint / mypy)
bash tests/run_static_tests.sh

# Python unit tests
bash tests/run_unit_tests.sh --python_only

Dependencies

Required (installed automatically by pip install):

  • numpy
  • h5py
  • pyyaml

Optional:

  • cupy-cuda13x — for StatisticalChannel, FadingChannel, and GPU array wrappers

License

Apache-2.0. See file headers for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cu3gppchan-0.1.3-cp314-cp314t-manylinux_2_34_x86_64.whl (57.1 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.34+ x86-64

cu3gppchan-0.1.3-cp312-abi3-manylinux_2_34_x86_64.whl (57.1 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.34+ x86-64

cu3gppchan-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl (57.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

cu3gppchan-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl (57.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file cu3gppchan-0.1.3-cp314-cp314t-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: cu3gppchan-0.1.3-cp314-cp314t-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 57.1 MB
  • Tags: CPython 3.14t, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cu3gppchan-0.1.3-cp314-cp314t-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 43ae62621f819e13cdd81288c8e4200e1c61107c36195c5d440917d92cc58597
MD5 e06671a417083ffc93a9230720ac67f0
BLAKE2b-256 6b5d951cf79c947c1d1fc6ce8040b2d54c708c1bbc2b5ee6063bdef077fdc08b

See more details on using hashes here.

File details

Details for the file cu3gppchan-0.1.3-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: cu3gppchan-0.1.3-cp312-abi3-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 57.1 MB
  • Tags: CPython 3.12+, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cu3gppchan-0.1.3-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0d4a58511ae22201a416f1928d45304a2a1bfddf9e9d07caa0211cc0778243d4
MD5 4ce285ae99322efb0cb9b0382ed3a361
BLAKE2b-256 5542e222bc8e7387b24429ac1f18ac72db09cb530886a96496022d8bcd768866

See more details on using hashes here.

File details

Details for the file cu3gppchan-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: cu3gppchan-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 57.1 MB
  • Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cu3gppchan-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2288c620c254e2a47d0e816425e800b427fadbfa5be9444f5adb85ec79bc2ad1
MD5 a1fd0dcf3ed181cae6ca744f4f3fdf6d
BLAKE2b-256 b5d0d1463c1614d01e8ec068764bba0019be0e9de7bb961ee98bc2d649eaf984

See more details on using hashes here.

File details

Details for the file cu3gppchan-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: cu3gppchan-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 57.1 MB
  • Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cu3gppchan-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 90c6710200de5b28f4181af4e8d7f0053162c755f7f7a6e5c7204c8a60e78cfd
MD5 fe7558de455b59a7ddb022d04a530fd1
BLAKE2b-256 f38867d8987ecdccf0d59f77f04fa9944f0ecad625002316fb1608b2fbde3948

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.4

3 files

This release

0.1.3 This release

4 files

0.1.2

6 files

0.1.1

7 files

0.1.0

5 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page