format_cost_models
DenseLevelOption
Bases: LevelOption
Storage features are positions and slots.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
ElementLevelOption
Bases: LevelOption
The element level at the rank of a tensor stores one value for each position. Storage features are values and value bytes.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
FormatCostModel
Bases: CostModel[LevelChoice]
A cost model where each level of each formatted alias is a component. bindings lists the level options of an alias, outermost first and ending with its element level, and the alias is formatted when it is first written.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
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 | |
LevelChoice
dataclass
The choice of a level option at a zero-based depth of alias, with num_pos positions entering it, in a format whose positions take pos_size bytes. term is the program which reads and writes alias.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |
LevelCostModel
Bases: FormatCostModel, LoopOrderedForm
The cost model of the levels of one type of option. Each level contributes an allocation row, and an access row for each query loop prefix that uses it. The features are the storage features of the option for the allocation, followed by sequential reads, scatter reads, sequential writes, and scatter writes for the accesses.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
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 245 246 247 248 249 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 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
get_access_features(alias, level, term, machine)
Return the accesses to alias at a zero-based depth in each query of term: sequential reads, scatter reads, sequential writes, and scatter writes, with one row per loop prefix that accesses the level in each query. Each access is counted by the PigeonCostModel iterations of the loops from the root to the current level. The element level is accessed with its parent.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
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 245 246 247 248 249 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 | |
get_component_features(component, machine)
Return the allocation row of the level, followed by its access rows.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
LevelOption
Bases: ABC
A kind of level, which describes the storage of a level with n_features storage features, and the number of positions it passes to its child. Both depend on the stats of the tensor, the zero-based depth of the level, and the num_pos positions entering it. Storage features also depend on the bytes of an index of the level, and of a position and a value of the tensor.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
SparseHashLevelOption
Bases: LevelOption
Storage features are positions, entries, position bytes, and index bytes.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
nnz_after(stats, stats_factory, depth)
Return the non-fill entries of the first depth + 1 levels of stats.
Source code in src/finch/autoschedule/cost_models/format_cost_models.py
32 33 34 35 36 37 38 39 | |