MCPcopy Create free account
hub / github.com/cactus-compute/cactus / test_abs

Function test_abs

tests/test_graph.cpp:29–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27} // namespace
28
29bool test_abs() {
30 TestUtils::FP16TestFixture fixture("absval");
31 size_t input = fixture.create_input({2, 3});
32
33 size_t abs_result = fixture.graph().abs(input);
34 std::vector<__fp16> data = {1, -2, 3, 4, -5, -6};
35
36 fixture.set_input_data(input, data);
37 fixture.execute();
38
39 std::vector<__fp16> expected = {1, 2, 3, 4, 5, 6};
40 return fixture.verify_output(abs_result, expected);
41}
42
43bool test_concat() {
44 TestUtils::FP16TestFixture fixture("Concat");

Callers 1

mainFunction · 0.85

Calls 5

create_inputMethod · 0.80
set_input_dataMethod · 0.80
verify_outputMethod · 0.80
absMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected