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

Function test_view

tests/test_graph.cpp:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92bool test_view() {
93 TestUtils::FP16TestFixture fixture("View");
94
95 size_t input = fixture.create_input({2, 3});
96 size_t view_result = fixture.graph().view(input, {3, 2});
97
98 std::vector<__fp16> data = {1, 2, 3, 4, 5, 6};
99 std::vector<__fp16> expected = {1, 2, 3, 4, 5, 6};
100
101 fixture.set_input_data(input, data);
102 fixture.execute();
103
104 return fixture.verify_output(view_result, expected);
105}
106
107bool test_flatten() {
108 TestUtils::FP16TestFixture fixture("Flatten");

Callers 1

mainFunction · 0.85

Calls 5

create_inputMethod · 0.80
set_input_dataMethod · 0.80
verify_outputMethod · 0.80
viewMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected