Skip to content

Commit f840df8

Browse files
committed
feat[hardware_predict] : add debug print
1 parent 8407bb0 commit f840df8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

hls4ml/backends/vitis_accelerator/vitis_accelerator_backend.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,20 @@ def hardware_predict(self, model, x, target="hw", debug=False, profilingRepeat=-
151151
predictions_size = predictions.shape[0]
152152
predictions_ptr = predictions.ctypes.data_as(ctypes.POINTER(ctypes.c_double))
153153

154+
154155
# Flatten the input data
155156
X_test_flat = X_test.flatten()
156157
X_test_size = X_test_flat.shape[0]
157158
X_test_flat = X_test_flat.ctypes.data_as(ctypes.POINTER(ctypes.c_double))
159+
160+
# Print debug information
161+
print(f"Batch size: {batchsize}")
162+
print(f"Original sample count: {originalSampleCount}")
163+
print(f"Number of batches: {numBatches}")
164+
print(f"Sample output size: {sampleOutputSIze}")
165+
print(f"Predictions size: {predictions_size}")
166+
print(f"X_test_shape: {X_test.shape}")
167+
print(f"X_test_flat_shape: {X_test_flat.shape}")
158168

159169
# Change working directory to the HLS project directory
160170
os.chdir(model.config.get_output_dir())

0 commit comments

Comments
 (0)