Open chichunchen opened 1 year ago
Dispatcher_T::template makeDispatcher<T>(
[](auto&& factory) {
return omp_target::get_cached_value(
std::forward<decltype(factory)>(factory));
}) };
I can see that we'd like to choose the device version of makeDispatcher in "include/RAJA/pattern/WorkGroup/Dispatcher.hpp" but probably need to also provide the type of the lambda for makeDispatcher
? I'm not familiar with C++ template metaprogramming so don't know if it's a compiler feature or something. I also tried compiling with C++17 but still got the same compile error.
@chichunchen do you need to use the OpenMP target offload back-end for RAJA? We don't consider it production ready, rather something we try to maintain it to test compilers and we don't spend much time on it. Depending on what you are trying to do and what hardware you are targeting, you will have better luck with performance, compiler and RAJA support with the CUDA or HIP back-ends. The RAJA SYCL back-end is in development, but a large fraction of features are supported already.
Hmm, it looks like its trying to call the host version of makeDispatcher but it sohuld be calling the device version. The fix may be as simple as adding Platform::omp_target in dispatcher_use_host_invoke.
Below three tests weren't compiled with either Clang-15 or gcc-11.1.0.
All three tests can be compiled if removing the argument in
makeDispatcher
in include/RAJA/policy/openmp_target/WorkGroup/Dispatcher.hppCMake configuration:
Error message: