nod-ai / iree-amd-aie

IREE plugin repository for the AMD AIE accelerator
Apache License 2.0
69 stars 30 forks source link

[Batch Matmul] Numerics mismatch between CPU and AIE for batch size 2 #750

Closed yzhang93 closed 2 months ago

yzhang93 commented 2 months ago

The numerical results don't match between CPU and AIE for batch size as 2 https://github.com/nod-ai/iree-amd-aie/actions/runs/10712128638/job/29702427538?pr=747. When the batch size is 1 the results are the same for CPU and AIE.

Values are not all close. Here is a summary of the differences:
Number of positions where values are different is 4088 out of 8192
Maximum difference: 650
Discrepancies: 
At index: 1 0 0 
AIE value: 1250
CPU value: 1232
At index: 1 0 1 
AIE value: 1392
CPU value: 1245
At index: 1 0 2 
AIE value: 1350
CPU value: 1384
At index: 1 0 3 
AIE value: 1249
CPU value: 1412
At index: 1 0 4 
AIE value: 1253
CPU value: 1370
At index: 1 0 5 
AIE value: 1345
CPU value: 1418
At index: 1 0 6 
AIE value: 1346
CPU value: 1156
At index: 1 0 7 
AIE value: 1104
CPU value: 1202
At index: 1 0 8 
AIE value: 1341
CPU value: 1106
At index: 1 0 9 
AIE value: 1228
CPU value: 1376
And 4078 more discrepancies.
yzhang93 commented 2 months ago

@jtuyls The dump IR https://gist.github.com/yzhang93/28192fe79011ae929a32c229e345b99e