From f75412664634494b3a6ebefd1f70d63a0f3e18c5 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Wed, 22 Jul 2026 15:14:59 -0500 Subject: audit: conservatively count predictor arithmetic --- sdil/conv.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sdil') diff --git a/sdil/conv.py b/sdil/conv.py index cc4c7c6..ea62e95 100644 --- a/sdil/conv.py +++ b/sdil/conv.py @@ -662,8 +662,19 @@ class CIFARKPMixedTrafficResNet(CIFARKPResNet): @property def predictor_elementwise_ops_per_example(self): - # Residual, centering, moments, normalization, and affine updates. - return 12 * self.mixed_units_per_example + # Conservative count for traffic/prediction, centering, reductions, + # normalized moments, residual power, and affine parameter updates. + return 24 * self.mixed_units_per_example + + @property + def traffic_calibration_elementwise_ops_per_example(self): + # Two RMS measurements, gain application, and achieved-ratio audit. + return 8 * self.mixed_units_per_example + + @property + def predictor_audit_elementwise_ops_per_example(self): + # Traffic/prediction/residual construction and two power reductions. + return 10 * self.mixed_units_per_example @torch.no_grad() def traffic_fields(self, hiddens): -- cgit v1.2.3