Repository navigation
Handle duplicate allocation labels during replay - #53
Conversation
Match input allocations and reference outputs by captured allocation pointer and memory space. Expose allocation descriptors for unambiguous comparisons, including flat views whose extent is inferred from the recorded byte count. Reject ambiguous label-only lookups and cover duplicate labels, reordered references, empty allocations, and comparison size validation.
Signed-off-by: daxmawal <jeanfrancoismanutea@gmail.com>
Signed-off-by: daxmawal <jeanfrancoismanutea@gmail.com>
Signed-off-by: daxmawal <jeanfrancoismanutea@gmail.com>
Signed-off-by: daxmawal <jeanfrancoismanutea@gmail.com>
|
@tretre91 I'm wondering which interface we should prioritize for comparing replay results. This PR fixes handling of allocations that share a label and rejects ambiguous label-based comparisons. Another option would be Should I keep the allocation identification by address and memory space in this PR, drop my changes to label-based |
|
I will try to look at it but I don't think I will finish my review before monday, we'll be able to discuss the changes in person by then |
Co-authored-by: Trévis Morvany <63788850+tretre91@users.noreply.github.com>
Signed-off-by: daxmawal <jeanfrancoismanutea@gmail.com>
|
Merged, @tretre91. Thanks a lot ! I'll work on the nested lambda, and I'll come back with another PR to fix the other things we discussed in this PR. |
Kokkos allocations can share the same label. Previously, replay allocations and reference outputs were indexed by label, so one allocation could hide another and make output comparison unreliable. This change preserves each allocation separately and matches inputs with their reference outputs using the captured allocation pointer and memory space. The new
get_allocationsAPI exposes these pairs throughReplayAllocationdescriptors. Newcompare_viewsoverloads accept a descriptor and support explicit dimensions or a flat view whose size is inferred from the recorded byte count.Follow-up PR will add a
compare_views(replayed_view, comparator)overload that uses the replayed view’s data pointer and memory space to locate the corresponding reference.P.S. I encountered this issue in a Dyablo Kokkos kernel where multiple views shared the same label.