Skip to main content

dram_tiles

Function dram_tiles 

Source
pub fn dram_tiles(mt: u64, nt: u64, kt: u64, share: OperandSharing) -> u64
Expand description

How many DRAM tile-reads an arrangement costs, given the output tile grid and the reduction depth.

★ THE ARRANGEMENT IS AN INPUT, NOT A NAMED PLAN. The retired version took an enum of three human-chosen plans, and spatial_cost_model_lock::no_strategy_enum_input_exists forbids that vocabulary anywhere under spatial/ — including in a comment like this one, which is why this paragraph describes it rather than naming it. (It caught the first draft of this very comment.)

What actually determines the traffic is how operands are SHARED: no sharing re-streams both operands per output tile; per-core-block reuse reads each once per core column and row; a multicast fetches each tile exactly once. Those are properties of the placement the passes CHOSE, so they arrive here as parameters and the cost model reads them off the plan.

Salvaged from the retired emitter; codegen_tt keeps the public NAME as a thin wrapper so callers are unmoved.