Open zjin-lcf opened 1 year ago
@zjin-lcf, SYCL kernels can use the placement new operator:
The placement new operator and any user-defined overloads that do not allocate storage are permitted.
From section V of the paper you shared:
The memory in the GPU memory pool is pre-allocated in the GPU global memory.
The kernels are using pointers to memory that's pre-allocated before kernel execution. I think it's possible to implement this style of memory allocation using existing SYCL features.
This request for dynamic memory allocation duplicates https://github.com/intel/llvm/issues/910.
Describe the solution you would like Allow users to call the new() and delete() in a SYCL kernel
Example usage Section V in the paper https://arxiv.org/pdf/2210.07768.pdf