Open tkoskela opened 2 years ago
After discussion today, the issue with USM is that we can't convert pointers created with malloc
elsewhere in the main program into USM pointers of the same type. That means that we would have to copy the data on the host into memory allocated with malloc_shared
, which is essentially the same thing as copying them onto the device with memcpy
. Another option would be allocating with sycl malloc_shared
calls in the main program but that has a risk of making our changes harder to upstream. Since it does not seem like a big job, it's worth experimenting with, but the buffer/accessor model #32 seems more suited to our situation.
Replace
malloc_device
andmemcpy
calls withmalloc_host
ormalloc_shared
as appropriate