|
Uni20
Asynchronous tensor and runtime library.
|
Scoped owner of the process-wide CUDA resource installation. More...
#include <runtime.hpp>
Public Member Functions | |
| std::optional< int > | default_device () const noexcept |
| Return the configured default CUDA device ordinal, if any. | |
| DeviceResources & | default_device_resources () const |
| Return the canonical resources for the configured default device. | |
| DeviceResources & | device_resources (int device) const |
| Return the canonical resources for an enrolled device. | |
| bool | has_device (int device) const noexcept |
| Return whether this runtime enrolled a CUDA device ordinal. | |
| Runtime & | operator= (Runtime &&)=delete |
| Runtime & | operator= (Runtime const &)=delete |
| Runtime (Runtime &&)=delete | |
| Runtime (Runtime const &)=delete | |
| ~Runtime () noexcept | |
Friends | |
| Runtime | initialize (RuntimeConfig) |
| Install and return a scoped process-wide CUDA runtime owner. | |
Scoped owner of the process-wide CUDA resource installation.
Construction installs globally discoverable per-device resources. Destruction first uninstalls lookup, then drains and destroys those resources. The owner must outlive every CUDA Tensor, buffer, task, stream, and provider-resource lease.
|
delete |
|
delete |
|
noexcept |
|
inlinenoexcept |
Return the configured default CUDA device ordinal, if any.
| DeviceResources & uni20::cuda::Runtime::default_device_resources | ( | ) | const |
Return the canonical resources for the configured default device.
| DeviceResources & uni20::cuda::Runtime::device_resources | ( | int | device | ) | const |
Return the canonical resources for an enrolled device.
|
noexcept |
Return whether this runtime enrolled a CUDA device ordinal.
|
friend |
Install and return a scoped process-wide CUDA runtime owner.
Only one installation may be active. Retain the returned object at the application startup boundary for as long as CUDA objects exist.