Closed hecmay closed 3 years ago
The range of max_id
in digitrec is not known until runtime, so the ExtractIndices
is not able to restore the multi-dimensional indices we want even if the Mod expression is simplified...
Here is the index I got after updating Simplify
@seanlatias
knn_mat_on_device[(((max_id - (max_id % (ap_uint<49>)3)) + x1][(max_id % (ap_uint<49>)3)]
I was mistaken... this PR did not introduce the fix for #194 and issue #261. I just removed that from the description. Will add that part in a separate PR.
I added test cases for #276 and #270.
I did not find a good way to fix the #276. Simply returning mod_op->a
will cause an issue for the loop fusion test case. The originally expected output for the loop fusion test case is
for (x_fused, 0, 100)
B[x_fused/10][x_fused%10] = ...
But if we over-simplify the mod operator, the generated output would be
for (x_fused, 0, 100)
B[0][x_fused] = ...
A workaround to fix #276 (without breaking the fusion test case) is to update the itervar's range map. but I guess maybe we can just leave as it is and fix it when we introduce multi-dim representation in MLIR? @seanlatias
But right now, at least for digitrec and kmeans, we can generated expected multi-dim array.
Just leave it then. That's one reason I did not quote #276.
Issues on deprecated features
Issues already fixed in #332
Issues/requests for new features