mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-21 17:57:24 -05:00
Run quartodoc build against the refactored package (engine/ extracted from core/, infra->infrastructure): regenerate the API reference so every stub points at the new paths. Adds engine.*/infrastructure.* stubs, removes the 41 stale core.solver.* / core.engine.* / core.scenarios.* / core.config.* / core.evaluation.* / infra*.qmd orphans, and refreshes the package pages (core now primitives-only) + index. Verified: all 47 documented symbols resolve in the new package; every index link resolves; zero stale mlsysim.core.<engine-mod> / mlsysim.infra references anywhere in docs/. (objects.json inventory is gitignored -- regenerated at build.)
54 lines
2.2 KiB
Plaintext
54 lines
2.2 KiB
Plaintext
# engine.solver.TransformationModel { #mlsysim.engine.solver.TransformationModel }
|
|
|
|
```python
|
|
engine.solver.TransformationModel()
|
|
```
|
|
|
|
Quantifies the CPU preprocessing bottleneck (Wall 9: Transformation).
|
|
|
|
This model simulates the 'Transformation Wall' — the gap between CPU-bound
|
|
data preprocessing (JPEG decode, tokenization, augmentation) and
|
|
accelerator step time. When preprocessing cannot keep up, the accelerator
|
|
starves and utilization drops.
|
|
|
|
Literature Source:
|
|
1. Mohan et al. (2022), "Analyzing and Mitigating Data Bottlenecks in
|
|
Deep Learning Training."
|
|
2. Murray et al. (2021), "tf.data: A Machine Learning Data Processing
|
|
Framework." (Pipeline stall analysis.)
|
|
3. NVIDIA DALI Documentation (2024). (GPU-accelerated preprocessing.)
|
|
|
|
## Methods
|
|
|
|
| Name | Description |
|
|
| --- | --- |
|
|
| [solve](#mlsysim.engine.solver.TransformationModel.solve) | Solves for CPU preprocessing bottleneck. |
|
|
|
|
### solve { #mlsysim.engine.solver.TransformationModel.solve }
|
|
|
|
```python
|
|
engine.solver.TransformationModel.solve(
|
|
batch_size,
|
|
sample_size_bytes,
|
|
cpu_throughput,
|
|
accelerator_step_time,
|
|
)
|
|
```
|
|
|
|
Solves for CPU preprocessing bottleneck.
|
|
|
|
#### Parameters {.doc-section .doc-section-parameters}
|
|
|
|
| Name | Type | Description | Default |
|
|
|-----------------------|----------|-------------------------------------------------------------|------------|
|
|
| batch_size | int | Number of samples per batch. | _required_ |
|
|
| sample_size_bytes | Quantity | Size of one sample in bytes (e.g., Q_("500 KB")). | _required_ |
|
|
| cpu_throughput | Quantity | CPU preprocessing throughput (e.g., Q_("2 GB/s")). | _required_ |
|
|
| accelerator_step_time | Quantity | Time for one accelerator training step (e.g., Q_("50 ms")). | _required_ |
|
|
|
|
#### Returns {.doc-section .doc-section-returns}
|
|
|
|
| Name | Type | Description |
|
|
|--------|------------------|-----------------------------------------------------------------|
|
|
| | Dict\[str, Any\] | Transform time, bottleneck status, and accelerator utilization. |
|