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

daisytuner / docc / 28158800507

25 Jun 2026 08:57AM UTC coverage: 61.644% (+0.06%) from 61.582%
28158800507

push

github

web-flow
MapFusionByDomain (#771)

 + New Map fusion caches data about iteration domain and map candidates
 + only matches up iteration domain exactly, per loop level.
 + Can support fusing non-leaf stacks of loops (stack ends where the shallower stack stops being perfectly nested & parallel)
 + new Element::replace for bulk replacements
 + New PatternMatcher visitor supports descending into replaced or modified nodes to allow for single-pass nested loop fusings
 + LoopAnalysis can now be kept up-to-date with changes done by Map-fusion
 + unit tests for the updating of LoopAnalysis
 * updated LoopAnalysis to be easier to keep up-to-date with changes. LoopTree is no longer ordered, if you want to iterate in pre-order, use the specific method for that
 + convenience StructuredSDFGBuilder.remove_from_parent()
 + RedundantLoadElim pass to skip reading from memory locations that have just been written (same block). Fusing no longer needs to do this
     RedundantLoadElimination does a simple check for other writes to the same structure. Can skip writes if redundant or not modify, if their are writes to different indices
* Updated verifiers to match new fusion
~ moved verifier checks behind correctness checks in npbench harness. Its more critical if we do not even get the expected results
* Added MapFusionByDomain also to loop-norm stage (currently inactive, causes more kernels that currently cannot be safely offloaded to CUDA.
---------

Co-authored-by: Lukas Truemper <lukas.truemper@outlook.de>

771 of 1186 new or added lines in 55 files covered. (65.01%)

6 existing lines in 6 files now uncovered.

38302 of 62134 relevant lines covered (61.64%)

987.24 hits per line

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

0.0
/sdfg/src/data_flow/library_nodes/stdlib/trap.cpp
1
#include "sdfg/data_flow/library_nodes/stdlib/trap.h"
2

3
namespace sdfg {
4
namespace stdlib {
5

6
TrapNode::TrapNode(
7
    size_t element_id, const DebugInfo& debug_info, const graph::Vertex vertex, data_flow::DataFlowGraph& parent
8
)
9
    : StdlibNode(
×
10
          element_id, debug_info, vertex, parent, LibraryNodeType_Trap, {}, {}, true, data_flow::ImplementationType_NONE
×
11
      ) {}
×
12

13
void TrapNode::validate(const Function& function) const { LibraryNode::validate(function); }
×
14

15
symbolic::SymbolSet TrapNode::symbols() const { return symbolic::SymbolSet(); }
×
16

17
std::unique_ptr<data_flow::DataFlowNode> TrapNode::
18
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
×
19
    return std::make_unique<TrapNode>(element_id, debug_info_, vertex, parent);
×
20
}
×
21

22
void TrapNode::replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) {
×
23
    this->size_ = symbolic::subs(this->size_, old_expression, new_expression);
×
24
}
×
25

NEW
26
void TrapNode::replace(const symbolic::ExpressionMapping& replacements) {
×
NEW
27
    this->size_ = symbolic::subs(this->size_, replacements);
×
NEW
28
}
×
29

30
nlohmann::json TrapNodeSerializer::serialize(const data_flow::LibraryNode& library_node) {
×
31
    const TrapNode& node = static_cast<const TrapNode&>(library_node);
×
32

33
    nlohmann::json j;
×
34
    j["code"] = node.code().value();
×
35

36
    return j;
×
37
}
×
38

39
data_flow::LibraryNode& TrapNodeSerializer::deserialize(
40
    const nlohmann::json& j, builder::StructuredSDFGBuilder& builder, structured_control_flow::Block& parent
41
) {
×
42
    assert(j.contains("code"));
×
43
    assert(j.contains("debug_info"));
×
44

45
    auto code = j["code"].get<std::string>();
×
46
    if (code != LibraryNodeType_Trap.value()) {
×
47
        throw InvalidSDFGException("Invalid library node code");
×
48
    }
×
49

50
    sdfg::serializer::JSONSerializer serializer;
×
51
    DebugInfo debug_info = serializer.json_to_debug_info(j["debug_info"]);
×
52

53
    return builder.add_library_node<TrapNode>(parent, debug_info);
×
54
}
×
55

56
TrapNodeDispatcher::TrapNodeDispatcher(
57
    codegen::LanguageExtension& language_extension,
58
    const Function& function,
59
    const data_flow::DataFlowGraph& data_flow_graph,
60
    const TrapNode& node
61
)
62
    : codegen::LibraryNodeDispatcher(language_extension, function, data_flow_graph, node) {}
×
63

64
void TrapNodeDispatcher::dispatch_code(
65
    codegen::PrettyPrinter& stream,
66
    codegen::PrettyPrinter& globals_stream,
67
    codegen::CodeSnippetFactory& library_snippet_factory
68
) {
×
69
    auto& node = static_cast<const TrapNode&>(node_);
×
70

71
    stream << "__builtin_trap()" << ";";
×
72
    stream << std::endl;
×
73
}
×
74

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

© 2026 Coveralls, Inc