Crate rust_gpu_tools
source · [−]Expand description
Abstraction layer for OpenCL and CUDA.
Environment variables
-
RUST_GPU_TOOLS_CUSTOM_GPU
rust-gpu-tools has a hard-coded list of GPUs and their CUDA core count. If your card is not part of that list, you can add it via
RUST_GPU_TOOLS_CUSTOM_GPU
. The value is a comma separated list ofname:cores
. Example:RUST_GPU_TOOLS_CUSTOM_GPU="GeForce RTX 2080 Ti:4352,GeForce GTX 1060:1280"
Feature flags
There are two feature flags, cuda
and opencl
. By default opencl
is enabled. You can
enable both at the same time. At least one of them needs to be enabled at any time.
Modules
Macros
Creates two closures, one for CUDA, one for OpenCL for the given one.
Structs
A device that may have a CUDA and/or OpenCL GPU associated with it.
A unique identifier based on UUID of the device.
A buffer on the GPU.
The PCI-ID is the combination of the PCI Bus ID and PCI Device ID.
Enums
Which framework to use, CUDA or OpenCL.
Error types of this library.
Abstraction for running programs on CUDA or OpenCL.
Unique identifier that can either be a PCI ID or a UUID.
Currently supported vendors of this library.
Statics
The number of CUDA cores.