fastvideo.v1.platforms.cuda
#
Code inside this file can safely assume cuda platform, e.g. importing pynvml. However, it should not initialize cuda context.
Module Contents#
Classes#
Functions#
Data#
API#
- class fastvideo.v1.platforms.cuda.CudaPlatformBase[source]#
Bases:
fastvideo.v1.platforms.interface.Platform
- classmethod get_attn_backend_cls(selected_backend: fastvideo.v1.platforms.interface.AttentionBackendEnum | None, head_size: int, dtype: torch.dtype) str [source]#
- abstract classmethod get_device_capability(device_id: int = 0) fastvideo.v1.platforms.interface.DeviceCapability | None [source]#
- class fastvideo.v1.platforms.cuda.NonNvmlCudaPlatform[source]#
Bases:
fastvideo.v1.platforms.cuda.CudaPlatformBase
- classmethod get_device_capability(device_id: int = 0) fastvideo.v1.platforms.interface.DeviceCapability [source]#
- class fastvideo.v1.platforms.cuda.NvmlCudaPlatform[source]#
Bases:
fastvideo.v1.platforms.cuda.CudaPlatformBase
- classmethod get_device_capability(device_id: int = 0) fastvideo.v1.platforms.interface.DeviceCapability | None [source]#
- classmethod has_device_capability(capability: tuple[int, int] | int, device_id: int = 0) bool [source]#
- fastvideo.v1.platforms.cuda.with_nvml_context(fn: collections.abc.Callable[fastvideo.v1.platforms.cuda._P, fastvideo.v1.platforms.cuda._R]) collections.abc.Callable[fastvideo.v1.platforms.cuda._P, fastvideo.v1.platforms.cuda._R] [source]#