Skip to content

Commit

Permalink
Address PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ndellingwood committed Feb 13, 2024
1 parent 49f4772 commit 16ad08d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 33 deletions.
20 changes: 9 additions & 11 deletions core/src/Kokkos_CopyViews.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1359,13 +1359,13 @@ contiguous_fill_or_memset(
&& !std::is_same_v<ExecutionSpace, Kokkos::OpenMP>
#endif
)
#if defined(KOKKOS_COMPILER_INTEL) && (KOKKOS_COMPILER_INTEL < 2100)
// icpc needs extra ctad help to compile
// FIXME intel/19 icpc fails to deduce template parameters here,
// resulting in compilation errors; explicitly passing the template
// parameters to ZeroMemset helps workaround the issue
// See https://github.com/kokkos/kokkos/issues/6775
ZeroMemset<ExecutionSpace, View<DT, DP...>>(exec_space, dst);
#else
ZeroMemset(exec_space, dst);
#endif
using ViewType = View<DT, DP...>;
using exec_space_type = ExecutionSpace;
ZeroMemset<exec_space_type, ViewType>(exec_space, dst);
else
contiguous_fill(exec_space, dst, value);
}
Expand Down Expand Up @@ -1397,13 +1397,11 @@ contiguous_fill_or_memset(
// leading to the significant performance issues
#ifndef KOKKOS_ARCH_A64FX
if (Impl::is_zero_byte(value))
#if defined(KOKKOS_COMPILER_INTEL) && (KOKKOS_COMPILER_INTEL < 2100)
// icpc needs extra ctad help to compile
// FIXME intel/19 icpc fails to deduce template parameters here,
// resulting in compilation errors; explicitly passing the template
// parameters to ZeroMemset helps workaround the issue
// See https://github.com/kokkos/kokkos/issues/6775
ZeroMemset<exec_space_type, ViewType>(exec, dst);
#else
ZeroMemset(exec, dst);
#endif
else
#endif
contiguous_fill(exec, dst, value);
Expand Down
22 changes: 0 additions & 22 deletions core/src/impl/Kokkos_ViewMapping.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2917,20 +2917,9 @@ struct ViewValueFunctor<DeviceType, ValueType, false /* is_scalar */> {
"Kokkos::View::initialization [" + name + "] via memset",
Kokkos::Profiling::Experimental::device_id(space), &kpID);
}
#if defined(KOKKOS_COMPILER_INTEL) && (KOKKOS_COMPILER_INTEL < 2100)
// icpc needs extra ctad help to compile
// See https://github.com/kokkos/kokkos/issues/6775
using ViewType =
Kokkos::View<ValueType*, typename DeviceType::memory_space,
Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
(void)ZeroMemset<ExecSpace, ViewType>(
space, Kokkos::View<ValueType*, typename DeviceType::memory_space,
Kokkos::MemoryTraits<Kokkos::Unmanaged>>(ptr, n));
#else
(void)ZeroMemset(
space, Kokkos::View<ValueType*, typename DeviceType::memory_space,
Kokkos::MemoryTraits<Kokkos::Unmanaged>>(ptr, n));
#endif

if (Kokkos::Profiling::profileLibraryLoaded()) {
Kokkos::Profiling::endParallelFor(kpID);
Expand Down Expand Up @@ -3058,20 +3047,9 @@ struct ViewValueFunctor<DeviceType, ValueType, true /* is_scalar */> {
Kokkos::Profiling::Experimental::device_id(space), &kpID);
}

#if defined(KOKKOS_COMPILER_INTEL) && (KOKKOS_COMPILER_INTEL < 2100)
// icpc needs extra ctad help to compile
// See https://github.com/kokkos/kokkos/issues/6775
using ViewType =
Kokkos::View<ValueType*, typename DeviceType::memory_space,
Kokkos::MemoryTraits<Kokkos::Unmanaged>>;
(void)ZeroMemset<ExecSpace, ViewType>(
space, Kokkos::View<ValueType*, typename DeviceType::memory_space,
Kokkos::MemoryTraits<Kokkos::Unmanaged>>(ptr, n));
#else
(void)ZeroMemset(
space, Kokkos::View<ValueType*, typename DeviceType::memory_space,
Kokkos::MemoryTraits<Kokkos::Unmanaged>>(ptr, n));
#endif

if (Kokkos::Profiling::profileLibraryLoaded()) {
Kokkos::Profiling::endParallelFor(kpID);
Expand Down

0 comments on commit 16ad08d

Please sign in to comment.