Loading...
Searching...
No Matches
opennn::Configuration Class Reference
Global singleton holding the OpenNN device and precision configuration. More...
#include <configuration.h>
Classes | |
| struct | Resolved |
| Resolved configuration after Auto values are mapped to concrete device and types. More... | |
Public Member Functions | |
| void | set (Device new_device=Device::Auto, Type new_training_type=Type::Auto, Type new_inference_type=Type::Auto) |
| Updates device and precision settings; subsequent resolve() calls reflect the change. | |
| Device | get_device () const |
| Type | get_training_type () const |
| Type | get_inference_type () const |
| const Resolved & | resolve () const |
| Returns the cached resolved configuration, computing it on first access. | |
| bool | is_gpu () const |
| bool | is_cpu () const |
| bool | is_bf16_training () const |
| bool | is_bf16_inference () const |
Static Public Member Functions | |
| static Configuration & | instance () |
| Returns the process-wide Configuration singleton. | |
Detailed Description
Global singleton holding the OpenNN device and precision configuration.
Member Function Documentation
◆ get_device()
|
inlinenodiscard |
◆ get_inference_type()
|
inlinenodiscard |
◆ get_training_type()
|
inlinenodiscard |
◆ instance()
|
inlinestaticnodiscard |
Returns the process-wide Configuration singleton.
◆ is_bf16_inference()
|
inlinenodiscard |
◆ is_bf16_training()
|
inlinenodiscard |
◆ is_cpu()
|
inlinenodiscard |
◆ is_gpu()
|
inlinenodiscard |
◆ resolve()
|
inlinenodiscard |
Returns the cached resolved configuration, computing it on first access.
◆ set()
| void opennn::Configuration::set | ( | Device | new_device = Device::Auto, |
| Type | new_training_type = Type::Auto, | ||
| Type | new_inference_type = Type::Auto ) |
Updates device and precision settings; subsequent resolve() calls reflect the change.
- Parameters
-
new_device Target execution device (Auto picks CUDA when available). new_training_type Numeric type used during training. new_inference_type Numeric type used during inference.