diff --git a/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py b/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py
index 5066b523bcdee874682398f05dad5908fe20df28..6dd55b463cac755a96b32af90b29270e99f412c1 100644
--- a/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py
+++ b/src/finn/custom_op/fpgadataflow/streamingfclayer_batch.py
@@ -523,11 +523,13 @@ class StreamingFCLayer_Batch(HLSCustomOp):
             """DO_PRAGMA(HLS ARRAY_PARTITION
             variable=weights complete dim=2)"""
         )
-        self.code_gen_dict["$PRAGMAS$"].append(
-            """DO_PRAGMA(HLS ARRAY_PARTITION
-            variable=threshs complete dim=1)"""
-        )
-        self.code_gen_dict["$PRAGMAS$"].append(
-            """DO_PRAGMA(HLS ARRAY_PARTITION
-            variable=threshs complete dim=3)"""
-        )
+        if self.calc_tmem() != 0:
+            # TODO find a better way of checking for no pregenerated thresholds
+            self.code_gen_dict["$PRAGMAS$"].append(
+                """DO_PRAGMA(HLS ARRAY_PARTITION
+                variable=threshs complete dim=1)"""
+            )
+            self.code_gen_dict["$PRAGMAS$"].append(
+                """DO_PRAGMA(HLS ARRAY_PARTITION
+                variable=threshs complete dim=3)"""
+            )