> Documentation Index
> Fetch the complete documentation index at: https://docs.mobilint.com/compiler/en/v0.12.0.0/llms.txt
> Use this file to discover all available pages before exploring further.
> Append index.md to any page URL for its Markdown.
> All Mobilint manuals: https://docs.mobilint.com/llms.txt

# qubee.configs.resource\_management\_config

## ResourceManagementConfig

```python
class ResourceManagementConfig(ConfigABC)
```

Configuration for resource management during model compilation.

### Attributes

| Name | Description |
| --- | --- |
| [`optional`](<#resourcemanagementconfig-optional>) |  |
| [`DEFAULTS`](<#resourcemanagementconfig-defaults>) |  |
| [`py_to_cpp_name`](<#resourcemanagementconfig-py-to-cpp-name>) |  |
| [`min_max_check`](<#resourcemanagementconfig-min-max-check>) |  |
| [`weight_memory_methods`](<#resourcemanagementconfig-weight-memory-methods>) |  |

#### optional

```python
optional = False
```

#### DEFAULTS

```python
DEFAULTS = {
    "weight_dtype": "float32",
    "use_gpu_only_for_calibration": True,
    "weight_memory_method": 1,
}
```

#### py\_to\_cpp\_name

```python
py_to_cpp_name = {
    "weight_dtype": "weightDtype",
    "use_gpu_only_for_calibration": "useGPUOnlyForCalibration",
    "weight_memory_method": "weightMemoryMethod",
}
```

#### min\_max\_check

```python
min_max_check = {
    "weight_memory_method": [0, 4],
}
```

#### weight\_memory\_methods

```python
weight_memory_methods = [
    "DeleteFloat",
    "SaveFloat",
    "MoveFloat",
    "KeepFloat",
    "KeepAll",
]
```

### Methods

| Name | Description |
| --- | --- |
| [`__init__`](<#resourcemanagementconfig-init>) | Initialize the [ResourceManagementConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.resource_management_config/#resourcemanagementconfig>). |
| [`default_config`](<#resourcemanagementconfig-default-config>) |  |
| [`from_kwargs`](<#resourcemanagementconfig-from-kwargs>) |  |
| [`from_dict`](<#resourcemanagementconfig-from-dict>) | Create [ResourceManagementConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.resource_management_config/#resourcemanagementconfig>) from dictionary (JSON structure) |
| [`to_dict`](<#resourcemanagementconfig-to-dict>) |  |

#### \_\_init\_\_

```python
def __init__(
    self,
    weight_dtype: str,
    use_gpu_only_for_calibration: bool,
    weight_memory_method: int,
    optional: bool = optional,
)
```

Initialize the [ResourceManagementConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.resource_management_config/#resourcemanagementconfig>).

**Parameters**

- `weight_dtype` — str. Weight data type for calibration (e.g., "float32", "float16").
- `use_gpu_only_for_calibration` — bool. If True, use GPU only during the calibration phase.
- `weight_memory_method` — int. Weight memory management method index.  
  0: DeleteFloat - Delete float weights after quantization.  
  1: SaveFloat - Save float weights to disk.  
  2: MoveFloat - Move float weights to CPU.  
  3: KeepFloat - Keep float weights in memory.  
  4: KeepAll - Keep all weights in memory.
- `optional` — bool. Indicates whether this config is optional. Use the default value defined as a class variable.

#### default\_config

```python
def default_config(cls)
```

#### from\_kwargs

```python
def from_kwargs(cls, **kwargs)
```

#### from\_dict

```python
def from_dict(cls, config_dict: dict)
```

Create [ResourceManagementConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.resource_management_config/#resourcemanagementconfig>) from dictionary (JSON structure)

#### to\_dict

```python
def to_dict(self)
```

## Functions

| Name | Description |
| --- | --- |
| [`get_resource_management_config`](<#get-resource-management-config>) | Create [ResourceManagementConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.resource_management_config/#resourcemanagementconfig>) with partial parameters merged with defaults. |

### get\_resource\_management\_config

```python
def get_resource_management_config(**kwargs) -> ResourceManagementConfig
```

Create [ResourceManagementConfig](<https://docs.mobilint.com/compiler/en/v0.12.0.0/api/python/qubee.configs.resource_management_config/#resourcemanagementconfig>) with partial parameters merged with defaults.
