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

Function test_variance_operations

tests/test_graph.cpp:435–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435bool test_variance_operations() {
436 TestUtils::FP16TestFixture fixture("Variance Operations");
437
438 size_t input_a = fixture.create_input({1, 4});
439 size_t var_axis1 = fixture.graph().variance(input_a, 1);
440
441 std::vector<__fp16> input_data = {1.0f, 2.0f, 3.0f, 4.0f};
442 fixture.set_input_data(input_a, input_data);
443 fixture.execute();
444
445 std::vector<__fp16> expected = {1.25f};
446 return fixture.verify_output(var_axis1, expected, 0.01f);
447}
448
449bool test_min_max_operations() {
450 TestUtils::FP16TestFixture fixture("Min/Max Operations");

Callers 1

mainFunction · 0.85

Calls 5

create_inputMethod · 0.80
varianceMethod · 0.80
set_input_dataMethod · 0.80
verify_outputMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected