Skip to content

Commit

Permalink
reduced accum bitwidth 40 16 and buffer to 64kB
Browse files Browse the repository at this point in the history
  • Loading branch information
vikramjain236 committed Jul 5, 2024
1 parent 472a4dc commit d67da28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
25 changes: 15 additions & 10 deletions src/main/scala/gemmini/ConfigsFP.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,23 +133,28 @@ object GemminiFPConfigs {
clock_gate = true
)

val chipFP16Config = FP16DefaultConfig.copy(sp_capacity=CapacityInKilobytes(128), acc_capacity=CapacityInKilobytes(128), dataflow=Dataflow.WS,
meshRows = 8,
meshColumns = 8,
acc_scale_args = Some(ScaleArguments((t: Float, u: Float) => {t}, 1, Float(8, 24), -1, identity = "1.0",
c_str = "((x))"
)),
mvin_scale_args = Some(ScaleArguments((t: Float, u: Float) => t * u, 3, Float(5, 11), -1, identity = "1.0", c_str="((x) * (scale))")),
val chipFP16Config = FP16DefaultConfig.copy(sp_capacity=CapacityInKilobytes(128), acc_capacity=CapacityInKilobytes(64), dataflow=Dataflow.WS,
meshRows = 16,
meshColumns = 16,
accType = Float(5, 11),
//acc_scale_args = Some(ScaleArguments((t: Float, u: Float) => {t}, 1, Float(8, 24), -1, identity = "1.0",
// c_str = "((x))"
//)),
acc_scale_args = Some(ScaleArguments((t: Float, u: Float) => t * u, 4, Float(5, 11), -1, identity = "1.0",
c_str = "((x) * (scale))"
)),
//mvin_scale_args = Some(ScaleArguments((t: Float, u: Float) => t * u, 3, Float(5, 11), -1, identity = "1.0", c_str="((x) * (scale))")),
mvin_scale_args = Some(ScaleArguments((t: Float, u: Float) => {t}, 1, Float(5, 11), -1, identity = "1.0", c_str="((x))")),
mvin_scale_acc_args=None,
acc_singleported=false,
acc_sub_banks = 1,
acc_singleported=true,
acc_sub_banks = 2,
acc_banks = 2,
mesh_output_delay = 2,
tile_latency = 1,
acc_latency = 3,
ex_read_from_acc=false,
ex_write_to_spad=false,
has_training_convs = false,
has_training_convs = false,
hardcode_d_to_garbage_addr = true,
acc_read_full_width = false,
max_in_flight_mem_reqs = 16,
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/gemmini/GemminiConfigs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ case class GemminiArrayConfig[T <: Data : Arithmetic, U <: Data, V <: Data](
val USABLE_SP_TILES = (SP_ROWS / DIM) - 2
val TOTAL_ACC_TILES = (ACC_ROWS / DIM)
val SQRT_ACC_TILES = sqrt(TOTAL_ACC_TILES).toInt
assert(USABLE_SP_TILES >= TOTAL_ACC_TILES,
s"SP_TILES($USABLE_SP_TILES) + 2 < ACC_TILES($TOTAL_ACC_TILES)")
//assert(USABLE_SP_TILES >= TOTAL_ACC_TILES,
// s"SP_TILES($USABLE_SP_TILES) + 2 < ACC_TILES($TOTAL_ACC_TILES)")

// prioritize sizes that cause the output-group to be further from square
val OG_HEIGHT_MAP = (1 to TOTAL_ACC_TILES).sortWith((h1, h2) => {
Expand Down

0 comments on commit d67da28

Please sign in to comment.