Skip to content
Snippets Groups Projects
Commit c6edaf36 authored by Maxence Naud's avatar Maxence Naud
Browse files

Merge branch 'fix_aidge195_forgotten_delete_memleak' into 'fix'

Fix forgotten 'delete' calls at the end of some tests

See merge request !97
parents f1a9e9d3 88826884
No related branches found
No related tags found
2 merge requests!98Fix - v0.3.1,!97Fix forgotten 'delete' calls at the end of some tests
Pipeline #57382 failed
......@@ -17,12 +17,12 @@ class test_scheduler(unittest.TestCase):
input_node = aidge_core.Producer(aidge_core.Tensor(values), "Input")
relu = aidge_core.ReLU()
input_node.add_child(relu)
gv = aidge_core.GraphView()
gv.add(relu)
gv.add(input_node)
input_node.add_child(relu)
gv.set_datatype(aidge_core.dtype.int32)
gv.set_backend("cpu")
......
......@@ -154,6 +154,10 @@ TEST_CASE("Test addition of Tensors","[TensorImpl][Add]") {
Tensor T4(T1->dims());
T4.setDataType(DataType::Float64);
REQUIRE_THROWS(*T0 + T4);
delete[] array0;
delete[] array1;
delete[] result;
}
}
......
......@@ -101,6 +101,10 @@ TEST_CASE("[cpu/operator] MatMul(forward)", "[MatMul][CPU]") {
duration += std::chrono::duration_cast<std::chrono::microseconds>(end - start);
REQUIRE(approxEq<float>(*(op->getOutput(0)), *Tres));
delete[] bigArray1;
delete[] bigArray2;
delete[] res;
}
std::cout << "multiplications over time spent: " << totalComputation/duration.count() << std::endl;
std::cout << "total time: " << duration.count() << std::endl;
......@@ -165,6 +169,10 @@ TEST_CASE("[cpu/operator] MatMul(forward)", "[MatMul][CPU]") {
duration += std::chrono::duration_cast<std::chrono::microseconds>(end - start);
REQUIRE(approxEq<float>(*(op->getOutput(0)), *Tres));
delete[] bigArray1;
delete[] bigArray2;
delete[] res;
}
std::cout << "multiplications over time spent: " << totalComputation/duration.count() << std::endl;
std::cout << "total time: " << duration.count() << std::endl;
......@@ -231,6 +239,10 @@ TEST_CASE("[cpu/operator] MatMul(forward)", "[MatMul][CPU]") {
end = std::chrono::system_clock::now();
duration += std::chrono::duration_cast<std::chrono::microseconds>(end - start);
REQUIRE(approxEq<float>(*(op->getOutput(0)), *Tres));
delete[] bigArray1;
delete[] bigArray2;
delete[] res;
}
std::cout << "multiplications over time spent: " << totalComputation/duration.count() << std::endl;
std::cout << "total time: " << duration.count() << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment