bound_stats
BoundStats
Bases: NumericStats
Base for degree-constraint upper-bound statistics: a guaranteed bound on the
number of non-fill values, built from ell_p-norms of degree sequences.
Subclasses differ only in which p values they keep (ps) and how they
turn the constraints into an estimate (:meth:estimate_non_fill_values); the
scan and all propagation (in :class:BoundStatsFactory) are shared.
Source code in src/finch/autoschedule/tensor_stats/bound_stats.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
BoundStatsFactory
Bases: BaseTensorStatsFactory[TS], StatsFactory[TS], Generic[TS]
Shared statistics propagation for :class:BoundStats subclasses, combining
degree constraints keyed by (from_indices, to_indices, p). The only
per-subclass knob is ps.
Source code in src/finch/autoschedule/tensor_stats/bound_stats.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | |
DC
dataclass
A degree constraint: value bounds ||deg(to_indices | from_indices)||_p.
p = inf (the default) is the classic max-degree constraint; p = 1 is
the distinct count; intermediate p capture skew between the two.
Source code in src/finch/autoschedule/tensor_stats/bound_stats.py
37 38 39 40 41 42 43 44 45 46 47 48 49 | |
DCStats
Bases: BoundStats
Classic degree constraints -- max degrees (p = inf) and distinct counts.
Estimates size with a best-first product search over the constraints,
clamped by the tensor's dense capacity.
Source code in src/finch/autoschedule/tensor_stats/bound_stats.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | |
estimate_non_fill_values()
Smallest degree-constraint product covering all indices, clamped by dense capacity.
Source code in src/finch/autoschedule/tensor_stats/bound_stats.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | |
DCStatsFactory
Bases: BoundStatsFactory['DCStats']
Factory for :class:DCStats -- keeps only max-degree (p = inf).
Source code in src/finch/autoschedule/tensor_stats/bound_stats.py
297 298 299 300 301 | |
LPStats
Bases: BoundStats
LpBound statistics: keeps ell_p-norms of degree sequences for a
configurable set of p (not just max degree), and bounds size via the
LPflow network-flow LP (:func:_flow_bound).
Source code in src/finch/autoschedule/tensor_stats/bound_stats.py
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | |
LPStatsFactory
Bases: BoundStatsFactory['LPStats']
Factory for :class:LPStats with a configurable set of p norms.
Source code in src/finch/autoschedule/tensor_stats/bound_stats.py
472 473 474 475 476 | |