• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daisytuner / docc / 24845644334

23 Apr 2026 04:05PM UTC coverage: 64.104% (-0.06%) from 64.167%
24845644334

push

github

web-flow
Modular Compile process (#690)

 + DoccTarget to allow modularly adding support for snippets that need to be compiled differently (standalone, cross-compiled kernels or just with special compilers)
 + Builder infrastructure to define C/C++ build options with inheritance, overrides and ability to modify by plugins, extensions and targets as needed
 + The redirected handling of snippets based on the extension can contribute link-options when they have been used (the generic solution to highway support)
 + Model to handle any parallism for compile in its own class without having to touch the definitions and compile options
 + DoccPaths extended to resolve default plugin dirs (as used by et-plugin)
 + PrettyPrinter can write directly to another (file) stream instead of a local buffer
 * extended CodeGenerator to allow generating the header first and direct-to-file (its needed for all snippet & main compile, which could be parallel otherwise)
 + Defaults to parallel builds with as many cores as present
 + DOCC_DEBUG is more defined. A list of key-value pairs separated by ; or : Supported options: "dump" dump sdfgs, "build" add debug symbols, "build_threads=x" override thread count. less then 1 is the default auto-selection.
 + CodegenStats is integrated into the new Compiler concept. To reduce the impact of the asynchronicity, times are always measured, but only recored with the CodegenStats if enabled and later, in sequential places. The items recorded now include the sdfg & snippet names to identify slow parts
 + Switched MacOS tests over to inplace-python with only 1 build

224 of 347 new or added lines in 13 files covered. (64.55%)

2 existing lines in 2 files now uncovered.

30800 of 48047 relevant lines covered (64.1%)

573.39 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/opt/src/targets/rocm/plugin.cpp
1
#include "sdfg/targets/rocm/plugin.h"
2

3
namespace sdfg::rocm {
4

5
void register_rocm_plugin(plugins::Context& context) {
1✔
6
    auto& libNodeDispatcherRegistry = context.library_node_dispatcher_registry;
1✔
7
    auto& mapDispatcherRegistry = context.map_dispatcher_registry;
1✔
8
    auto& libNodeSerRegistry = context.library_node_serializer_registry;
1✔
9

10
    mapDispatcherRegistry.register_map_dispatcher(
1✔
11
        ScheduleType_ROCM::value(),
1✔
12
        [](codegen::LanguageExtension& language_extension,
1✔
13
           StructuredSDFG& sdfg,
1✔
14
           analysis::AnalysisManager& analysis_manager,
1✔
15
           structured_control_flow::Map& node,
1✔
16
           codegen::InstrumentationPlan& instrumentation_plan,
1✔
17
           codegen::ArgCapturePlan& arg_capture_plan) {
1✔
NEW
18
            return std::make_unique<ROCMMapDispatcher>(
×
NEW
19
                language_extension, sdfg, analysis_manager, node, instrumentation_plan, arg_capture_plan
×
NEW
20
            );
×
NEW
21
        }
×
22
    );
1✔
23

24
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
25
        rocm::LibraryNodeType_ROCM_Offloading.value() + "::" + data_flow::ImplementationType_NONE.value(),
1✔
26
        [](codegen::LanguageExtension& language_extension,
1✔
27
           const Function& function,
1✔
28
           const data_flow::DataFlowGraph& data_flow_graph,
1✔
29
           const data_flow::LibraryNode& node) {
1✔
NEW
30
            return std::make_unique<
×
NEW
31
                rocm::ROCMDataOffloadingNodeDispatcher>(language_extension, function, data_flow_graph, node);
×
NEW
32
        }
×
33
    );
1✔
34

35
    libNodeSerRegistry.register_library_node_serializer(rocm::LibraryNodeType_ROCM_Offloading.value(), []() {
1✔
NEW
36
        return std::make_unique<rocm::ROCMDataOffloadingNodeSerializer>();
×
NEW
37
    });
×
38

39

40
    // Dot - ROCMBLAS with data transfers
41
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
42
        math::blas::LibraryNodeType_DOT.value() + "::" + rocm::ImplementationType_ROCMWithTransfers.value(),
1✔
43
        [](codegen::LanguageExtension& language_extension,
1✔
44
           const Function& function,
1✔
45
           const data_flow::DataFlowGraph& data_flow_graph,
1✔
46
           const data_flow::LibraryNode& node) {
1✔
NEW
47
            return std::make_unique<blas::DotNodeDispatcher_ROCMBLASWithTransfers>(
×
NEW
48
                language_extension, function, data_flow_graph, dynamic_cast<const math::blas::DotNode&>(node)
×
NEW
49
            );
×
NEW
50
        }
×
51
    );
1✔
52
    // Dot - ROCMBLAS without data transfers
53
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
54
        math::blas::LibraryNodeType_DOT.value() + "::" + rocm::ImplementationType_ROCMWithoutTransfers.value(),
1✔
55
        [](codegen::LanguageExtension& language_extension,
1✔
56
           const Function& function,
1✔
57
           const data_flow::DataFlowGraph& data_flow_graph,
1✔
58
           const data_flow::LibraryNode& node) {
1✔
NEW
59
            return std::make_unique<blas::DotNodeDispatcher_ROCMBLASWithoutTransfers>(
×
NEW
60
                language_extension, function, data_flow_graph, dynamic_cast<const math::blas::DotNode&>(node)
×
NEW
61
            );
×
NEW
62
        }
×
63
    );
