An error occurred while fetching the assigned milestone of the selected merge_request.
Allocators
Original idea: Device
should be split to Allocator
and Executor
(or some better name) which represent the "memory space" and "execution model", respectively
All TNL allocators must satisfy the requirements imposed by the Allocator concept from STL.
Eventually, TNL will have these core concepts:
-
Allocator
- handles only allocation/deallocation
- multiple allocators can correspond to the same "memory space"
-
Executor
- primarily used for specializations of algorithms
-
Algorithms
- basic (container-free) algorithms specialized by
Executor
-
ParallelFor
,Reduction
,MultiReduction
,ArrayOperations
, ...
- basic (container-free) algorithms specialized by
-
Containers
- classes for general data structures (TODO: alternatively use "Dense" and "Sparse", because a dense matrix can be an extended alias for 2D array)
-
Array
,Vector
(alsoVectorOperations
),NDArray
-
Views
- View only wraps a raw pointer to data and some metadata (such as the array size), it does not do allocation and deallocation of the data. Hence, the view has a fixed size which cannot be changed.
- It has a copy-constructor which does a shallow copy.
- It has a copy-assignment operator which does a deep copy.
- It has all other methods present in the relevant container (data structure).
As the first step, allocators will be added to TNL:
-
implement allocator classes -
add tests for allocators and update ArrayOperationsTest
-
use allocators in Array -
document the Allocator template type in Array -
add constructors for Array with custom allocator -
cross-device copies should be probably split from(discarded because cross-device copies are done even inArrayOperations
because they depend on theAllocator
and not on theDevice
/Executor
ArrayView
so it would need theAllocator
parameter too)
-
-
add template parameter Allocator
toVector
-
add template parameter(this can wait for the next round)Allocator
toDistributedArray
,DistributedVector
etc. -
use allocators in smart pointers - replace template parameter(this can wait until it is actually needed)Device
withAllocator
? -
add new benchmarks for host-to-device and device-to-host transfers -
add the triad benchmark - copy to device, compute, copy to host - use different memory management strategies (Host + explicit copy, CudaHost + explicit copy, CudaHost + zero-copy, CudaManaged + Unified Memory (+ hints)) -
document the core concepts described above
Edited by Jakub Klinkovský
Merge request reports
Activity
added feature label
added 4 commits
Toggle commit listadded 4 commits
Toggle commit listadded 10 commits
-
6c38e96c...b7115967 - 3 commits from branch
develop
- 4b96cb30 - Moved getSerializationType method from Array/ArrayView to ArrayIO
- e70abd44 - Used std::vector instead of TNL::Array for ReferenceOrientationArrayType
- e64e6da0 - Added allocator classes
- 5ab6e902 - Added tests for allocators and updated ArrayOperationsTest to use allocators
- 27586367 - [WIP] Added template parameter Allocator to Array
- d6604e05 - [WIP] Used MIC allocator in smart pointers
- 8bddbcba - Added benchmarks for array operations using different host allocators
Toggle commit list-
6c38e96c...b7115967 - 3 commits from branch
added 9 commits
-
8bddbcba...a4ff26e4 - 2 commits from branch
develop
- bdbd6bb8 - Moved getSerializationType method from Array/ArrayView to ArrayIO
- d7a9b3ec - Used std::vector instead of TNL::Array for ReferenceOrientationArrayType
- 27acf995 - Added allocator classes
- cc3f179b - Added tests for allocators and updated ArrayOperationsTest to use allocators
- 818a3a27 - [WIP] Added template parameter Allocator to Array
- 268d373a - [WIP] Used MIC allocator in smart pointers
- 55bc69bc - Added benchmarks for array operations using different host allocators
Toggle commit list-
8bddbcba...a4ff26e4 - 2 commits from branch
added 6 commits
- 641452b8 - Added allocator classes
- 232be9ee - Added tests for allocators and updated ArrayOperationsTest to use allocators
- 533235a1 - [WIP] Added template parameter Allocator to Array
- 985d9f87 - [WIP] Used MIC allocator in smart pointers
- 783b9b3b - Added benchmarks for array operations using different host allocators
- 68ee9416 - Added triad benchmark (copy to device, compute, copy to host) using different...
Toggle commit listadded 9 commits
-
edd5efb5 - 1 commit from branch
develop
- c7beaf35 - Moved getSerializationType method from Array/ArrayView to ArrayIO
- d9c81a9a - Used std::vector instead of TNL::Array for ReferenceOrientationArrayType
- b7eb9400 - Added allocator classes
- 289d3c19 - Added tests for allocators and updated ArrayOperationsTest to use allocators
- e273fd2a - [WIP] Added template parameter Allocator to Array
- f3150a5c - [WIP] Used MIC allocator in smart pointers
- 20cef736 - Added benchmarks for array operations using different host allocators
- a0a9db54 - Added triad benchmark (copy to device, compute, copy to host) using different...
Toggle commit list-
edd5efb5 - 1 commit from branch
added 13 commits
-
a0a9db54...b7149f11 - 7 commits from branch
develop
- 9e1914d3 - Added allocator classes
- 3e037736 - Added tests for allocators and updated ArrayOperationsTest to use allocators
- 86af8653 - [WIP] Added template parameter Allocator to Array
- 99722443 - [WIP] Used MIC allocator in smart pointers
- 112e91c4 - Added benchmarks for array operations using different host allocators
- 3d4df30a - Added triad benchmark (copy to device, compute, copy to host) using different...
Toggle commit list-
a0a9db54...b7149f11 - 7 commits from branch
Please register or sign in to reply