|
docc 0.8.3 (0d44999b)
C++ API Reference
|
Atomics-based ROCm/HIP code generator for structured_control_flow::Reduce. More...
#include <sdfg/targets/rocm/rocm_reduce_dispatcher.h>
Protected Member Functions | |
| std::string | schedule_value () const override |
| Schedule value string identifying this backend's GPU schedule ("CUDA"/"ROCM"). | |
| codegen::TargetType | target_type () const override |
| Target type used for instrumentation info. | |
| std::unique_ptr< codegen::LanguageExtension > | create_device_language_extension () const override |
| Create the backend device-code language extension (CUDA/HIP). | |
| bool | is_device_pointer_storage (const types::StorageType &storage) const override |
True if storage designates a device-resident generic pointer for this backend. | |
| std::string | kernel_file_extension () const override |
| File extension for the kernel translation unit ("cu"/"rocm.cpp"). | |
| void | emit_kernel_includes (codegen::CodeSnippetFactory &library_snippet_factory) const override |
| Emit the backend include directives required by the generated kernel. | |
| void | emit_library_preamble (codegen::PrettyPrinter &library_stream) const override |
| Emit any extra preamble at the top of the kernel translation unit. | |
| void | emit_kernel_call (codegen::PrettyPrinter &main_stream, const std::string &kernel_name, symbolic::Expression &num_blocks, symbolic::Expression &block_size, std::vector< std::string > &arguments_device) override |
| Emit the host-side kernel launch. | |
| Protected Member Functions inherited from sdfg::gpu::GPUReduceDispatcher | |
| bool | is_nested_in_gpu_kernel () |
| True if this Reduce is nested inside an enclosing GPU kernel (an ancestor Map with this backend's GPU schedule). | |
| void | dispatch_header (codegen::PrettyPrinter &stream, const std::string &kernel_name, std::vector< std::string > &arguments_declaration) |
| void | dispatch_reduce_core (codegen::CodeSnippetFactory &library_snippet_factory, codegen::PrettyPrinter &library_stream, GPUDimension dimension, bool declare_scope_variables, std::vector< std::string > &scope_variables) |
Emit the privatize + grid-stride reduce loop + atomic merge into the given (device) stream, parallelized on dimension. | |
| void | dispatch_atomic_merge (codegen::PrettyPrinter &library_stream, codegen::CodeSnippetFactory &library_snippet_factory, const structured_control_flow::ReductionInfo &reduction) |
| Emit the device-side helper(s) and the atomic merge statement that combines a thread's private partial into the global accumulator. | |
| Protected Member Functions inherited from sdfg::codegen::NodeDispatcher | |
| virtual bool | begin_node (PrettyPrinter &stream) |
| virtual void | end_node (PrettyPrinter &stream, bool has_declaration) |
Additional Inherited Members | |
| Protected Attributes inherited from sdfg::gpu::GPUReduceDispatcher | |
| structured_control_flow::Reduce & | node_ |
| Protected Attributes inherited from sdfg::codegen::NodeDispatcher | |
| LanguageExtension & | language_extension_ |
| StructuredSDFG & | sdfg_ |
| InstrumentationPlan & | instrumentation_plan_ |
| ArgCapturePlan & | arg_capture_plan_ |
| analysis::AnalysisManager & | analysis_manager_ |
Atomics-based ROCm/HIP code generator for structured_control_flow::Reduce.
Thin ROCm specialization of gpu::GPUReduceDispatcher: the whole lowering (grid-stride reduce, privatization, atomic merge) lives in the shared base; this class only supplies the ROCm-specific policy (language extension, device-pointer storage, kernel launch syntax and includes).
| sdfg::rocm::ROCMReduceDispatcher::ROCMReduceDispatcher | ( | codegen::LanguageExtension & | language_extension, |
| StructuredSDFG & | sdfg, | ||
| analysis::AnalysisManager & | analysis_manager, | ||
| structured_control_flow::Reduce & | node, | ||
| codegen::InstrumentationPlan & | instrumentation_plan, | ||
| codegen::ArgCapturePlan & | arg_capture_plan ) |
|
overrideprotectedvirtual |
Create the backend device-code language extension (CUDA/HIP).
Implements sdfg::gpu::GPUReduceDispatcher.
|
overrideprotectedvirtual |
Emit the host-side kernel launch.
Implements sdfg::gpu::GPUReduceDispatcher.
|
overrideprotectedvirtual |
Emit the backend include directives required by the generated kernel.
Implements sdfg::gpu::GPUReduceDispatcher.
|
overrideprotectedvirtual |
Emit any extra preamble at the top of the kernel translation unit.
Implements sdfg::gpu::GPUReduceDispatcher.
|
overrideprotectedvirtual |
True if storage designates a device-resident generic pointer for this backend.
Implements sdfg::gpu::GPUReduceDispatcher.
|
overrideprotectedvirtual |
File extension for the kernel translation unit ("cu"/"rocm.cpp").
Implements sdfg::gpu::GPUReduceDispatcher.
|
overrideprotectedvirtual |
Schedule value string identifying this backend's GPU schedule ("CUDA"/"ROCM").
Implements sdfg::gpu::GPUReduceDispatcher.
|
overrideprotectedvirtual |
Target type used for instrumentation info.
Implements sdfg::gpu::GPUReduceDispatcher.