docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::gpu::GPUOffloadDispatcherStrategy Class Referenceabstract

#include <sdfg/targets/gpu/gpu_offload_base_dispatcher.h>

Inheritance diagram for sdfg::gpu::GPUOffloadDispatcherStrategy:
[legend]

Public Member Functions

virtual ~GPUOffloadDispatcherStrategy ()=default
virtual bool is_matching_kernel_language_extension (const StructuredSDFG &sdfg, const StructuredLoop &loop, codegen::LanguageExtension &language_extension)=0
virtual std::unique_ptr< codegen::LanguageExtension > create_kernel_language_extension (StructuredSDFG &sdfg, const StructuredLoop &loop)=0
void require_matching_kernel_language_extension (const StructuredSDFG &sdfg, const StructuredLoop &loop, codegen::LanguageExtension &language_extension)
virtual void emit_target_header_declarations (codegen::PrettyPrinter &kernel_header_stream)=0
 Target-specific includes/declarations emitted into the kernel include header (device fp16/bf16 intrinsics, lib-dependency includes, ...).
virtual void emit_target_global_includes (codegen::CodeSnippetFactory &library_snippet_factory)=0
virtual void dispatch_kernel_call (codegen::PrettyPrinter &main_stream, const std::string &kernel_name, codegen::LanguageExtension &host_language_ext, symbolic::Expression &num_blocks_x, symbolic::Expression &num_blocks_y, symbolic::Expression &num_blocks_z, symbolic::Expression &block_size_x, symbolic::Expression &block_size_y, symbolic::Expression &block_size_z, std::vector< std::string > &arguments_device)=0
virtual codegen::TargetType get_instrumentation_kernel_target_type () const =0
virtual int get_warp_size () const =0
virtual bool is_device_pointer_storage (const types::StorageType &storage) const =0
virtual std::string kernel_file_extension () const =0
 File extension for the kernel translation unit ("cu"/"rocm.cpp").
virtual std::string kernel_header_file_extension () const =0
 File extension for the kernel's include header ("cu.h"/"rocm.h").
virtual std::string warp_shuffle_xor (const std::string &value, const std::string &lane_mask) const =0
 Cross-lane XOR butterfly shuffle of value by lane_mask (CUDA/HIP __shfl_xor_sync).

Constructor & Destructor Documentation

◆ ~GPUOffloadDispatcherStrategy()

virtual sdfg::gpu::GPUOffloadDispatcherStrategy::~GPUOffloadDispatcherStrategy ( )
virtualdefault

Member Function Documentation

◆ create_kernel_language_extension()

virtual std::unique_ptr< codegen::LanguageExtension > sdfg::gpu::GPUOffloadDispatcherStrategy::create_kernel_language_extension ( StructuredSDFG & sdfg,
const StructuredLoop & loop )
pure virtual

◆ dispatch_kernel_call()

virtual void sdfg::gpu::GPUOffloadDispatcherStrategy::dispatch_kernel_call ( codegen::PrettyPrinter & main_stream,
const std::string & kernel_name,
codegen::LanguageExtension & host_language_ext,
symbolic::Expression & num_blocks_x,
symbolic::Expression & num_blocks_y,
symbolic::Expression & num_blocks_z,
symbolic::Expression & block_size_x,
symbolic::Expression & block_size_y,
symbolic::Expression & block_size_z,
std::vector< std::string > & arguments_device )
pure virtual

◆ emit_target_global_includes()

virtual void sdfg::gpu::GPUOffloadDispatcherStrategy::emit_target_global_includes ( codegen::CodeSnippetFactory & library_snippet_factory)
pure virtual

◆ emit_target_header_declarations()

virtual void sdfg::gpu::GPUOffloadDispatcherStrategy::emit_target_header_declarations ( codegen::PrettyPrinter & kernel_header_stream)
pure virtual

Target-specific includes/declarations emitted into the kernel include header (device fp16/bf16 intrinsics, lib-dependency includes, ...).

Implemented in sdfg::cuda::CUDAOffloadDispatcherStrategy, and sdfg::rocm::ROCMOffloadDispatcherStrategy.

◆ get_instrumentation_kernel_target_type()

virtual codegen::TargetType sdfg::gpu::GPUOffloadDispatcherStrategy::get_instrumentation_kernel_target_type ( ) const
pure virtual

◆ get_warp_size()

virtual int sdfg::gpu::GPUOffloadDispatcherStrategy::get_warp_size ( ) const
pure virtual

◆ is_device_pointer_storage()

virtual bool sdfg::gpu::GPUOffloadDispatcherStrategy::is_device_pointer_storage ( const types::StorageType & storage) const
pure virtual

◆ is_matching_kernel_language_extension()

virtual bool sdfg::gpu::GPUOffloadDispatcherStrategy::is_matching_kernel_language_extension ( const StructuredSDFG & sdfg,
const StructuredLoop & loop,
codegen::LanguageExtension & language_extension )
pure virtual

◆ kernel_file_extension()

virtual std::string sdfg::gpu::GPUOffloadDispatcherStrategy::kernel_file_extension ( ) const
pure virtual

File extension for the kernel translation unit ("cu"/"rocm.cpp").

Implemented in sdfg::cuda::CUDAOffloadDispatcherStrategy, and sdfg::rocm::ROCMOffloadDispatcherStrategy.

◆ kernel_header_file_extension()

virtual std::string sdfg::gpu::GPUOffloadDispatcherStrategy::kernel_header_file_extension ( ) const
pure virtual

File extension for the kernel's include header ("cu.h"/"rocm.h").

Implemented in sdfg::cuda::CUDAOffloadDispatcherStrategy, and sdfg::rocm::ROCMOffloadDispatcherStrategy.

◆ require_matching_kernel_language_extension()

void sdfg::gpu::GPUOffloadDispatcherStrategy::require_matching_kernel_language_extension ( const StructuredSDFG & sdfg,
const StructuredLoop & loop,
codegen::LanguageExtension & language_extension )
inline

◆ warp_shuffle_xor()

virtual std::string sdfg::gpu::GPUOffloadDispatcherStrategy::warp_shuffle_xor ( const std::string & value,
const std::string & lane_mask ) const
pure virtual

Cross-lane XOR butterfly shuffle of value by lane_mask (CUDA/HIP __shfl_xor_sync).

Implemented in sdfg::cuda::CUDAOffloadDispatcherStrategy, and sdfg::rocm::ROCMOffloadDispatcherStrategy.


The documentation for this class was generated from the following file: