diff --git a/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py b/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py index d63af02dc4fc59da7c714f9283c8fd6ecc341e74..f62c653195c7affaa94129a637bf8bf4eb9b12e7 100644 --- a/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py +++ b/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py @@ -503,6 +503,11 @@ class StreamingFCLayer_Batch(HLSCustomOp): weight_tensor_unflipped = pack_innermost_dim_as_hex_string( weight_tensor_unflipped, export_wdt, weight_width ) + weight_stream_len = np.prod(weight_tensor_unflipped.shape) + assert ( + weight_stream_len <= 1024 + ), """Decoupled mem mode needs + weight stream length <= 1024 for now""" weight_pad = np.zeros((1024), int).astype(str) weight_tensor_unflipped = weight_tensor_unflipped.flatten() # delete "0x" in the beginning of the hexstring