diff --git a/sycl/include/CL/sycl/detail/buffer_impl.hpp b/sycl/include/CL/sycl/detail/buffer_impl.hpp index f9c06b96709eb..e1a7e5e5be324 100644 --- a/sycl/include/CL/sycl/detail/buffer_impl.hpp +++ b/sycl/include/CL/sycl/detail/buffer_impl.hpp @@ -80,12 +80,6 @@ class buffer_impl final : public SYCLMemObjT { unique_ptr_class Allocator) : BaseT(SizeInBytes, Props, std::move(Allocator)) { BaseT::handleHostData(First, Last, RequiredAlign); - // TODO: There is contradiction in the spec, in one place it says - // the data is not copied back at all if the buffer is construted - // using this c'tor, another section says that the data will be - // copied back if iterators passed are not const ( 4.7.2.3 Buffer - // Synchronization Rules and this constructor description) - BaseT::set_final_data(First); } template diff --git a/sycl/test/basic_tests/buffer/buffer.cpp b/sycl/test/basic_tests/buffer/buffer.cpp index 2521a20c85358..abb74059a104a 100644 --- a/sycl/test/basic_tests/buffer/buffer.cpp +++ b/sycl/test/basic_tests/buffer/buffer.cpp @@ -434,13 +434,9 @@ int main() { range<1>{3}, [=](id<1> index) { B[index] = 20; }); }); } - // Data is copied back in the desctruction of the buffer created from - // pair of non-const iterators - for (int i = 0; i < 2; i++) - assert(data1[i] == -1); - for (int i = 2; i < 5; i++) - assert(data1[i] == 20); - for (int i = 5; i < 10; i++) + // Data is not copied back in the destruction of the buffer created + // from a pair of non-const iterators + for (int i = 0; i < 10; i++) assert(data1[i] == -1); }