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

Function test_flatten

tests/test_graph.cpp:107–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107bool test_flatten() {
108 TestUtils::FP16TestFixture fixture("Flatten");
109
110 size_t input = fixture.create_input({2, 3});
111 size_t flatten_result = fixture.graph().flatten(input);
112
113 std::vector<__fp16> data = {1, 2, 3, 4, 5, 6};
114 std::vector<__fp16> expected = {1, 2, 3, 4, 5, 6};
115
116 fixture.set_input_data(input, data);
117 fixture.execute();
118
119 return fixture.verify_output(flatten_result, expected);
120}
121
122bool test_basic_operations() {
123 TestUtils::FP16TestFixture fixture("Basic Operations");

Callers 1

mainFunction · 0.85

Calls 5

create_inputMethod · 0.80
set_input_dataMethod · 0.80
verify_outputMethod · 0.80
flattenMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected