ucb-bar / gemmini

Berkeley's Spatial Array Generator
Other
820 stars 170 forks source link

The float32 configuration fails to pass even the simplest test in Verilator #341

Closed chguo1995 closed 8 months ago

chguo1995 commented 8 months ago

I attempted to use the 8*8 float32 configuration as follows:

val trainingConfig = defaultFpConfig.copy(
  inputType = Float(expWidth = 8, sigWidth = 24),
  accType = Float(expWidth = 8, sigWidth = 24),

  meshRows = 8,
  meshColumns = 8,

  dataflow = Dataflow.WS,

  has_training_convs = true,
  has_max_pool =  false,

  sp_capacity = CapacityInKilobytes(512),
  acc_capacity = CapacityInKilobytes(256),
)

However, it fails to pass the Verilator simulation, even for a simple mvin_mvout.c test, which gets stuck.

Additionally, in configsFP.scala, _spad_readdelay was set to 1. I attempted to change _spad_readdelay to 4 (to align with the int8 configuration), which allowed it to pass the mvin_mvout.c test and also all the DIM*DIM computations. However, when executing computations related to tile_matmul.c or tile_conv.c(i.e., involving a series of instructions related to _loop_matmulws and _loop_convws), it fails to produce correct results.

Tested versions include: v0.7.0, v0.7.1, v0.7.2, and the development version.

Could you tell me if there is anything that I have overlooked? @hngenc @jerryz123 @AmeerHajAli