Skip to main content

KernelShareScenario

Training scenarios · Implementation: mlsysim/engine/scenario_definitions/training.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

One kernel class’s multiply-adds against a whole model’s, per example.

Notes

Equation: Kernel share is kernel_macs/total_macs for the same example.

Assumptions: Both counts use the same MAC convention and the total is nonzero.

Excludes: Latency attribution and memory traffic; an operation share is not a runtime share.

References

Derivation: The kernel MAC count is a subset of total model MACs for the same example. Their ratio is an accounting fraction; converting that fraction into elapsed-time attribution would additionally require execution and memory information.

Examples

>>> from mlsysim import Scenarios
>>> s = Scenarios.ResNet50ConvKernelShare
>>> 0 <= s.share <= 1
True

Attributes

Name Description
kernel_macs
share Dimensionless fraction of model multiply-accumulates attributed to this kernel class.
total_macs
workload

workload

Type: Workload.

Declared default: required.

kernel_macs

Type: Quantity.

Declared default: required.

total_macs

Type: Quantity.

Declared default: required.

share

engine.scenario_types.KernelShareScenario.share

Dimensionless fraction of model multiply-accumulates attributed to this kernel class.

Equation: (kernel_macs / total_macs).to('').magnitude.

Back to top