1✔
64

65
    // GEMM - ROCMBLAS with data transfers
66
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
67
        math::blas::LibraryNodeType_GEMM.value() + "::" + rocm::ImplementationType_ROCMWithTransfers.value(),
1✔
68
        [](codegen::LanguageExtension& language_extension,
1✔
69
           const Function& function,
1✔
70
           const data_flow::DataFlowGraph& data_flow_graph,
1✔
71
           const data_flow::LibraryNode& node) {
1✔
NEW
72
            return std::make_unique<blas::GEMMNodeDispatcher_ROCMBLASWithTransfers>(
×
NEW
73
                language_extension, function, data_flow_graph, dynamic_cast<const math::blas::GEMMNode&>(node)
×
NEW
74
            );
×
NEW
75
        }
×
76
    );
1✔
77

78
    // GEMM - ROCM hand-tuned kernel (data already on GPU)
79
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
80
        math::blas::LibraryNodeType_GEMM.value() + "::" + rocm::ImplementationType_ROCMWithoutTransfers.value(),
1✔
81
        [](codegen::LanguageExtension& language_extension,
1✔
82
           const Function& function,
1✔
83
           const data_flow::DataFlowGraph& data_flow_graph,
1✔
84
           const data_flow::LibraryNode& node) {
1✔
NEW
85
            return std::make_unique<blas::GEMMNodeDispatcher_ROCMHandTuned>(
×
NEW
86
                language_extension, function, data_flow_graph, dynamic_cast<const math::blas::GEMMNode&>(node)
×
NEW
87
            );
×
NEW
88
        }
×
89
    );
1✔
90

91
    // Memset - ROCM with data transfers
92
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
93
        sdfg::stdlib::LibraryNodeType_Memset.value() + "::" + rocm::ImplementationType_ROCMWithTransfers.value(),
1✔
94
        [](codegen::LanguageExtension& language_extension,
1✔
95
           const Function& function,
1✔
96
           const data_flow::DataFlowGraph& data_flow_graph,
1✔
97
           const data_flow::LibraryNode& node) {
1✔
NEW
98
            return std::make_unique<rocm::stdlib::MemsetNodeDispatcher_ROCMWithTransfers>(
×
NEW
99
                language_extension, function, data_flow_graph, dynamic_cast<const sdfg::stdlib::MemsetNode&>(node)
×
NEW
100
            );
×
NEW
101
        }
×
102
    );
1✔
103
    // Memset - ROCM without data transfers
104
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
105
        sdfg::stdlib::LibraryNodeType_Memset.value() + "::" + rocm::ImplementationType_ROCMWithoutTransfers.value(),
1✔
106
        [](codegen::LanguageExtension& language_extension,
1✔
107
           const Function& function,
1✔
108
           const data_flow::DataFlowGraph& data_flow_graph,
1✔
109
           const data_flow::LibraryNode& node) {
1✔
NEW
110
            return std::make_unique<rocm::stdlib::MemsetNodeDispatcher_ROCMWithoutTransfers>(
×
NEW
111
                language_extension, function, data_flow_graph, dynamic_cast<const sdfg::stdlib::MemsetNode&>(node)
×
NEW
112
            );
×
NEW
113
        }
×
114
    );
1✔
115

116

117
    context.scheduler_registry
1✔
118
        .register_loop_scheduler<passes::scheduler::ROCMScheduler>(passes::scheduler::ROCMScheduler::target());
1✔
119
}
1✔
120

121
} // namespace sdfg::rocm
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc