docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
rocm_reduce_dispatcher.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <string>
5#include <vector>
6
14
15namespace sdfg {
16namespace rocm {
17
27protected:
28 std::string schedule_value() const override;
30 std::unique_ptr<codegen::LanguageExtension> create_device_language_extension() const override;
31 bool is_device_pointer_storage(const types::StorageType& storage) const override;
32 std::string kernel_file_extension() const override;
33 void emit_kernel_includes(codegen::CodeSnippetFactory& library_snippet_factory) const override;
34 void emit_library_preamble(codegen::PrettyPrinter& library_stream) const override;
36 codegen::PrettyPrinter& main_stream,
37 const std::string& kernel_name,
38 symbolic::Expression& num_blocks,
39 symbolic::Expression& block_size,
40 std::vector<std::string>& arguments_device
41 ) override;
42
43public:
45 codegen::LanguageExtension& language_extension,
47 analysis::AnalysisManager& analysis_manager,
49 codegen::InstrumentationPlan& instrumentation_plan,
50 codegen::ArgCapturePlan& arg_capture_plan
51 );
52};
53
54} // namespace rocm
55} // namespace sdfg
Definition structured_sdfg.h:30
Definition analysis.h:53
Definition arg_capture_plan.h:36
Originally started out as a handler for additional source files, like hardware-accelerator kernels th...
Definition code_snippet_factory.h:69
Definition instrumentation_plan.h:26
Definition language_extension.h:39
Definition utils.h:16
Atomics-based GPU code generator for structured_control_flow::Reduce.
Definition gpu_reduce_dispatcher.h:48
std::string schedule_value() const override
Schedule value string identifying this backend's GPU schedule ("CUDA"/"ROCM").
bool is_device_pointer_storage(const types::StorageType &storage) const override
True if storage designates a device-resident generic pointer for this backend.
codegen::TargetType target_type() const override
Target type used for instrumentation info.
void emit_library_preamble(codegen::PrettyPrinter &library_stream) const override
Emit any extra preamble at the top of the kernel translation unit.
std::string kernel_file_extension() const override
File extension for the kernel translation unit ("cu"/"rocm.cpp").
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)
std::unique_ptr< codegen::LanguageExtension > create_device_language_extension() const override
Create the backend device-code language extension (CUDA/HIP).
void emit_kernel_includes(codegen::CodeSnippetFactory &library_snippet_factory) const override
Emit the backend include directives required by the generated kernel.
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.
Represents a loop with an associative/commutative reduction carried dependency.
Definition reduce.h:106
Represents the storage location and management characteristics of data.
Definition type.h:64
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
StringEnum TargetType
Definition instrumentation_info.h:32
Definition rocm_library_node_rewriter_pass.h:9
Definition analysis.h:7
Symbolic system for integer-based symbol analysis.