Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the error message when trying to call a kernel from a .cc file #43163

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions HeterogeneousCore/AlpakaInterface/interface/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,25 @@ namespace alpaka_cuda_async {

} // namespace alpaka_cuda_async

#ifdef ALPAKA_HOST_ONLY

namespace alpaka {

template <typename TApi, typename TAcc, typename TDim, typename TIdx, typename TKernelFnObj, typename... TArgs>
class TaskKernelGpuUniformCudaHipRt final {
static_assert(std::is_same_v<TApi, alpaka::ApiCudaRt> and BOOST_LANG_CUDA,
"You should move this files to a .dev.cc file under the alpaka/ subdirectory.");

public:
template <typename TWorkDiv>
ALPAKA_FN_HOST TaskKernelGpuUniformCudaHipRt(TWorkDiv&& workDiv, TKernelFnObj const& kernelFnObj, TArgs&&... args) {
}
};

} // namespace alpaka

#endif // ALPAKA_HOST_ONLY

#ifdef ALPAKA_ACCELERATOR_NAMESPACE
#define ALPAKA_DUPLICATE_NAMESPACE
#else
Expand All @@ -81,6 +100,25 @@ namespace alpaka_rocm_async {

} // namespace alpaka_rocm_async

#ifdef ALPAKA_HOST_ONLY

namespace alpaka {

template <typename TApi, typename TAcc, typename TDim, typename TIdx, typename TKernelFnObj, typename... TArgs>
class TaskKernelGpuUniformCudaHipRt final {
static_assert(std::is_same_v<TApi, alpaka::ApiHipRt> and BOOST_LANG_HIP,
"You should move this files to a .dev.cc file under the alpaka/ subdirectory.");

public:
template <typename TWorkDiv>
ALPAKA_FN_HOST TaskKernelGpuUniformCudaHipRt(TWorkDiv&& workDiv, TKernelFnObj const& kernelFnObj, TArgs&&... args) {
}
};

} // namespace alpaka

#endif // ALPAKA_HOST_ONLY

#ifdef ALPAKA_ACCELERATOR_NAMESPACE
#define ALPAKA_DUPLICATE_NAMESPACE
#else
Expand Down