Skip to content

Commit

Permalink
removed commented code, added explanations to comments with jira IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
lslusarczyk committed Jun 26, 2024
1 parent f761f42 commit ef48250
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ jobs:
mkdir build &&
cd build &&
cmake -DCMAKE_CXX_STANDARD=23 -DCMAKE_CXX_COMPILER=icpx -DONEDPL_BACKEND=dpcpp -DCMAKE_BUILD_TYPE=Release .. &&
cmake --build . --target shp-all-tests -j${nproc} &&
ctest --test-dir . -L SHP -j 4"
cmake --build . --target shp-all-tests -j${BUILD_CONCURRENCY} &&
ctest --test-dir . -L SHP -j${BUILD_CONCURRENCY}"
docker logs -f dr-test
exit_code=$(docker inspect dr-test --format='{{.State.ExitCode}}')
docker rm -f dr-test
Expand Down
2 changes: 1 addition & 1 deletion include/oneapi/dpl/distributed-ranges
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
#error "C++23 required to use Distributed Ranges"
#endif

#endif /* _ONEDPL_DISTRIBUTED_RANGES */
#endif // _ONEDPL_DISTRIBUTED_RANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#pragma once

// #include "detail/logger.hpp"
#include "shp/algorithms/algorithms.hpp"
#include "shp/detail.hpp"
#include "shp/distributed_span.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ template <std::contiguous_iterator InputIt, std::contiguous_iterator OutputIt>
requires __detail::is_syclmemcopyable<std::iter_value_t<InputIt>, std::iter_value_t<OutputIt>> sycl::event
copy_async(InputIt first, InputIt last, OutputIt d_first)
{
// auto &&q = __detail::default_queue();
auto&& q = __detail::get_queue_for_pointers(first, d_first);
return q.memcpy(std::to_address(d_first), std::to_address(first),
sizeof(std::iter_value_t<InputIt>) * (last - first));
Expand All @@ -43,7 +42,6 @@ template <std::contiguous_iterator Iter, typename T>
requires __detail::is_syclmemcopyable<std::iter_value_t<Iter>, T> sycl::event
copy_async(Iter first, Iter last, device_ptr<T> d_first)
{
// auto &&q = __detail::default_queue();
auto&& q = __detail::get_queue_for_pointers(first, d_first);
return q.memcpy(d_first.get_raw_pointer(), std::to_address(first), sizeof(T) * (last - first));
}
Expand All @@ -61,7 +59,6 @@ template <typename T, std::contiguous_iterator Iter>
requires __detail::is_syclmemcopyable<T, std::iter_value_t<Iter>> sycl::event
copy_async(device_ptr<T> first, device_ptr<T> last, Iter d_first)
{
// auto &&q = __detail::default_queue();
auto&& q = __detail::get_queue_for_pointers(first, d_first);
return q.memcpy(std::to_address(d_first), first.get_raw_pointer(), sizeof(T) * (last - first));
}
Expand All @@ -79,7 +76,6 @@ template <typename T>
requires(!std::is_const_v<T> && std::is_trivially_copyable_v<T>) sycl::event
copy_async(device_ptr<std::add_const_t<T>> first, device_ptr<std::add_const_t<T>> last, device_ptr<T> d_first)
{
// auto &&q = __detail::default_queue();
auto&& q = __detail::get_queue_for_pointers(first, d_first);
return q.memcpy(d_first.get_raw_pointer(), first.get_raw_pointer(), sizeof(T) * (last - first));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requires(!std::is_const_v<std::iter_value_t<Iter>> && std::is_trivially_copyable
{
auto&& q = __detail::get_queue_for_pointer(first);
std::iter_value_t<Iter>* arr = std::to_address(first);
// not using q.fill because of CMPLRLLVM-46438
// not using q.fill because p2p communication is not working when using sycl::queue.fill or sycl::queue.parallel_for with nondefault KernelName (CMPLRLLVM-46438)
return dr::__detail::parallel_for(q, sycl::range<>(last - first), [=](auto idx) { arr[idx] = value; });
}

Expand All @@ -41,7 +41,7 @@ requires(std::indirectly_writable<device_ptr<T>, U>) sycl::event
{
auto&& q = __detail::get_queue_for_pointer(first);
auto* arr = first.get_raw_pointer();
// not using q.fill because of CMPLRLLVM-46438
// not using q.fill because p2p communication is not working when using sycl::queue.fill or sycl::queue.parallel_for with nondefault KernelName (CMPLRLLVM-46438)
return dr::__detail::parallel_for(q, sycl::range<>(last - first), [=](auto idx) { arr[idx] = value; });
}

Expand All @@ -57,7 +57,7 @@ fill_async(R&& r, const T& value)
{
auto&& q = __detail::queue(ranges::rank(r));
auto* arr = std::to_address(rng::begin(ranges::local(r)));
// not using q.fill because of CMPLRLLVM-46438
// not using q.fill because p2p communication is not working when using sycl::queue.fill or sycl::queue.parallel_for with nondefault KernelName (CMPLRLLVM-46438)
return dr::__detail::parallel_for(q, sycl::range<>(rng::distance(r)), [=](auto idx) { arr[idx] = value; });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ queue(std::size_t rank)
return queues_[rank];
}

// Retrieve global queues because of CMPLRLLVM-47008
// Retrieve global queues because of observed significantly reduced copy performance when using newly constructed queues versus using pre-constructed global queues. (CMPLRLLVM-47008)
inline sycl::queue&
queue(const sycl::device& device)
{
Expand Down

0 comments on commit ef48250

Please sign in to comment.