brainevent.config.set_compute_capability

brainevent.config.set_compute_capability#

brainevent.config.set_compute_capability(value=None)[source]#

Pin the target GPU compute capability for CUDA compilation.

By default brainevent auto-detects the architecture from the visible JAX GPU device (falling back to nvidia-smi). Use this to override that — for cross-compilation on a machine without a visible GPU, or to build a fat binary covering several architectures.

Parameters:

value (str | list[str] | None) – A compute capability in any common spelling ("8.6", "sm_86", "compute_86") or a list of them. None restores automatic detection.

See also

get_compute_capability

Query the current pin.

Return type:

None

Examples

>>> import brainevent
>>> brainevent.config.set_compute_capability("8.6")
>>> brainevent.config.get_compute_capability()
['sm_86']
>>> brainevent.config.set_compute_capability(["8.0", "9.0"])  # fat binary
>>> brainevent.config.set_compute_capability(None)  # back to auto-detect