Closed Yurlungur closed 1 year ago
The kokkos malloc behavior will be both platform and compiler dependent as well.
If we match each portable malloc with a portable free wouldn't that be the best way to resolve?
If we match each portable malloc with a portable free wouldn't that be the best way to resolve?
That is what this fix does. The error was that by setting AllocationStatus
to allocated host, it was matching a portable malloc with a free, where it should have been a portable free.
Tests pass on re-git. Pulling the trigger.
PR Summary
Even with only host context, it turns out
Kokkos::Malloc
andKokkos::Free
are not just the standardmalloc
andfree
. What this means is that if you build Spiner withKokkos
backend but no device, it's still dangerous to mixPORTABLE_MALLOC
withfree
. This was causing a segfault in this particular edge case. Now fixed.In the long term, to catch such things, we should probably add a Kokkos serial build to the Spiner CI. I didn't bother for now though.
PR Checklist