• 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

75.76
/opt/src/targets/cuda/plugin.cpp
1
#include "sdfg/targets/cuda/plugin.h"
2

3

4
namespace sdfg::cuda {
5

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

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

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

36
    libNodeSerRegistry.register_library_node_serializer(cuda::LibraryNodeType_CUDA_Offloading.value(), []() {
8✔
37
        return std::make_unique<cuda::CUDADataOffloadingNodeSerializer>();
8✔
38
    });
8✔
39

40

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

66
    // GEMM - CUBLAS with data transfers
67
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
68
        math::blas::LibraryNodeType_GEMM.value() + "::" + cuda::ImplementationType_CUDAWithTransfers.value(),
1✔
69
        [](codegen::LanguageExtension& language_extension,
1✔
70
           const Function& function,
1✔
71
           const data_flow::DataFlowGraph& data_flow_graph,
1✔
72
           const data_flow::LibraryNode& node) {
1✔
NEW
73
            return std::make_unique<blas::GEMMNodeDispatcher_CUBLASWithTransfers>(
×
NEW
74
                language_extension, function, data_flow_graph, dynamic_cast<const math::blas::GEMMNode&>(node)
×
NEW
75
            );
×
NEW
76
        }
×
77
    );
1✔
78
    // GEMM - CUBLAS without data transfers
79
    libNodeDispatcherRegistry.register_library_node_dispatcher(
1✔
80
        math::blas::LibraryNodeType_GEMM.value() + "::" + cuda::ImplementationType_CUDAWithoutTransfers.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_CUBLASWithoutTransfers>(
×
NEW
86
                language_extension, function, data_flow_graph, dynamic_cast<const math::blas::GEMMNode&>(node)
×
NEW
87
            );
×
NEW
88
        }
×
89
    );
1✔
90

91

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

117

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

122
} // namespace sdfg::cuda
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