[SYCLomatic] Make device_vector AllocatorAwareContainer #2
Closed
danhoeflinger wants to merge 5 commits intoSYCLomaticfrom
Closed
[SYCLomatic] Make device_vector AllocatorAwareContainer #2danhoeflinger wants to merge 5 commits intoSYCLomaticfrom
danhoeflinger wants to merge 5 commits intoSYCLomaticfrom
Conversation
a796e52 to
533db9f
Compare
dba5682 to
b20d9e8
Compare
a2ff17b to
0381399
Compare
0381399 to
f802788
Compare
b22c09c to
cbe9738
Compare
device allocated USM seamless host access construct allocator aware (BROKEN: cant pass allocator to kernel) working with static construct function Fix treatment of default constructor adding destroy functionality making device_allocator_traits similar to std switch to using oneDPL range functionality; misc. Comments removing unnecessary TODO Adding warning to usm_device_allocator clang-format provide explicit copy constructor remove ambiguous constructor device_vector AllocatorAwareContainer requirements Fix bug with operator-- removing custom swap kernel adjusting device reference to hold ptr internally passing pointer, not reference to device_reference (breaking) bug fix strip out device USM specific code using std::allocator_traits for all Always destroy now, since no kernel is launched removing redundant copy formatting move assignment operator bugfix fixing inc file and formatting using size_type not int adding missing destroy calls reusing existing code removing automatic doubling of capacity requested parallel copy instead of construct calls fixes for propagation of allocator formatting and updating inc file fixing comment more fixes for constructing vs copy / fill adding ctors with allocators using ctor delegation where appropriate Formatting fixing bad merge ::std replacing redundant constructors with default args alias for allocator_traits fixing wrong allocator for move const skipping copies if not relevant optimization when sequences dont overlap in erase formatting, removing typo use onedpl when custom ctor isn't provided clang formatting adding comment forcing pointer type for construction protecting unknown InputIterators from being used in oneDPL accelerated routines removing host parallel calls switching to value constructor fixing erase and adding destroy clang format
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
assign elements more efficiently swap elements more efficiently filling elements more efficiently formatting Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
5fd5a3d to
db348fa
Compare
danhoeflinger
pushed a commit
that referenced
this pull request
Apr 8, 2024
This reverts commit daebe5c. This commit causes the following asan issue: ``` <snip>/llvm-project/build/bin/mlir-opt <snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir | <snip>/llvm-project/build/bin/FileCheck <snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir # executed command: <snip>/llvm-project/build/bin/mlir-opt <snip>/llvm-project/mlir/test/Dialect/XeGPU/XeGPUOps.mlir # .---command stderr------------ # | ================================================================= # | ==2772558==ERROR: AddressSanitizer: stack-use-after-return on address 0x7fd2c2c42b90 at pc 0x55e406d54614 bp 0x7ffc810e4070 sp 0x7ffc810e4068 # | READ of size 8 at 0x7fd2c2c42b90 thread T0 # | #0 0x55e406d54613 in operator()<long int const*> /usr/include/c++/13/bits/predefined_ops.h:318 # | #1 0x55e406d54613 in __count_if<long int const*, __gnu_cxx::__ops::_Iter_pred<mlir::verifyListOfOperandsOrIntegers(Operation*, llvm::StringRef, unsigned int, llvm::ArrayRef<long int>, ValueRange)::<lambda(int64_t)> > > /usr/include/c++/13/bits/stl_algobase.h:2125 # | #2 0x55e406d54613 in count_if<long int const*, mlir::verifyListOfOperandsOrIntegers(Operation*, ... ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes to make
dpct::device_vectorallocator aware, while still relying upon a USM shared memory allocator.This should satisfy the requirements of AllocatorAwareContainer.
With the underlying data being host accessible, we can fully satisfy AllocatorAwareContainer.