Skip to content

Commit

Permalink
use kernel type not kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetyusufoglu committed Mar 22, 2024
1 parent 683f1c0 commit 879f4ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 39 deletions.
39 changes: 1 addition & 38 deletions include/alpaka/workdiv/WorkDivHelpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ namespace alpaka
{
#if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) || defined(ALPAKA_ACC_GPU_HIP_ENABLED)
auto kernelName
= alpaka::detail::gpuKernel<kernel, TApi, TAcc, TDim, TIdx, remove_restrict_t<std::decay_t<TArgs>>...>;
= alpaka::detail::gpuKernel<TKernel, TApi, TAcc, Dim, Idx, remove_restrict_t<std::decay_t<TArgs>>...>;
// Log the function attributes.
typename TApi::FuncAttributes_t funcAttrs;
ALPAKA_UNIFORM_CUDA_HIP_RT_CHECK(TApi::funcGetAttributes(&funcAttrs, kernelName));
Expand All @@ -350,43 +350,6 @@ namespace alpaka
<< " ptxVersion: " << funcAttrs.ptxVersion << " sharedSizeBytes: " << funcAttrs.sharedSizeBytes
<< " B" << std::endl;
#endif

// std::cout << ". MaxBlockDimX:" << funcAttrs.maxBlockDimX
// << ". MaxBlockDimY:" << funcAttrs.maxBlockDimY
// << ". MaxBlockDimZ:" << funcAttrs.maxBlockDimZ
// << ". MaxGridDimX:" << funcAttrs.maxGridDimX
// << ". MaxGridDimY:" << funcAttrs.maxGridDimY
// << ". MaxGridDimZ:" << funcAttrs.maxGridDimZ << std::endl;

// // choose between Blocking and NonBlocking
// using QueueProperty = alpaka::Blocking;
// using Queue = alpaka::Queue<Acc, QueueProperty>;


// auto const platformAcc = alpaka::Platform<Acc>{};
// auto const devAcc = alpaka::getDevByIdx(platformAcc, 0);


// Queue queue(devAcc);


// HelloWorldKernel helloWorldKernel;

// // Run the kernel
// //
// // To execute the kernel, you have to provide the
// // work division as well as the additional kernel function
// // parameters.
// // The kernel execution task is enqueued into an accelerator queue.
// // The queue can be blocking or non-blocking
// // depending on the chosen queue type (see type definitions above).
// // Here it is synchronous which means that the kernel is directly executed.
// alpaka::exec<Acc>(
// queue,
// workDiv,
// helloWorldKernel
// /* put kernel arguments here */);
// alpaka::wait(queue);
}

//! \tparam TDim The dimensionality of the accelerator device properties.
Expand Down
2 changes: 1 addition & 1 deletion test/unit/workDiv/src/WorkDivForKernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ TEMPLATE_LIST_TEST_CASE("enqueueWithValidWorkDiv.1D.withIdx", "[workDivKernel]",
auto const platform = alpaka::Platform<Acc>{};
auto const dev = alpaka::getDevByIdx(platform, 0);
// test that we can call getValidWorkDiv with the Idx type directly instead of a Vec
alpaka::enqueueWithValidWorkDiv<TApi, Acc>(dev, kernel, Vec{256}, Vec{13});
alpaka::enqueueWithValidWorkDiv<TApi, Acc, decltype(dev), HelloWorldKernel>(dev, kernel, Vec{256}, Vec{13});
// CHECK(alpaka::enqueueWithValidWorkDiv<Acc>(dev, Idx{256}, Idx{13}));
}
#endif
Expand Down

0 comments on commit 879f4ba

Please sign in to comment.