Nektar++
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
ExpressionBlockOpDeviceGenericSYCLHelper.hpp File Reference

Generation, runtime compilation and launch of the expression kernels on the SYCL back-ends. More...

#include <string>
#include <vector>
#include <MultiRegions/ElmtOps/Expression/ExpressionBlockOpDeviceGenericHelper.hpp>

Go to the source code of this file.

Classes

struct  Nektar::MultiRegions::detail::ExpressionKernels
 The name the generated source is compiled under. It only names the source in the runtime compiler's diagnostics. More...
 

Namespaces

namespace  Nektar
 
namespace  Nektar::MultiRegions
 
namespace  Nektar::MultiRegions::detail
 

Functions

void Nektar::MultiRegions::detail::InitExpressionKernelCompiler (void)
 Initialise the device context the runtime compiler needs: a cudaFree(0)/hipFree(0) on the native builds, nothing on SYCL.
 
template<typename TData >
std::string Nektar::MultiRegions::detail::GetExpressionKernelSource (const std::vector< LibUtilities::EquationSharedPtr > &exprs, const std::vector< bool > &cmask, const unsigned int coordDim)
 Generate the CUDA/HIP source of the expression kernel.
 
void Nektar::MultiRegions::detail::ReleaseExpressionKernels (ExpressionKernels &kernels)
 Unload the module holding the compiled kernels, if any.
 
template<typename TData >
void Nektar::MultiRegions::detail::CompileExpressionKernels (ExpressionKernels &kernels, const std::string &kernel_src, const unsigned int streamID)
 Compile the generated source; see BuildExpressionKernels().
 
template<typename TData >
void Nektar::MultiRegions::detail::LaunchExpressionKernel (const ExpressionKernels &kernels, const ExpressionKernelIndex index, const ExpressionKernelArgs< TData > &kernelArgs, const unsigned int gridSize, const unsigned int blockSize, const unsigned int streamID)
 Launch a variant of the compiled kernels on the block's stream.
 

Detailed Description

Generation, runtime compilation and launch of the expression kernels on the SYCL back-ends.

Offloading to CUDA or HIP, the kernels are those of ExpressionBlockOpDeviceGenericHIPCUDAHelper.hpp, and only the compilation and launch are wrapped in host operations ordered on the block's queue. On Intel, SYCL source is generated and compiled through the oneAPI kernel-compiler extension, which the device must support.

Definition in file ExpressionBlockOpDeviceGenericSYCLHelper.hpp.