Skip to content

Commit

Permalink
Disable all copy algs except naive 1D
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Jan 11, 2024
1 parent df02d96 commit c5f8813
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions examples/cuda/viewcopy/viewcopy.cu
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ try
gibs,
prop.multiProcessorCount,
prop.maxThreadsPerMultiProcessor);
const Size maxThreads = prop.multiProcessorCount * prop.maxThreadsPerMultiProcessor;
// const Size maxThreads = prop.multiProcessorCount * prop.maxThreadsPerMultiProcessor;

fmt::print("{:10} -> {:10} {:11} {:>10} {:>10} {:4}\n", "src", "dst", "alg", "ms", "GiB/s", "hash");

Expand Down Expand Up @@ -294,13 +294,16 @@ try
};

benchmarkCopy("naive 1D", [](const auto& srcView, auto& dstView) { ::fieldWiseCopy1D(srcView, dstView); });
benchmarkCopy("naive 3D", [](const auto& srcView, auto& dstView) { ::fieldWiseCopy3D(srcView, dstView); });
benchmarkCopy(
"naive GS 1D",
[&](const auto& srcView, auto& dstView) { ::fieldWiseCopyGridStrided1D(srcView, dstView, maxThreads); });
benchmarkCopy(
"naive GS 3D",
[&](const auto& srcView, auto& dstView) { ::fieldWiseCopyGridStrided3D(srcView, dstView, maxThreads); });
// These are slower on Nvidia V100 and A100:
// benchmarkCopy("naive 3D", [](const auto& srcView, auto& dstView) { ::fieldWiseCopy3D(srcView, dstView); });
// benchmarkCopy(
// "naive GS 1D",
// [&](const auto& srcView, auto& dstView) { ::fieldWiseCopyGridStrided1D(srcView, dstView, maxThreads);
// });
// benchmarkCopy(
// "naive GS 3D",
// [&](const auto& srcView, auto& dstView) { ::fieldWiseCopyGridStrided3D(srcView, dstView, maxThreads);
// });
};

using ArrayExtents = std::remove_const_t<decltype(extents)>;
Expand Down

0 comments on commit c5f8813

Please sign in to comment.