diff --git a/Makefile b/Makefile deleted file mode 100644 index 8aed5f7441b9081572a7956d4a1951d96767c831..0000000000000000000000000000000000000000 --- a/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# This makefile does nothing but delegating the actual building to cmake -BUILDDIR := build -MAKEFLAGS := --no-print-directory - -all: cpu_with_pybind - -cpu_only: - mkdir -p ${BUILDDIR}; \ - cd ${BUILDDIR}; \ - cmake -DBUILD_CPU_ALONE=ON -DCMAKE_BUILD_TYPE=Release -DPYBIND=OFF -DTESTS=OFF ..; \ - ${MAKE} ${MAKEFLAGS}; - -cpu_tests: - mkdir -p ${BUILDDIR}; \ - cd ${BUILDDIR}; \ - cmake -DBUILD_CPU_ALONE=ON -DCMAKE_BUILD_TYPE=Debug -DPYBIND=OFF -DTESTS=ON ..; \ - ${MAKE} ${MAKEFLAGS}; \ - cd tests; \ - ctest --output-on-failure || true; - -cpu_with_pybind: - mkdir -p ${BUILDDIR}; \ - cd ${BUILDDIR}; \ - cmake -DBUILD_CPU_ALONE=ON -DCMAKE_BUILD_TYPE=Release -DPYBIND=ON -DTESTS=OFF ..; \ - ${MAKE} ${MAKEFLAGS}; - -cpu_with_pybind_tests: - mkdir -p ${BUILDDIR}; \ - cd ${BUILDDIR}; \ - cmake -DBUILD_CPU_ALONE=ON -DCMAKE_BUILD_TYPE=Debug -DPYBIND=ON -DTESTS=ON ..; \ - ${MAKE} ${MAKEFLAGS}; \ - cd tests; \ - ctest --output-on-failure || true; - -clean: - if [ -d "${BUILDDIR}" ]; then rm -rf ${BUILDDIR}; fi \ No newline at end of file diff --git a/src/operator/FCImpl.cpp b/src/operator/FCImpl.cpp index 0f1bf6047e2e73dfbdb4ea8054cac28364735bcc..3195aa99e3e238a5a0dd65db7adfc599a1f91cfe 100644 --- a/src/operator/FCImpl.cpp +++ b/src/operator/FCImpl.cpp @@ -59,7 +59,7 @@ Aidge::NbElts_t Aidge::FCImpl_cpu::getRequiredMemory( Aidge::NbElts_t Aidge::FCImpl_cpu::getNbConsumedData(Aidge::IOIndex_t inputIdx) const { - assert((inputIdx >= 0) && (static_cast<IONb_t>(inputIdx) < mNbConsumedData.size())); + assert((inputIdx != gk_IODefaultIndex) && (inputIdx < mNbConsumedData.size())); return mNbConsumedData[static_cast<std::size_t>(inputIdx)]; } diff --git a/unit_tests/Test_Scheduler.cpp b/unit_tests/Test_Scheduler.cpp index 57f3ce2e0ba66c6f68b4c7a49a06595f64987ca5..e83d8e97be9321f0199a42f1d4263cc2be80a55f 100644 --- a/unit_tests/Test_Scheduler.cpp +++ b/unit_tests/Test_Scheduler.cpp @@ -23,7 +23,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/scheduler] SequentialScheduler(forward)") { +TEST_CASE("[cpu/scheduler] SequentialScheduler(forward)") { std::shared_ptr<Tensor> inputTensor = std::make_shared<Tensor>(Array4D<int, 2, 1, 5, 5>{{{{{0, 1, 2, 3, 4}, {5, 6, 7, 8, 9}, diff --git a/unit_tests/operator/Test_AddImpl.cpp b/unit_tests/operator/Test_AddImpl.cpp index 13356ba21bd50c88801e4f7a2a6e7d30e79bb97c..998e9bce4f34c3afc115d311f41a9b2fb9d87cae 100644 --- a/unit_tests/operator/Test_AddImpl.cpp +++ b/unit_tests/operator/Test_AddImpl.cpp @@ -18,7 +18,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/operator] Add(forward)") { +TEST_CASE("[cpu/operator] Add(forward)") { std::shared_ptr<Tensor> input1 = std::make_shared<Tensor>(Array4D<int,3,3,3,2> { { { diff --git a/unit_tests/operator/Test_AvgPoolingImpl.cpp b/unit_tests/operator/Test_AvgPoolingImpl.cpp index e6ff2aa7b2958805ae6bcdb97587c00dadfa574d..4348291aa69a00b293a9a65bf11a05350402c531 100644 --- a/unit_tests/operator/Test_AvgPoolingImpl.cpp +++ b/unit_tests/operator/Test_AvgPoolingImpl.cpp @@ -20,7 +20,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/operator] AvgPooling(forward)") { +TEST_CASE("[cpu/operator] AvgPooling(forward)") { std::shared_ptr<Tensor> myInput = std::make_shared<Tensor>(Array4D<float,2,2,5,5> { //NCHW { { diff --git a/unit_tests/operator/Test_BatchNormImpl.cpp b/unit_tests/operator/Test_BatchNormImpl.cpp index eace14ec4ef257e5911d15122b5c1e67d7ac169f..92d1e5f2ad3298a49d6e43b585b6b14529d5b708 100644 --- a/unit_tests/operator/Test_BatchNormImpl.cpp +++ b/unit_tests/operator/Test_BatchNormImpl.cpp @@ -19,7 +19,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/operator] BatchNorm(forward)") { +TEST_CASE("[cpu/operator] BatchNorm(forward)") { std::shared_ptr<Node> myBatchNorm = BatchNorm<2>(0.00001F, 0.1F, "mybatchnorm"); myBatchNorm->getOperator()->setDatatype(DataType::Float32); myBatchNorm->getOperator()->setBackend("cpu"); diff --git a/unit_tests/operator/Test_ConvDepthWiseImpl.cpp b/unit_tests/operator/Test_ConvDepthWiseImpl.cpp index 444c0d4590a49e06089535881f704d5f8535a4ee..eccf262a53b42b07e3a1077b853057cd054b7a5a 100644 --- a/unit_tests/operator/Test_ConvDepthWiseImpl.cpp +++ b/unit_tests/operator/Test_ConvDepthWiseImpl.cpp @@ -19,7 +19,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/operator] ConvDepthWise(forward)") { +TEST_CASE("[cpu/operator] ConvDepthWise(forward)") { std::shared_ptr<Node> myCDW = ConvDepthWise({3,3}, "mycdw"); myCDW->getOperator()->setDatatype(DataType::Int32); myCDW->getOperator()->setBackend("cpu"); diff --git a/unit_tests/operator/Test_ConvImpl.cpp b/unit_tests/operator/Test_ConvImpl.cpp index 358c402bd9501cf274df6a20ebdce34d46295f6c..d747eec8c88ee5467cefb7d9ed9e38b6deea400a 100644 --- a/unit_tests/operator/Test_ConvImpl.cpp +++ b/unit_tests/operator/Test_ConvImpl.cpp @@ -20,7 +20,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/operator] Conv(forward)") { +TEST_CASE("[cpu/operator] Conv(forward)") { SECTION("Classic Conv") { std::shared_ptr<Node> myConv = Conv(3,4,{3,3}, "myconv"); myConv->getOperator()->setDatatype(DataType::Int32); diff --git a/unit_tests/operator/Test_FCImpl.cpp b/unit_tests/operator/Test_FCImpl.cpp index f3056e078cf2aea27de4768b9a62e2fc7f9c3906..7ef928759d9435f6affe5e5e233b06abc276d440 100644 --- a/unit_tests/operator/Test_FCImpl.cpp +++ b/unit_tests/operator/Test_FCImpl.cpp @@ -19,7 +19,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/oeprator] FC(forward)") { +TEST_CASE("[cpu/oeprator] FC(forward)") { std::shared_ptr<Tensor> myWeights = std::make_shared<Tensor>(Array2D<int, 5, 75>{ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6, 7, 8, diff --git a/unit_tests/operator/Test_LeakyReLUImpl.cpp b/unit_tests/operator/Test_LeakyReLUImpl.cpp index 582a2276acb4b8b2589ab051d337cb3f721fa6a2..b3ca9205149b1fbd0dd82df10f13d29fb3a59024 100644 --- a/unit_tests/operator/Test_LeakyReLUImpl.cpp +++ b/unit_tests/operator/Test_LeakyReLUImpl.cpp @@ -18,7 +18,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/operator] LeakyReLU(forward)") { +TEST_CASE("[cpu/operator] LeakyReLU(forward)") { SECTION("1D Tensor") { std::shared_ptr<Tensor> input0 = std::make_shared<Tensor>(Array1D<int,10> { {0, 1, 2,-3, 4,-5,-6, 7, 8, 9} diff --git a/unit_tests/operator/Test_ReLUImpl.cpp b/unit_tests/operator/Test_ReLUImpl.cpp index 99f5cd6a1e97dd7c8e29559f8debd438cf9b57b6..c8d04401176cc36f72d4c3fe0085355fc8acf9af 100644 --- a/unit_tests/operator/Test_ReLUImpl.cpp +++ b/unit_tests/operator/Test_ReLUImpl.cpp @@ -21,7 +21,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/operator] ReLU(forward)") { +TEST_CASE("[cpu/operator] ReLU(forward)") { SECTION("1D Tensor") { std::shared_ptr<Tensor> input0 = std::make_shared<Tensor>(Array1D<int,10> { {0, 1, 2,-3, 4,-5,-6, 7, 8, 9} diff --git a/unit_tests/operator/Test_SoftmaxImpl.cpp b/unit_tests/operator/Test_SoftmaxImpl.cpp index 32324b5cd2e03d33b79e7a3111d0dc4776b702e6..785d5bb3014bcdf14160ec81aab69c3404efc1f6 100644 --- a/unit_tests/operator/Test_SoftmaxImpl.cpp +++ b/unit_tests/operator/Test_SoftmaxImpl.cpp @@ -20,7 +20,7 @@ using namespace Aidge; -TEST_CASE("[aidge/_CPU/operator] Softmax(forward)") { +TEST_CASE("[cpu/operator] Softmax(forward)") { SECTION("2D Tensor") { std::shared_ptr<Tensor> input = std::make_shared<Tensor>(Array2D<float,2,10> { {