docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
plugin.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <optional>
5#include <string>
6
14
15namespace sdfg {
16namespace omp {
17
19public:
20 std::optional<tiles::AxisSchedule> classify(const structured_control_flow::ScheduleType& sched) const override {
22 return std::nullopt;
23 }
25 }
26
30
35 }
36
38 return false;
39 }
40
41 unsigned lane_width() const override {
42 return 1;
43 }
44
49};
50
54 [](codegen::LanguageExtension& language_extension,
56 analysis::AnalysisManager& analysis_manager,
58 codegen::InstrumentationPlan& instrumentation_plan,
59 codegen::ArgCapturePlan& arg_capture_plan) {
60 return std::make_unique<OMPMapDispatcher>(
61 language_extension, sdfg, analysis_manager, node, instrumentation_plan, arg_capture_plan
62 );
63 }
64 );
65
68
69 context.get_tile_target_registry().register_target(ScheduleType_OMP::value(), std::make_shared<OMPTileTarget>());
70}
71
72inline void register_omp_plugin() {
75}
76
77} // namespace omp
78} // namespace sdfg
Definition structured_sdfg.h:30
Definition analysis.h:53
Definition arg_capture_plan.h:36
Definition instrumentation_plan.h:26
Definition language_extension.h:39
void register_map_dispatcher(std::string schedule_type, MapDispatcherFn fn)
Definition node_dispatcher_registry.h:136
Definition plugin.h:18
tiles::Space space(tiles::Level) const override
A host thread pool has no on-chip scratchpad: every level cooperates through global memory.
Definition plugin.h:33
bool supports_cooperative_staging(const structured_control_flow::ScheduleType &) const override
Whether sched can host a block-cooperative shared-memory staging copy driven by its own parallel thre...
Definition plugin.h:37
std::optional< tiles::AxisSchedule > classify(const structured_control_flow::ScheduleType &sched) const override
Classify one loop's sched into target-neutral cooperation facts (AxisSchedule: level,...
Definition plugin.h:20
types::StorageType storage_type(tiles::Space space) const override
The concrete buffer that realizes an abstract cooperation Space on this target: e....
Definition plugin.h:27
data_flow::ImplementationType implementation_type() const override
A host thread pool has no cp.async / vector-copy / pipeline library nodes.
Definition plugin.h:46
unsigned lane_width() const override
The SIMD lane / subgroup width, used only to keep a subgroup's cooperative stores bank-conflict-free ...
Definition plugin.h:41
static const std::string value()
Definition schedule.h:77
Definition omp_scheduler.h:9
static std::string target()
Definition omp_scheduler.h:45
void register_loop_scheduler(std::string target, Args... args)
Definition scheduler_registry.h:25
Represents a parallel map loop with configurable scheduling.
Definition map.h:47
Represents a schedule type for Map nodes.
Definition structured_loop.h:31
ScheduleTypeCategory category() const
Get the schedule type category.
Definition structured_loop.h:61
Target-neutral cooperation facts derived from one loop's schedule.
Definition tile.h:42
void register_target(const std::string &schedule_value, std::shared_ptr< TileTarget > target)
Definition tile_target_registry.h:31
Definition tile_target.h:39
bool has_scratchpad() const
Whether this target exposes any on-chip cooperative tier below global memory (a scratchpad hierarchy)...
Definition tile_target.h:61
Represents the storage location and management characteristics of data.
Definition type.h:64
static StorageType CPU_Stack()
Creates a CPU stack storage type.
Definition type.h:270
static StorageType CPU_Heap()
Creates a CPU heap storage type with default unmanaged allocation.
Definition type.h:278
StringEnum ImplementationType
Implementation type identifier for library nodes.
Definition library_node.h:75
ImplementationType ImplementationType_NONE
Default implementation type indicating no specific implementation.
Definition library_node.h:84
Definition omp_map_dispatcher.h:10
void register_omp_plugin()
Definition plugin.h:72
Space
Memory that backs cooperation at a level: Device/CPU -> Global (atomics/heap), Group -> Shared,...
Definition tile.h:36
@ Register
Definition tile.h:36
@ Global
Definition tile.h:36
Level
Cooperation scope of a parallel axis, coarsest to finest — target-neutral tiers (OpenCL/SYCL vocabula...
Definition tile.h:32
@ Device
Definition tile.h:32
Definition analysis.h:7
Registry system for dispatchers and library node dispatchers.
TODO this class is broken.
Definition plugins.h:28
passes::scheduler::SchedulerRegistry & get_scheduler_registry()
Definition plugins.h:63
static Context global_context()
Definition plugins.h:99
codegen::MapDispatcherRegistry & get_map_dispatcher_registry()
Definition plugins.h:41
tiles::TileTargetRegistry & get_tile_target_registry()
Definition plugins.h:68