Skip to content

Commit

Permalink
wave equation device memory support
Browse files Browse the repository at this point in the history
  • Loading branch information
rscohn2 committed Oct 9, 2023
1 parent 89e8cc8 commit beda783
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion benchmarks/gbench/mhp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ target_link_libraries(mhp-bench benchmark::benchmark cxxopts DR::mpi)

# cmake-format: off
add_executable(mhp-quick-bench mhp-bench.cpp
../common/dot_product.cpp
stencil_2d.cpp
)
# cmake-format: on
target_compile_definitions(mhp-quick-bench PRIVATE BENCH_MHP)
Expand Down
4 changes: 3 additions & 1 deletion benchmarks/gbench/mhp/wave_equation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ int main(int argc, char *argv[]) {
("t,benchmark-mode", "Run a fixed number of time steps.", cxxopts::value<bool>()->default_value("false"))
("sycl", "Execute on SYCL device")
("f,fused-kernel", "Use fused kernels.", cxxopts::value<bool>()->default_value("false"))
("device-memory", "Use device memory")
("h,help", "Print help");
// clang-format on

Expand All @@ -673,7 +674,8 @@ int main(int argc, char *argv[]) {
sycl::queue q = dr::mhp::select_queue();
std::cout << "Run on: "
<< q.get_device().get_info<sycl::info::device::name>() << "\n";
dr::mhp::init(q);
dr::mhp::init(q, options.count("device-memory") ? sycl::usm::alloc::device
: sycl::usm::alloc::shared);
#else
std::cout << "Sycl support requires icpx\n";
exit(1);
Expand Down

0 comments on commit beda783

Please sign in to comment.