Skip to content

Commit

Permalink
Fix wrong variable in comparison code for verification (#28)
Browse files Browse the repository at this point in the history
The code will always print "NKI and NumPy match" even when they might actually differ. The comparison needs to be between the NKI output (out_nki) and the NumPy output (out_np) to properly verify if they produce the same results.
  • Loading branch information
jimburtoft authored Dec 3, 2024
1 parent 174da6e commit d53cdd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tutorials/average_pool2d/average_pool2d_nki_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def np_average_pool_2D(in_tensor, pool_size):

print(in_tensor, out_nki, out_np)

match = (out_nki == out_nki).all()
match = (out_nki == out_np).all()

if match:
print("NKI and NumPy match")
Expand Down

0 comments on commit d53cdd0

Please sign in to comment.