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

Function test_transpose

tests/test_graph.cpp:204–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204bool test_transpose() {
205 TestUtils::FP16TestFixture fixture("Transpose");
206
207 size_t input_a = fixture.create_input({2, 3});
208 size_t transpose_result = fixture.graph().transpose(input_a);
209
210 std::vector<__fp16> data_a = {1, 2, 3, 4, 5, 6};
211 fixture.set_input_data(input_a, data_a);
212 fixture.execute();
213
214 std::vector<__fp16> expected = {1, 4, 2, 5, 3, 6};
215 return fixture.verify_output(transpose_result, expected);
216}
217
218bool test_reshape() {
219 TestUtils::FP16TestFixture fixture("Reshape");

Callers 1

mainFunction · 0.85

Calls 5

create_inputMethod · 0.80
transposeMethod · 0.80
set_input_dataMethod · 0.80
verify_outputMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected