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

daisytuner / sdfglib / 17075880734

19 Aug 2025 04:32PM UTC coverage: 63.863% (-1.7%) from 65.547%
17075880734

push

github

web-flow
Merge pull request #202 from daisytuner/ml-nodes

adds element-wise ml nodes

94 of 506 new or added lines in 22 files covered. (18.58%)

2 existing lines in 1 file now uncovered.

9239 of 14467 relevant lines covered (63.86%)

124.6 hits per line

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

85.71
/src/data_flow/library_nodes/math/ml/relu.cpp
1
#include "sdfg/data_flow/library_nodes/math/ml/relu.h"
2

3
#include "sdfg/analysis/analysis.h"
4
#include "sdfg/builder/structured_sdfg_builder.h"
5

6
#include "sdfg/analysis/scope_analysis.h"
7

8
namespace sdfg {
9
namespace math {
10
namespace ml {
11

12
ReLUNode::ReLUNode(
5✔
13
    size_t element_id, const DebugInfo& debug_info, const graph::Vertex vertex, data_flow::DataFlowGraph& parent
14
)
15
    : ElementWiseUnaryNode(element_id, debug_info, vertex, parent, LibraryNodeType_ReLU, {}) {}
5✔
16

17
bool ReLUNode::expand_operation(
2✔
18
    builder::StructuredSDFGBuilder& builder,
19
    analysis::AnalysisManager& analysis_manager,
20
    structured_control_flow::Sequence& body,
21
    const std::string& input_name,
22
    const std::string& output_name,
23
    const types::IType& input_type,
24
    const types::IType& output_type,
25
    const data_flow::Subset& subset
26
) {
27
    // Add code
28
    auto& code_block = builder.add_block(body);
2✔
29
    auto& input_node_new = builder.add_access(code_block, input_name);
2✔
30
    auto& output_node_new = builder.add_access(code_block, output_name);
2✔
31
    auto& tasklet = builder.add_tasklet(code_block, data_flow::TaskletCode::max, "_out", {"0.0f", "_in"});
2✔
32
    builder.add_computational_memlet(code_block, input_node_new, tasklet, "_in", subset, input_type);
2✔
33
    builder.add_computational_memlet(code_block, tasklet, "_out", output_node_new, subset, output_type);
2✔
34

35
    return true;
2✔
UNCOV
36
}
×
37

38
std::unique_ptr<data_flow::DataFlowNode> ReLUNode::
39
    clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const {
1✔
40
    return std::unique_ptr<data_flow::DataFlowNode>(new ReLUNode(element_id, this->debug_info(), vertex, parent));
1✔
UNCOV
41
}
×
42

43
} // namespace ml
44
} // namespace math
45
} // 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