docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
sdfg::rocm::ROCMOffloadDispatcherStrategy Class Reference

ROCm/HIP specialization of gpu::GPUOffloadMapDispatcher. More...

#include <sdfg/targets/rocm/rocm_offload_dispatcher_strategy.h>

Inheritance diagram for sdfg::rocm::ROCMOffloadDispatcherStrategy:
[legend]

Public Member Functions

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) override
void emit_target_header_declarations (codegen::PrettyPrinter &kernel_header_stream) override
 Target-specific includes/declarations emitted into the kernel include header (device fp16/bf16 intrinsics, lib-dependency includes, ...).
void emit_target_global_includes (codegen::CodeSnippetFactory &library_snippet_factory) override
 ROCMOffloadDispatcherStrategy ()
void dispatch_kernel_launch_error_check (codegen::PrettyPrinter &stream, const codegen::LanguageExtension &language_extension)
int get_warp_size () const override
bool is_device_pointer_storage (const types::StorageType &storage) const override
std::string kernel_file_extension () const override
 File extension for the kernel translation unit ("cu"/"rocm.cpp").
std::string kernel_header_file_extension () const override
 File extension for the kernel's include header ("cu.h"/"rocm.h").
std::string warp_shuffle_xor (const std::string &value, const std::string &lane_mask) const override
 Cross-lane XOR butterfly shuffle of value by lane_mask (CUDA/HIP __shfl_xor_sync).
codegen::TargetType get_instrumentation_kernel_target_type () const override
bool is_matching_kernel_language_extension (const StructuredSDFG &sdfg, const StructuredLoop &loop, codegen::LanguageExtension &language_extension) override
std::unique_ptr< codegen::LanguageExtension > create_kernel_language_extension (StructuredSDFG &sdfg, const StructuredLoop &loop) override
Public Member Functions inherited from sdfg::gpu::GPUOffloadDispatcherStrategy
virtual ~GPUOffloadDispatcherStrategy ()=default
void require_matching_kernel_language_extension (const StructuredSDFG &sdfg, const StructuredLoop &loop, codegen::LanguageExtension &language_extension)

Static Public Attributes

static constexpr const char * KERNEL_SNIPPET_FILE_EXT = "rocm.cpp"
static constexpr const char * KERNEL_SNIPPET_HEADER_EXT = "rocm.h"

Detailed Description

ROCm/HIP specialization of gpu::GPUOffloadMapDispatcher.

Supplies the HIP-specific policy for the shared coverage-loop offload lowering: the device language extension, the hipLaunchKernelGGL kernel launch and launch-error check.

Constructor & Destructor Documentation

◆ ROCMOffloadDispatcherStrategy()

sdfg::rocm::ROCMOffloadDispatcherStrategy::ROCMOffloadDispatcherStrategy ( )

Member Function Documentation

◆ create_kernel_language_extension()

std::unique_ptr< codegen::LanguageExtension > sdfg::rocm::ROCMOffloadDispatcherStrategy::create_kernel_language_extension ( StructuredSDFG & sdfg,
const StructuredLoop & loop )
overridevirtual

◆ dispatch_kernel_call()

void sdfg::rocm::ROCMOffloadDispatcherStrategy::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 )
overridevirtual

◆ dispatch_kernel_launch_error_check()

void sdfg::rocm::ROCMOffloadDispatcherStrategy::dispatch_kernel_launch_error_check ( codegen::PrettyPrinter & stream,
const codegen::LanguageExtension & language_extension )

◆ emit_target_global_includes()

void sdfg::rocm::ROCMOffloadDispatcherStrategy::emit_target_global_includes ( codegen::CodeSnippetFactory & library_snippet_factory)
overridevirtual

◆ emit_target_header_declarations()

void sdfg::rocm::ROCMOffloadDispatcherStrategy::emit_target_header_declarations ( codegen::PrettyPrinter & kernel_header_stream)
overridevirtual

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

Implements sdfg::gpu::GPUOffloadDispatcherStrategy.

◆ get_instrumentation_kernel_target_type()

codegen::TargetType sdfg::rocm::ROCMOffloadDispatcherStrategy::get_instrumentation_kernel_target_type ( ) const
overridevirtual

◆ get_warp_size()

int sdfg::rocm::ROCMOffloadDispatcherStrategy::get_warp_size ( ) const
overridevirtual

◆ is_device_pointer_storage()

bool sdfg::rocm::ROCMOffloadDispatcherStrategy::is_device_pointer_storage ( const types::StorageType & storage) const
overridevirtual

◆ is_matching_kernel_language_extension()

bool sdfg::rocm::ROCMOffloadDispatcherStrategy::is_matching_kernel_language_extension ( const StructuredSDFG & sdfg,
const StructuredLoop & loop,
codegen::LanguageExtension & language_extension )
overridevirtual

◆ kernel_file_extension()

std::string sdfg::rocm::ROCMOffloadDispatcherStrategy::kernel_file_extension ( ) const
overridevirtual

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

Implements sdfg::gpu::GPUOffloadDispatcherStrategy.

◆ kernel_header_file_extension()

std::string sdfg::rocm::ROCMOffloadDispatcherStrategy::kernel_header_file_extension ( ) const
overridevirtual

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

Implements sdfg::gpu::GPUOffloadDispatcherStrategy.

◆ warp_shuffle_xor()

std::string sdfg::rocm::ROCMOffloadDispatcherStrategy::warp_shuffle_xor ( const std::string & value,
const std::string & lane_mask ) const
overridevirtual

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

Implements sdfg::gpu::GPUOffloadDispatcherStrategy.

Member Data Documentation

◆ KERNEL_SNIPPET_FILE_EXT

const char* sdfg::rocm::ROCMOffloadDispatcherStrategy::KERNEL_SNIPPET_FILE_EXT = "rocm.cpp"
staticconstexpr

◆ KERNEL_SNIPPET_HEADER_EXT

const char* sdfg::rocm::ROCMOffloadDispatcherStrategy::KERNEL_SNIPPET_HEADER_EXT = "rocm.h"
staticconstexpr

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