-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DynamicView with host size grow #1206
Comments
@crtrott @ndellingwood @bathmatt |
Initial commit to modify DynamicView such that: 1. remove need for memory pool by... 2. resize only functions from the host outside of parallel_* regions reason - remove need for memory pool Due to removing the memory pool, the ptr-array-to-chunks, i.e. m_chunks, is now allocated in CudaUVM space when CudaSpace is enabled; chunks are still allocated in CudaSpace. Current impl API asks for (label, max_extent, min_chunk_size) Max extent is asked for to avoid resizing the m_chunks array, which could lead to possible issues if multiple DynamicViews are copies of each other, sharing the allocation. Compiled with Serial backend so far... TODO Cleanup - comments, if-guarded previous code Unit tests need to be added Testing
Ccommit to modify DynamicView such that: 1. remove need for memory pool by... 2. resize only functions from the host outside of parallel_* regions reason - remove need for memory pool Due to removing the memory pool, the ptr-array-to-chunks, i.e. m_chunks, is now allocated in CudaUVM space when CudaSpace is enabled; chunks are still allocated in CudaSpace. Current impl API asks for (label, min_chunk_size, max_extent) Max extent is asked for to avoid resizing the m_chunks array, which could lead to possible issues if multiple DynamicViews are copies of each other, sharing the allocation, and one of them requires resize of the m_chunks array (to pointers of chunks)
@bathmatt I started working on this feature request and have an initial WIP PR #1378. I'll summarize some of the changes (API and behavior), could you give some feedback on the changes and whether this direction meets your use cases or needs changes?
I can add a fourth argument The The |
size() and extent() return the extent requested by the user via the resize_serial() method. The actual extent available ( number of chunks * chunk size ) is returned by the allocation_extent() method. This commit contributes toward issue kokkos#1206
…e-1206 * 'issue-1206' of github.com:ndellingwood/kokkos: Issue kokkos#1206 - fix order of args to DynamicView in test_sort Issue kokkos#1206: Fix DynamicView API in test_sort in algorithms DynamicView: Address issue kokkos#1206 Attempt to get rid of warning Fix issue in deep_copy changes Fix an issue with the benchmark suite after changes in macros Fix warning with CUDA for OpenMP nthreads unused variable Fix issue kokkos#1269 Fix deep_copy between empty views issue kokkos#1369 Adding OpenMP InterOp test issue kokkos#1305 Fix CUDA interoperability and add unit test Fix issue kokkos#1363 : Deepcopy between rank-1 views with LayoutLeft/Right Adding ChunkSize constructor overload to RangePolicy. Error out when -arch not detected
Just pushed this into develop. |
@hcedwar and I talked yesterday about this. He agreed that Kokkos will add a dynamic view like the one that is there but growable on the host. This won't use the memory pool and should be able to deal with fragmentation. It will also not require that the scalar type be a 2^n size. So, I can have
and I can
my_data.resize(new_size);
The text was updated successfully, but these errors were encountered: