cuda.core.experimental API Reference

All of the APIs listed (or cross-referenced from) below are considered experimental and subject to future changes without deprecation notice. Once stablized they will be moved out of the experimental namespace.

CUDA runtime

Device([device_id])

Represent a GPU and act as an entry point for cuda.core features.

launch(kernel, config, *kernel_args)

Launches a Kernel object with launch-time configuration.

EventOptions([enable_timing, ...])

Customizable Event options.

StreamOptions([nonblocking, priority])

Customizable Stream options.

LaunchConfig([grid, block, stream, shmem_size])

Customizable launch options.

CUDA compilation toolchain

Program(code, code_type)

Represent a compilation machinery to process programs into ObjectCode.

Linker(*object_codes[, options])

Represent a linking machinery to link one or multiple object codes into ObjectCode with the specified options.

LinkerOptions(arch[, max_register_count, ...])

Customizable Linker options.

CUDA system information

cuda.core.experimental.system.driver_version

Query the CUDA driver version.

Returns

tuple of int

A 2-tuple of (major, minor) version numbers.

cuda.core.experimental.system.num_devices

Query the number of available GPUs.

Returns

int

The number of available GPU devices.

cuda.core.experimental.system.devices

Query the available device instances.

Returns

tuple of Device

A tuple containing instances of available devices.

Utility functions

args_viewable_as_strided_memory(...)

Decorator to create proxy objects to StridedMemoryView for the specified positional arguments.

StridedMemoryView([obj, stream_ptr])

A dataclass holding metadata of a strided dense array/tensor.