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

daisytuner / sdfglib / 20896124135

11 Jan 2026 01:43PM UTC coverage: 62.33% (-0.07%) from 62.402%
20896124135

push

github

web-flow
Merge pull request #423 from daisytuner/copilot/extend-tensor-nodes-conv

Add ConvNode compatible with ONNX Conv operator with n-dimensional expansion and custom validation

329 of 554 new or added lines in 21 files covered. (59.39%)

2 existing lines in 2 files now uncovered.

15413 of 24728 relevant lines covered (62.33%)

88.61 hits per line

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

85.42
/src/data_flow/code_node.cpp
1
#include "sdfg/data_flow/code_node.h"
2

3
#include "sdfg/data_flow/access_node.h"
4
#include "sdfg/data_flow/data_flow_graph.h"
5

6
namespace sdfg {
7
namespace data_flow {
8

9
CodeNode::CodeNode(
10
    size_t element_id,
11
    const DebugInfo& debug_info,
12
    const graph::Vertex vertex,
13
    DataFlowGraph& parent,
14
    const std::vector<std::string>& outputs,
15
    const std::vector<std::string>& inputs
16
)
17
    : DataFlowNode(element_id, debug_info, vertex, parent), outputs_(outputs), inputs_(inputs) {};
869✔
18

19
void CodeNode::validate(const Function& function) const {
120✔
20
    auto& graph = this->get_parent();
120✔
21

22
    // No two access nodes for same data
23
    std::unordered_map<std::string, const AccessNode*> input_names;
120✔
24
    for (auto& iedge : graph.in_edges(*this)) {
152✔
25
        if (dynamic_cast<const ConstantNode*>(&iedge.src()) != nullptr) {
152✔
26
            continue;
2✔
27
        }
2✔
28
        auto& src = static_cast<const AccessNode&>(iedge.src());
150✔
29
        if (input_names.find(src.data()) != input_names.end()) {
150✔
30
            if (input_names.at(src.data()) != &src) {
2✔
NEW
31
                throw InvalidSDFGException("Two access nodes with the same data as iedge: " + src.data());
×
NEW
32
            }
×
33
        } else {
148✔
34
            input_names.insert({src.data(), &src});
148✔
35
        }
148✔
36
    }
150✔
37

38
    std::unordered_map<std::string, const AccessNode*> output_names;
120✔
39
    for (auto& oedge : graph.out_edges(*this)) {
120✔
40
        if (dynamic_cast<const ConstantNode*>(&oedge.dst()) != nullptr) {
118✔
NEW
41
            continue;
×
NEW
42
        }
×
43
        auto& dst = static_cast<const AccessNode&>(oedge.dst());
118✔
44
        if (output_names.find(dst.data()) != output_names.end()) {
118✔
NEW
45
            if (output_names.at(dst.data()) != &dst) {
×
NEW
46
                throw InvalidSDFGException("Two access nodes with the same data as oedge: " + dst.data());
×
NEW
47
            }
×
48
        } else {
118✔
49
            output_names.insert({dst.data(), &dst});
118✔
50
        }
118✔
51
    }
118✔
52
}
120✔
53

54
const std::vector<std::string>& CodeNode::outputs() const { return this->outputs_; };
3,194✔
55

56
const std::vector<std::string>& CodeNode::inputs() const { return this->inputs_; };
4,645✔
57

58
std::vector<std::string>& CodeNode::outputs() { return this->outputs_; };
52✔
59

60
std::vector<std::string>& CodeNode::inputs() { return this->inputs_; };
58✔
61

62
const std::string& CodeNode::output(size_t index) const { return this->outputs_[index]; };
2✔
63

64
const std::string& CodeNode::input(size_t index) const { return this->inputs_[index]; };
89✔
65

66
bool CodeNode::has_constant_input(size_t index) const {
8✔
67
    for (auto& iedge : this->get_parent().in_edges(*this)) {
13✔
68
        if (iedge.dst_conn() == this->inputs_[index]) {
13✔
69
            if (dynamic_cast<const ConstantNode*>(&iedge.src())) {
8✔
70
                return true;
5✔
71
            }
5✔
72
        }
8✔
73
    }
13✔
74

75
    return false;
3✔
76
}
8✔
77

78
} // namespace data_flow
79
} // 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