diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..9fbfccca6dfda997d8a0dbfc4b373590feeecad8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# C++ Build +build*/ +install*/ + +# VSCode +.vscode + +# Python +*.so +__pycache__ +*.pyc +*.egg-info + +# Mermaid +*.mmd + +# Doxygen +xml*/ + +# ONNX +*.onnx \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 6aadb08bbb21c892519bfd4c93102963d44643d9..4c39f4b28a9fa99592442f6250e50a0ca77308fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,57 +1,161 @@ +cmake_minimum_required(VERSION 3.11) -if (BUILD_CPU_ALONE) - project(Aidge_CPU) - cmake_minimum_required(VERSION 3.11) - add_compile_options(-Wall -Wextra -fPIC) +set(project aidge) +set(version 2.0.0) +project(${project}) +enable_testing() +# TODO : use a file to store module_name ? +set(module_name aidge_cpu) # This will be python module name +set(component cpu) # Target name must be different than pybind target (prefix module name with _ ? _${module_name} ? - # Need the Core library to compile the CPU library - set(BUILD_CORE_ALONE ON) - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../_Core _Core) -endif() +############################################## +# Import utils CMakeLists +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") +include(PybindModuleCreation) -if (PYBIND) - add_definitions(-DPYBIND) - Include(FetchContent) +############################################## +# Define options +option(PYBIND "python binding" ON) +option(WERROR "Warning as error" OFF) - FetchContent_Declare( - PyBind11 - GIT_REPOSITORY https://github.com/pybind/pybind11.git - GIT_TAG v2.10.4 # or a later release - ) +############################################## +# Find system dependencies +generate_python_binding(${module_name}) # TODO : cannot be component because of target name - FetchContent_MakeAvailable(PyBind11) - file(GLOB_RECURSE pybind_src_files "python_binding/*.cpp") - pybind11_add_module(aidge_cpu MODULE ${pybind_src_files} "NO_EXTRAS") - target_include_directories(aidge_cpu PUBLIC ${pybind11_INCLUDE_DIRS} "python_binding") - target_link_libraries(aidge_cpu PUBLIC cpu) - # generate_python_binding(aidge_cpu cpu) -endif() +############################################## +# Create target and set properties -add_library(cpu STATIC) +file(GLOB_RECURSE src_files "src/*.cpp") +file(GLOB_RECURSE inc_files "include/*.hpp") -# Add include directories -target_include_directories(cpu PUBLIC "include") +add_library(${component} ${src_files} ${inc_files}) -# Containers module -file(GLOB_RECURSE src_files "src/*.cpp") -target_sources(cpu PRIVATE ${src_files}) -target_link_libraries(cpu PUBLIC core) +# namespaced alias +add_library(${project}::${component} ALIAS ${component}) + +#Set target properties +set_property(TARGET ${component} PROPERTY POSITION_INDEPENDENT_CODE ON) + -set_property(TARGET cpu PROPERTY POSITION_INDEPENDENT_CODE ON) +target_include_directories(${component} + PUBLIC + $<INSTALL_INTERFACE:include> + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src +) + +message(STATUS "INSTALL INCLUDE DIR : ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") +message(STATUS "INSTALL LIB DIR : ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") + +# TODO : is it good ? Get headers already installed +# Need to get shared objects ! +target_include_directories(${component} + PUBLIC + $<BUILD_INTERFACE:${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}> + PRIVATE + ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} +) if (PYBIND) - target_include_directories(cpu PUBLIC $<BUILD_INTERFACE:${PYTHON_INCLUDE_DIRS}>) - target_link_libraries(cpu PRIVATE ${PYTHON_LIBRARIES}) -endif() + message(STATUS "PYTHON INCLUDE DIR : ${PYTHON_INCLUDE_DIRS}") + message(STATUS "PYTHON PYTHON_LIBRARY : ${PYTHON_LIBRARIES}") -if (NOT BUILD_CPU_ALONE) - # Activate compile time reducer for aidge_core - set_target_properties(cpu PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) - # set_target_properties(n2d2_cpu_lib PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "include/utils/Precompiled.hpp") - cotire(cpu) + target_include_directories(${component} + PUBLIC + $<BUILD_INTERFACE:${PYTHON_INCLUDE_DIRS}> + ) + target_link_libraries(${component} + PRIVATE + ${PYTHON_LIBRARIES} + ) endif() +target_compile_features(${component} PRIVATE cxx_std_14) -if (TESTS) - add_subdirectory(tests) +if(WERROR) + target_compile_options(${component} PRIVATE + $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>: + -Wall -Wextra -Wold-style-cast -Winline -pedantic -Werror=narrowing -Wshadow -Werror>) + target_compile_options(${component} PRIVATE + $<$<CXX_COMPILER_ID:MSVC>: + /W4>) +else() + target_compile_options(${component} PRIVATE + $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>: + -Wall -Wextra -Wold-style-cast -Winline -pedantic -Werror=narrowing -Wshadow -Wpedantic>) + target_compile_options(${component} PRIVATE + $<$<CXX_COMPILER_ID:MSVC>: + /W4>) endif() + +############################################## +# Installation instructions + +include(GNUInstallDirs) +set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${project}) + +install(TARGETS ${component} EXPORT ${component}-targets + COMPONENT ${component} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + + +install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + +#Export the targets to a script +install(EXPORT ${component}-targets + FILE "${project}-${component}-targets.cmake" + NAMESPACE ${project}:: + DESTINATION ${INSTALL_CONFIGDIR} + COMPONENT ${component} +) + +#Create a ConfigVersion.cmake file +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/${project}-${component}-config-version.cmake" + VERSION ${version} + COMPATIBILITY AnyNewerVersion +) + +configure_package_config_file("${component}-config.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/${project}-${component}-config.cmake" + INSTALL_DESTINATION ${INSTALL_CONFIGDIR} +) + +#Install the config, configversion and custom find modules +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${project}-${component}-config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${project}-${component}-config-version.cmake" + DESTINATION ${INSTALL_CONFIGDIR} + COMPONENT ${component} +) + +############################################## +## Exporting from the build tree +export(EXPORT ${component}-targets + FILE "${CMAKE_CURRENT_BINARY_DIR}/${project}-${component}-targets.cmake" + NAMESPACE ${project}::) + + +############################################## +## Add test +add_subdirectory(unit_tests) + +include(CMakePackageConfigHelpers) + +write_basic_package_version_file( + "${CMAKE_BINARY_DIR}/${project}-config-version.cmake" + VERSION ${version} + COMPATIBILITY AnyNewerVersion +) + + +# install( +# FILES +# "${CMAKE_BINARY_DIR}/${project}-config.cmake" +# DESTINATION lib/cmake/${project} +# ) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..e23ece2c852415800ac224b74ede6c5849f6f88d --- /dev/null +++ b/LICENSE @@ -0,0 +1,277 @@ +Eclipse Public License - v 2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + +"Contributor" means any person or entity that Distributes the Program. + +"Licensed Patents" mean patent claims licensable by a Contributor which +are necessarily infringed by the use or sale of its Contribution alone +or when combined with the Program. + +"Program" means the Contributions Distributed in accordance with this +Agreement. + +"Recipient" means anyone who receives the Program under this Agreement +or any Secondary License (as applicable), including Contributors. + +"Derivative Works" shall mean any work, whether in Source Code or other +form, that is based on (or derived from) the Program and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. + +"Modified Works" shall mean any work in Source Code or other form that +results from an addition to, deletion from, or modification of the +contents of the Program, including, for purposes of clarity any new file +in Source Code form that contains any contents of the Program. Modified +Works shall not include works that contain only declarations, +interfaces, types, classes, structures, or files of the Program solely +in each case in order to link to, bind by name, or subclass the Program +or Modified Works thereof. + +"Distribute" means the acts of a) distributing or b) making available +in any manner that enables the transfer of a copy. + +"Source Code" means the form of a Program preferred for making +modifications, including but not limited to software source code, +documentation source, and configuration files. + +"Secondary License" means either the GNU General Public License, +Version 2.0, or any later versions of that license, including any +exceptions or additional permissions as identified by the initial +Contributor. + +2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + +3. REQUIREMENTS + +3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + +3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + +3.3 Contributors may not remove or alter any copyright, patent, +trademark, attribution notices, disclaimers of warranty, or limitations +of liability ("notices") contained within the Program from any copy of +the Program which they Distribute, provided that Contributors may add +their own appropriate notices. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities +with respect to end users, business partners and the like. While this +license is intended to facilitate the commercial use of the Program, +the Contributor who includes the Program in a commercial product +offering should do so in a manner which does not create potential +liability for other Contributors. Therefore, if a Contributor includes +the Program in a commercial product offering, such Contributor +("Commercial Contributor") hereby agrees to defend and indemnify every +other Contributor ("Indemnified Contributor") against any losses, +damages and costs (collectively "Losses") arising from claims, lawsuits +and other legal actions brought by a third party against the Indemnified +Contributor to the extent caused by the acts or omissions of such +Commercial Contributor in connection with its distribution of the Program +in a commercial product offering. The obligations in this section do not +apply to any claims or Losses relating to any actual or alleged +intellectual property infringement. In order to qualify, an Indemnified +Contributor must: a) promptly notify the Commercial Contributor in +writing of such claim, and b) allow the Commercial Contributor to control, +and cooperate with the Commercial Contributor in, the defense and any +related settlement negotiations. The Indemnified Contributor may +participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's responsibility +alone. Under this section, the Commercial Contributor would have to +defend claims against the other Contributors related to those performance +claims and warranties, and if a court requires any other Contributor to +pay any damages as a result, the Commercial Contributor must pay +those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" +BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR +IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF +TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE. Each Recipient is solely responsible for determining the +appropriateness of using and distributing the Program and assumes all +risks associated with its exercise of rights under this Agreement, +including but not limited to the risks and costs of program errors, +compliance with applicable laws, damage to or loss of data, programs +or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT +PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS +SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST +PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity +(including a cross-claim or counterclaim in a lawsuit) alleging that the +Program itself (excluding combinations of the Program with other software +or hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any licenses +granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, +but in order to avoid inconsistency the Agreement is copyrighted and +may only be modified in the following manner. The Agreement Steward +reserves the right to publish new versions (including revisions) of +this Agreement from time to time. No one other than the Agreement +Steward has the right to modify this Agreement. The Eclipse Foundation +is the initial Agreement Steward. The Eclipse Foundation may assign the +responsibility to serve as the Agreement Steward to a suitable separate +entity. Each new version of the Agreement will be given a distinguishing +version number. The Program (including Contributions) may always be +Distributed subject to the version of the Agreement under which it was +received. In addition, after a new version of the Agreement is published, +Contributor may elect to Distribute the Program (including its +Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient +receives no rights or licenses to the intellectual property of any +Contributor under this Agreement, whether expressly, by implication, +estoppel or otherwise. All rights in the Program not expressly granted +under this Agreement are reserved. Nothing in this Agreement is intended +to be enforceable by any entity that is not a Contributor or Recipient. +No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice + +"This Source Code may also be made available under the following +Secondary Licenses when the conditions for such availability set forth +in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), +version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. \ No newline at end of file diff --git a/OLD_CMakeLists.txt b/OLD_CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..6aadb08bbb21c892519bfd4c93102963d44643d9 --- /dev/null +++ b/OLD_CMakeLists.txt @@ -0,0 +1,57 @@ + +if (BUILD_CPU_ALONE) + project(Aidge_CPU) + cmake_minimum_required(VERSION 3.11) + add_compile_options(-Wall -Wextra -fPIC) + + # Need the Core library to compile the CPU library + set(BUILD_CORE_ALONE ON) + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../_Core _Core) +endif() + +if (PYBIND) + add_definitions(-DPYBIND) + Include(FetchContent) + + FetchContent_Declare( + PyBind11 + GIT_REPOSITORY https://github.com/pybind/pybind11.git + GIT_TAG v2.10.4 # or a later release + ) + + FetchContent_MakeAvailable(PyBind11) + file(GLOB_RECURSE pybind_src_files "python_binding/*.cpp") + pybind11_add_module(aidge_cpu MODULE ${pybind_src_files} "NO_EXTRAS") + target_include_directories(aidge_cpu PUBLIC ${pybind11_INCLUDE_DIRS} "python_binding") + target_link_libraries(aidge_cpu PUBLIC cpu) + # generate_python_binding(aidge_cpu cpu) +endif() + +add_library(cpu STATIC) + +# Add include directories +target_include_directories(cpu PUBLIC "include") + +# Containers module +file(GLOB_RECURSE src_files "src/*.cpp") +target_sources(cpu PRIVATE ${src_files}) + +target_link_libraries(cpu PUBLIC core) + +set_property(TARGET cpu PROPERTY POSITION_INDEPENDENT_CODE ON) + +if (PYBIND) + target_include_directories(cpu PUBLIC $<BUILD_INTERFACE:${PYTHON_INCLUDE_DIRS}>) + target_link_libraries(cpu PRIVATE ${PYTHON_LIBRARIES}) +endif() + +if (NOT BUILD_CPU_ALONE) + # Activate compile time reducer for aidge_core + set_target_properties(cpu PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE) + # set_target_properties(n2d2_cpu_lib PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "include/utils/Precompiled.hpp") + cotire(cpu) +endif() + +if (TESTS) + add_subdirectory(tests) +endif() diff --git a/cmake/PybindModuleCreation.cmake b/cmake/PybindModuleCreation.cmake new file mode 100644 index 0000000000000000000000000000000000000000..6ca1aeffec5f07a3b50567f2033af94a714b32f4 --- /dev/null +++ b/cmake/PybindModuleCreation.cmake @@ -0,0 +1,19 @@ +function(generate_python_binding name) + if (PYBIND) + add_definitions(-DPYBIND) + Include(FetchContent) + + FetchContent_Declare( + PyBind11 + GIT_REPOSITORY https://github.com/pybind/pybind11.git + GIT_TAG v2.10.4 # or a later release + ) + + FetchContent_MakeAvailable(PyBind11) + message(STATUS "Creating binding for module ${name}") + file(GLOB_RECURSE pybind_src_files "python_binding/*.cpp") + pybind11_add_module(${name} MODULE ${pybind_src_files}) + target_include_directories(${name} PUBLIC ${pybind11_INCLUDE_DIRS} "python_binding") + target_link_libraries(${name} PUBLIC ${component}) + endif() +endfunction() diff --git a/cpu-config.cmake.in b/cpu-config.cmake.in new file mode 100644 index 0000000000000000000000000000000000000000..5d850786b1d1894a8eb35bf9d86e70fc7687947a --- /dev/null +++ b/cpu-config.cmake.in @@ -0,0 +1,3 @@ +include(${CMAKE_CURRENT_LIST_DIR}/aidge-cpu-config-version.cmake) + +include(${CMAKE_CURRENT_LIST_DIR}/aidge-cpu-targets.cmake) diff --git a/include/data/TensorImpl.hpp b/include/aidge/data/TensorImpl.hpp similarity index 91% rename from include/data/TensorImpl.hpp rename to include/aidge/data/TensorImpl.hpp index 7221855a9bffc19fcc5c98da2b552591f6c15e65..002bad3ca2680b0ecb4d2125aa30e0f066af68e0 100644 --- a/include/data/TensorImpl.hpp +++ b/include/aidge/data/TensorImpl.hpp @@ -1,10 +1,10 @@ #ifndef __AIDGE_CPU_DATA_TENSORIMPL_H__ #define __AIDGE_CPU_DATA_TENSORIMPL_H__ -#include "backend/TensorImpl.hpp" -#include "data/Tensor.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" namespace Aidge { template <class T> diff --git a/include/operator/AddImpl.hpp b/include/aidge/operator/AddImpl.hpp similarity index 98% rename from include/operator/AddImpl.hpp rename to include/aidge/operator/AddImpl.hpp index 06175682b82b2dc1eda55ca7b73840dca305f8c2..8bd954c0d1dba40fe666e5aad7be47a65033e607 100644 --- a/include/operator/AddImpl.hpp +++ b/include/aidge/operator/AddImpl.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_ADDIMPL_H__ #define __AIDGE_CPU_OPERATOR_ADDIMPL_H__ -#include "backend/OperatorImpl.hpp" -#include "operator/Add.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/Add.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" #include <memory> #include <vector> diff --git a/include/operator/AddImpl_forward_kernels.hpp b/include/aidge/operator/AddImpl_forward_kernels.hpp similarity index 96% rename from include/operator/AddImpl_forward_kernels.hpp rename to include/aidge/operator/AddImpl_forward_kernels.hpp index 120358f686bae8404944729d2292d37948fac167..f968f94b5b5f5f7708a9f753a7d0a02e6274cb98 100644 --- a/include/operator/AddImpl_forward_kernels.hpp +++ b/include/aidge/operator/AddImpl_forward_kernels.hpp @@ -12,9 +12,9 @@ #ifndef __AIDGE_CPU_OPERATOR_ADDIMPL_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_ADDIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" -#include "operator/AddImpl.hpp" +#include "aidge/operator/AddImpl.hpp" namespace Aidge { diff --git a/include/operator/AvgPoolingImpl.hpp b/include/aidge/operator/AvgPoolingImpl.hpp similarity index 94% rename from include/operator/AvgPoolingImpl.hpp rename to include/aidge/operator/AvgPoolingImpl.hpp index 01192f7c0aab39ecc50458a6f7c2213dd4e71ffe..5cde8bbd7b482a70b234f988cb3f54178a2c50ee 100644 --- a/include/operator/AvgPoolingImpl.hpp +++ b/include/aidge/operator/AvgPoolingImpl.hpp @@ -17,10 +17,10 @@ #include <tuple> #include <vector> -#include "backend/OperatorImpl.hpp" -#include "operator/AvgPooling.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/AvgPooling.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" namespace Aidge { // class AvgPooling_Op; diff --git a/include/operator/AvgPoolingImpl_forward_kernels.hpp b/include/aidge/operator/AvgPoolingImpl_forward_kernels.hpp similarity index 95% rename from include/operator/AvgPoolingImpl_forward_kernels.hpp rename to include/aidge/operator/AvgPoolingImpl_forward_kernels.hpp index d6f8ba8e007ed9a94f43e0ca185649c2758c3ab4..cf6cd0e6ec016239bb357510766ac199de418377 100644 --- a/include/operator/AvgPoolingImpl_forward_kernels.hpp +++ b/include/aidge/operator/AvgPoolingImpl_forward_kernels.hpp @@ -12,11 +12,11 @@ #ifndef __AIDGE_CPU_OPERATOR_AVGPOOLINGIMPL_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_AVGPOOLINGIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" -#include "operator/AvgPoolingImpl.hpp" -#include "utils/Types.h" -#include "data/Data.hpp" +#include "aidge/operator/AvgPoolingImpl.hpp" +#include "aidge/utils/Types.h" +#include "aidge/data/Data.hpp" #include <array> #include <tuple> #include <cmath> diff --git a/include/operator/BatchNormImpl.hpp b/include/aidge/operator/BatchNormImpl.hpp similarity index 95% rename from include/operator/BatchNormImpl.hpp rename to include/aidge/operator/BatchNormImpl.hpp index 57f4aee207ec92b1eeb13d9c917cbc65c45ae88c..37d644f00f4a53b0f0b5c64928ec5c77e719ceb5 100644 --- a/include/operator/BatchNormImpl.hpp +++ b/include/aidge/operator/BatchNormImpl.hpp @@ -17,10 +17,10 @@ #include <tuple> #include <vector> -#include "backend/OperatorImpl.hpp" -#include "operator/BatchNorm.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/BatchNorm.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" namespace Aidge { // class BatchNorm_Op; diff --git a/include/operator/BatchNormImpl_forward_kernels.hpp b/include/aidge/operator/BatchNormImpl_forward_kernels.hpp similarity index 95% rename from include/operator/BatchNormImpl_forward_kernels.hpp rename to include/aidge/operator/BatchNormImpl_forward_kernels.hpp index 3bea9d743d12ae621b7d14af583ad56386cf9f7b..77a8f0aa12c3b5c450dfd765626acbe7e6dfe995 100644 --- a/include/operator/BatchNormImpl_forward_kernels.hpp +++ b/include/aidge/operator/BatchNormImpl_forward_kernels.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_BATCHNORMIMPL_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_BATCHNORMIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" -#include "operator/BatchNormImpl.hpp" -#include "utils/Types.h" +#include "aidge/operator/BatchNormImpl.hpp" +#include "aidge/utils/Types.h" #include <array> #include <cmath> #include <algorithm> diff --git a/include/operator/ConvDepthWiseImpl.hpp b/include/aidge/operator/ConvDepthWiseImpl.hpp similarity index 94% rename from include/operator/ConvDepthWiseImpl.hpp rename to include/aidge/operator/ConvDepthWiseImpl.hpp index b1a2004df46e9f2a5e00103dc1628446416c8109..e9822ffa75885bc7f11090a29b16bb6e9b38e454 100644 --- a/include/operator/ConvDepthWiseImpl.hpp +++ b/include/aidge/operator/ConvDepthWiseImpl.hpp @@ -17,10 +17,10 @@ #include <tuple> #include <vector> -#include "backend/OperatorImpl.hpp" -#include "operator/ConvDepthWise.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/ConvDepthWise.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" namespace Aidge { // class ConvDepthWise_Op; diff --git a/include/operator/ConvDepthWiseImpl_forward_kernels.hpp b/include/aidge/operator/ConvDepthWiseImpl_forward_kernels.hpp similarity index 96% rename from include/operator/ConvDepthWiseImpl_forward_kernels.hpp rename to include/aidge/operator/ConvDepthWiseImpl_forward_kernels.hpp index 2c8cb291cb0df10d5dc065ce9353d31dd6acdea9..699a086457ee54f048182b9e318dbe1311b0c75c 100644 --- a/include/operator/ConvDepthWiseImpl_forward_kernels.hpp +++ b/include/aidge/operator/ConvDepthWiseImpl_forward_kernels.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_CONVDEPTHWISEIMP_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_CONVDEPTHWISEIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" -#include "operator/ConvDepthWiseImpl.hpp" -#include "utils/Types.h" +#include "aidge/operator/ConvDepthWiseImpl.hpp" +#include "aidge/utils/Types.h" #include <cmath> #include <array> #include <algorithm> diff --git a/include/operator/ConvImpl.hpp b/include/aidge/operator/ConvImpl.hpp similarity index 94% rename from include/operator/ConvImpl.hpp rename to include/aidge/operator/ConvImpl.hpp index 81768f6889c7cd1ab10b47eb704bfddec801b899..d3fea6ac3487b15ad0e2b902f65ae7d1bf8dc283 100644 --- a/include/operator/ConvImpl.hpp +++ b/include/aidge/operator/ConvImpl.hpp @@ -17,10 +17,10 @@ #include <tuple> #include <vector> -#include "backend/OperatorImpl.hpp" -#include "operator/Conv.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/Conv.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" namespace Aidge { // class Conv_Op; diff --git a/include/operator/ConvImpl_forward_kernels.hpp b/include/aidge/operator/ConvImpl_forward_kernels.hpp similarity index 97% rename from include/operator/ConvImpl_forward_kernels.hpp rename to include/aidge/operator/ConvImpl_forward_kernels.hpp index b835ec7f8f488db6866f0286d4b5012eb06a194b..8c2aedca4855c1272838604757e3b2727f11edb0 100644 --- a/include/operator/ConvImpl_forward_kernels.hpp +++ b/include/aidge/operator/ConvImpl_forward_kernels.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_CONVIMPL_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_CONVIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" -#include "operator/ConvImpl.hpp" -#include "utils/Types.h" +#include "aidge/operator/ConvImpl.hpp" +#include "aidge/utils/Types.h" #include <cmath> #include <array> #include <algorithm> diff --git a/include/operator/FCImpl.hpp b/include/aidge/operator/FCImpl.hpp similarity index 94% rename from include/operator/FCImpl.hpp rename to include/aidge/operator/FCImpl.hpp index d331b79ed0211691ed2728e278894e79c207c80b..a0135d96232306d975284eb1240b03c1326a2f0d 100644 --- a/include/operator/FCImpl.hpp +++ b/include/aidge/operator/FCImpl.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_FCIMPL_H__ #define __AIDGE_CPU_OPERATOR_FCIMPL_H__ -#include "backend/OperatorImpl.hpp" -#include "operator/FC.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/FC.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" #include <memory> #include <vector> #include <array> diff --git a/include/operator/FCImpl_forward_kernels.hpp b/include/aidge/operator/FCImpl_forward_kernels.hpp similarity index 96% rename from include/operator/FCImpl_forward_kernels.hpp rename to include/aidge/operator/FCImpl_forward_kernels.hpp index 2c857a64ce4d8922cd6c6ea3061faf2098affe0b..a481e2d5f80ec9c722af7f00b688003c12a4e35a 100644 --- a/include/operator/FCImpl_forward_kernels.hpp +++ b/include/aidge/operator/FCImpl_forward_kernels.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_FCIMPL_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_FCIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" #include <algorithm> -#include "operator/FCImpl.hpp" +#include "aidge/operator/FCImpl.hpp" namespace Aidge { // template <class I, class W, class B, class O> diff --git a/include/operator/LeakyReLUImpl.hpp b/include/aidge/operator/LeakyReLUImpl.hpp similarity index 93% rename from include/operator/LeakyReLUImpl.hpp rename to include/aidge/operator/LeakyReLUImpl.hpp index 115926e9114115358b31387f932c79bbc7c67b94..a04b810be35cb76bec839aeb1d3ab94ee967e906 100644 --- a/include/operator/LeakyReLUImpl.hpp +++ b/include/aidge/operator/LeakyReLUImpl.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_LEAKYRELUIMPL_H__ #define __AIDGE_CPU_OPERATOR_LEAKYRELUIMPL_H__ -#include "backend/OperatorImpl.hpp" -#include "operator/LeakyReLU.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/LeakyReLU.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" #include <memory> #include <vector> diff --git a/include/operator/LeakyReLUImpl_forward_kernels.hpp b/include/aidge/operator/LeakyReLUImpl_forward_kernels.hpp similarity index 93% rename from include/operator/LeakyReLUImpl_forward_kernels.hpp rename to include/aidge/operator/LeakyReLUImpl_forward_kernels.hpp index 8c450d649128d8d2aed3eb6c4ad6c3c6f6ec48d9..e41a8f20ebd3c405f7adbc9ed4ded3080c9688ce 100644 --- a/include/operator/LeakyReLUImpl_forward_kernels.hpp +++ b/include/aidge/operator/LeakyReLUImpl_forward_kernels.hpp @@ -12,9 +12,9 @@ #ifndef __AIDGE_CPU_OPERATOR_LEAKYRELUIMPL_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_LEAKYRELUIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" -#include "operator/LeakyReLUImpl.hpp" +#include "aidge/operator/LeakyReLUImpl.hpp" namespace Aidge { template <class I, class O> diff --git a/include/operator/ProducerImpl.hpp b/include/aidge/operator/ProducerImpl.hpp similarity index 91% rename from include/operator/ProducerImpl.hpp rename to include/aidge/operator/ProducerImpl.hpp index 6f424c8f83383be5e887c3f010f4f4b52834d9dc..9cce69c6bc1d71277d88df4a8f27698c7db2fa66 100644 --- a/include/operator/ProducerImpl.hpp +++ b/include/aidge/operator/ProducerImpl.hpp @@ -14,10 +14,10 @@ #include <memory> -#include "backend/OperatorImpl.hpp" -#include "operator/Producer.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/Producer.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" namespace Aidge { class ProducerImpl_cpu : public OperatorImpl { diff --git a/include/operator/ReLUImpl.hpp b/include/aidge/operator/ReLUImpl.hpp similarity index 93% rename from include/operator/ReLUImpl.hpp rename to include/aidge/operator/ReLUImpl.hpp index 5797b9a932228837ba312ad920dc7c8cc14de7fb..eb0b61b2d7d61554955e01735e755aaea67a7eec 100644 --- a/include/operator/ReLUImpl.hpp +++ b/include/aidge/operator/ReLUImpl.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_RELUIMPL_H__ #define __AIDGE_CPU_OPERATOR_RELUIMPL_H__ -#include "backend/OperatorImpl.hpp" -#include "operator/ReLU.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/ReLU.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" #include <memory> #include <vector> diff --git a/include/operator/ReLUImpl_forward_kernels.hpp b/include/aidge/operator/ReLUImpl_forward_kernels.hpp similarity index 93% rename from include/operator/ReLUImpl_forward_kernels.hpp rename to include/aidge/operator/ReLUImpl_forward_kernels.hpp index 567185fb2428cf97c3ceccd3c9f57edc19aa1242..640455a43791c72fcb4832987e1a035239f746af 100644 --- a/include/operator/ReLUImpl_forward_kernels.hpp +++ b/include/aidge/operator/ReLUImpl_forward_kernels.hpp @@ -12,9 +12,9 @@ #ifndef __AIDGE_CPU_OPERATOR_RELUIMPL_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_RELUIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" -#include "operator/ReLUImpl.hpp" +#include "aidge/operator/ReLUImpl.hpp" namespace Aidge { template <class I, class O> diff --git a/include/operator/SoftmaxImpl.hpp b/include/aidge/operator/SoftmaxImpl.hpp similarity index 93% rename from include/operator/SoftmaxImpl.hpp rename to include/aidge/operator/SoftmaxImpl.hpp index c6f881e7812198818573d633b2442841e71e5b4b..5020802c84aef4ccd77403db987c47fedf0cf8f6 100644 --- a/include/operator/SoftmaxImpl.hpp +++ b/include/aidge/operator/SoftmaxImpl.hpp @@ -12,10 +12,10 @@ #ifndef __AIDGE_CPU_OPERATOR_SOFTMAXIMPL_H__ #define __AIDGE_CPU_OPERATOR_SOFTMAXIMPL_H__ -#include "backend/OperatorImpl.hpp" -#include "operator/Softmax.hpp" -#include "utils/Registrar.hpp" -#include "utils/Types.h" +#include "aidge/backend/OperatorImpl.hpp" +#include "aidge/operator/Softmax.hpp" +#include "aidge/utils/Registrar.hpp" +#include "aidge/utils/Types.h" #include <memory> #include <vector> diff --git a/include/operator/SoftmaxImpl_forward_kernels.hpp b/include/aidge/operator/SoftmaxImpl_forward_kernels.hpp similarity index 92% rename from include/operator/SoftmaxImpl_forward_kernels.hpp rename to include/aidge/operator/SoftmaxImpl_forward_kernels.hpp index 7e5d21565904a1655e2f2fb803abb55776aba94d..d1634e28a9b57cf2f2d486237947779b41e121bd 100644 --- a/include/operator/SoftmaxImpl_forward_kernels.hpp +++ b/include/aidge/operator/SoftmaxImpl_forward_kernels.hpp @@ -12,13 +12,13 @@ #ifndef __AIDGE_CPU_OPERATOR_SOFTMAXIMPL_FORWARD_KERNEL_H__ #define __AIDGE_CPU_OPERATOR_SOFTMAXIMPL_FORWARD_KERNEL_H__ -#include "utils/Registrar.hpp" +#include "aidge/utils/Registrar.hpp" #include <cstddef> #include <cmath> -#include "data/Data.hpp" -#include "utils/Types.h" +#include "aidge/data/Data.hpp" +#include "aidge/utils/Types.h" -#include "operator/SoftmaxImpl.hpp" +#include "aidge/operator/SoftmaxImpl.hpp" namespace Aidge { template <class I, class O> diff --git a/include/aidge_cpu.hpp b/include/aidge_cpu.hpp index 90536890e928b436cc732abf969c67584e983e4b..ce723a528fef7a1e62851a854b06feba34525f09 100644 --- a/include/aidge_cpu.hpp +++ b/include/aidge_cpu.hpp @@ -12,16 +12,16 @@ #ifndef __AIDGE_CPU_IMPORTS_H__ #define __AIDGE_CPU_IMPORTS_H__ -#include "data/TensorImpl.hpp" -#include "operator/AddImpl.hpp" -#include "operator/AvgPoolingImpl.hpp" -#include "operator/BatchNormImpl.hpp" -#include "operator/ConvDepthWiseImpl.hpp" -#include "operator/ConvImpl.hpp" -#include "operator/FCImpl.hpp" -#include "operator/LeakyReLUImpl.hpp" -#include "operator/ProducerImpl.hpp" -#include "operator/ReLUImpl.hpp" -#include "operator/SoftmaxImpl.hpp" +#include "aidge/data/TensorImpl.hpp" +#include "aidge/operator/AddImpl.hpp" +#include "aidge/operator/AvgPoolingImpl.hpp" +#include "aidge/operator/BatchNormImpl.hpp" +#include "aidge/operator/ConvDepthWiseImpl.hpp" +#include "aidge/operator/ConvImpl.hpp" +#include "aidge/operator/FCImpl.hpp" +#include "aidge/operator/LeakyReLUImpl.hpp" +#include "aidge/operator/ProducerImpl.hpp" +#include "aidge/operator/ReLUImpl.hpp" +#include "aidge/operator/SoftmaxImpl.hpp" #endif /* __AIDGE_CPU_IMPORTS_H__ */ \ No newline at end of file diff --git a/src/operator/AddImpl.cpp b/src/operator/AddImpl.cpp index 1dd998e956758a5a8414625f7c71d924ed43b8dd..47717cef1566512b0f0d37beb11fb3d28832436e 100644 --- a/src/operator/AddImpl.cpp +++ b/src/operator/AddImpl.cpp @@ -15,11 +15,11 @@ #include <thread> #include <vector> -#include "operator/Conv.hpp" +#include "aidge/operator/Conv.hpp" -#include "operator/AddImpl.hpp" -#include "operator/AddImpl_forward_kernels.hpp" -#include "utils/Types.h" +#include "aidge/operator/AddImpl.hpp" +#include "aidge/operator/AddImpl_forward_kernels.hpp" +#include "aidge/utils/Types.h" ////////////////////////////////// // AddImpl_cpu<1> diff --git a/src/operator/AvgPoolingImpl.cpp b/src/operator/AvgPoolingImpl.cpp index fafefc4b661b1669ee6ff6793b0117bb1c08547a..2e1e901d35f2ac8620f1c4be53413ce58e9260f9 100644 --- a/src/operator/AvgPoolingImpl.cpp +++ b/src/operator/AvgPoolingImpl.cpp @@ -9,16 +9,16 @@ * ********************************************************************************/ -#include "operator/AvgPoolingImpl.hpp" +#include "aidge/operator/AvgPoolingImpl.hpp" #include <cassert> #include <numeric> #include <thread> #include <vector> -#include "operator/AvgPoolingImpl_forward_kernels.hpp" -#include "operator/AvgPooling.hpp" -#include "utils/Types.h" +#include "aidge/operator/AvgPoolingImpl_forward_kernels.hpp" +#include "aidge/operator/AvgPooling.hpp" +#include "aidge/utils/Types.h" Aidge::NbElts_t Aidge::AvgPoolingImpl2D_cpu::getNbRequiredData(const Aidge::IOIndex_t inputIdx) const { assert(mOp.getInput(inputIdx) && "requires valid input"); diff --git a/src/operator/BatchNormImpl.cpp b/src/operator/BatchNormImpl.cpp index bdbb04fd0b34451ca7c0ec90ab3b21ddf73f712c..2b104f3c205bad8147b388c46592111e22da2782 100644 --- a/src/operator/BatchNormImpl.cpp +++ b/src/operator/BatchNormImpl.cpp @@ -9,16 +9,16 @@ * ********************************************************************************/ -#include "operator/BatchNormImpl.hpp" +#include "aidge/operator/BatchNormImpl.hpp" #include <cassert> #include <numeric> #include <thread> #include <vector> -#include "operator/BatchNormImpl_forward_kernels.hpp" -#include "operator/BatchNorm.hpp" -#include "utils/Types.h" +#include "aidge/operator/BatchNormImpl_forward_kernels.hpp" +#include "aidge/operator/BatchNorm.hpp" +#include "aidge/utils/Types.h" Aidge::NbElts_t Aidge::BatchNormImpl2D_cpu::getNbRequiredData(const Aidge::IOIndex_t inputIdx) const { assert(mOp.getInput(inputIdx) && "requires valid input"); diff --git a/src/operator/ConvDepthWiseImpl.cpp b/src/operator/ConvDepthWiseImpl.cpp index 667a45c2232f6bac11f4290fc0a016626085873d..4dd687fd99bd775a67663e2e05a09b1541ec2f12 100644 --- a/src/operator/ConvDepthWiseImpl.cpp +++ b/src/operator/ConvDepthWiseImpl.cpp @@ -9,7 +9,7 @@ * ********************************************************************************/ -#include "operator/ConvDepthWiseImpl.hpp" +#include "aidge/operator/ConvDepthWiseImpl.hpp" #include <cassert> #include <chrono> @@ -17,9 +17,9 @@ #include <thread> #include <vector> -#include "operator/ConvDepthWiseImpl_forward_kernels.hpp" -#include "operator/ConvDepthWise.hpp" -#include "utils/Types.h" +#include "aidge/operator/ConvDepthWiseImpl_forward_kernels.hpp" +#include "aidge/operator/ConvDepthWise.hpp" +#include "aidge/utils/Types.h" Aidge::NbElts_t Aidge::ConvDepthWiseImpl2D_cpu::getNbRequiredData(const Aidge::IOIndex_t inputIdx) const { assert(mOp.getInput(inputIdx) && "requires valid input"); diff --git a/src/operator/ConvImpl.cpp b/src/operator/ConvImpl.cpp index 21f8db4a835cfea5ca6759a43bc37a780cfe80c4..0c892673b049b1789ca6ab5bab8b279835d87ce9 100644 --- a/src/operator/ConvImpl.cpp +++ b/src/operator/ConvImpl.cpp @@ -9,7 +9,7 @@ * ********************************************************************************/ -#include "operator/ConvImpl.hpp" +#include "aidge/operator/ConvImpl.hpp" #include <cassert> #include <chrono> @@ -17,9 +17,9 @@ #include <thread> #include <vector> -#include "operator/ConvImpl_forward_kernels.hpp" -#include "operator/Conv.hpp" -#include "utils/Types.h" +#include "aidge/operator/ConvImpl_forward_kernels.hpp" +#include "aidge/operator/Conv.hpp" +#include "aidge/utils/Types.h" Aidge::NbElts_t Aidge::ConvImpl2D_cpu::getNbRequiredData(const Aidge::IOIndex_t inputIdx) const { assert(mOp.getInput(inputIdx) && "requires valid input"); diff --git a/src/operator/FCImpl.cpp b/src/operator/FCImpl.cpp index 86ee79c66188a845d4cfdbb60bf67b9b42ede499..0f1bf6047e2e73dfbdb4ea8054cac28364735bcc 100644 --- a/src/operator/FCImpl.cpp +++ b/src/operator/FCImpl.cpp @@ -15,10 +15,10 @@ #include <thread> #include <vector> -#include "operator/FC.hpp" -#include "operator/FCImpl.hpp" -#include "operator/FCImpl_forward_kernels.hpp" -#include "utils/Types.h" +#include "aidge/operator/FC.hpp" +#include "aidge/operator/FCImpl.hpp" +#include "aidge/operator/FCImpl_forward_kernels.hpp" +#include "aidge/utils/Types.h" Aidge::NbElts_t Aidge::FCImpl_cpu::getNbRequiredData(const Aidge::IOIndex_t inputIdx) const { diff --git a/src/operator/LeakyReLUImpl.cpp b/src/operator/LeakyReLUImpl.cpp index c05af23ae75d166761fa75a9b94ed32f2f9c9a6b..c7493f12773fe372c6a07767c0151ac34471b65b 100644 --- a/src/operator/LeakyReLUImpl.cpp +++ b/src/operator/LeakyReLUImpl.cpp @@ -14,11 +14,11 @@ #include <chrono> #include <thread> -#include "operator/LeakyReLU.hpp" +#include "aidge/operator/LeakyReLU.hpp" -#include "operator/LeakyReLUImpl.hpp" -#include "operator/LeakyReLUImpl_forward_kernels.hpp" -#include "utils/Types.h" +#include "aidge/operator/LeakyReLUImpl.hpp" +#include "aidge/operator/LeakyReLUImpl_forward_kernels.hpp" +#include "aidge/utils/Types.h" #include <numeric> #include <vector> diff --git a/src/operator/ProducerImpl.cpp b/src/operator/ProducerImpl.cpp index 6f067dbed6a9447da867dca681c5a9e86a3c3700..b2abcdf3facb5c119957b4c3bc9ae33e9e8ddb4a 100644 --- a/src/operator/ProducerImpl.cpp +++ b/src/operator/ProducerImpl.cpp @@ -13,11 +13,11 @@ #include <numeric> #include <vector> -#include "data/Tensor.hpp" -#include "operator/Producer.hpp" -#include "utils/Types.h" +#include "aidge/data/Tensor.hpp" +#include "aidge/operator/Producer.hpp" +#include "aidge/utils/Types.h" -#include "operator/ProducerImpl.hpp" +#include "aidge/operator/ProducerImpl.hpp" std::size_t Aidge::ProducerImpl_cpu::getNbRequiredData( diff --git a/src/operator/ReLUImpl.cpp b/src/operator/ReLUImpl.cpp index 1512cef9e3a8b7857331fc3224bc48a50966e3ae..90763a918bca3bd80f9b1d5a8b22417bafb91427 100644 --- a/src/operator/ReLUImpl.cpp +++ b/src/operator/ReLUImpl.cpp @@ -14,11 +14,11 @@ #include <chrono> #include <thread> -#include "operator/ReLU.hpp" +#include "aidge/operator/ReLU.hpp" -#include "operator/ReLUImpl.hpp" -#include "operator/ReLUImpl_forward_kernels.hpp" -#include "utils/Types.h" +#include "aidge/operator/ReLUImpl.hpp" +#include "aidge/operator/ReLUImpl_forward_kernels.hpp" +#include "aidge/utils/Types.h" #include <numeric> #include <vector> diff --git a/src/operator/SoftmaxImpl.cpp b/src/operator/SoftmaxImpl.cpp index 79b868244ca7fd97a85b40c3afbb6ff8b41f243d..860ee7913df44e26e861d228e29831e1b90cdf52 100644 --- a/src/operator/SoftmaxImpl.cpp +++ b/src/operator/SoftmaxImpl.cpp @@ -14,11 +14,11 @@ #include <chrono> #include <thread> -#include "operator/Softmax.hpp" +#include "aidge/operator/Softmax.hpp" -#include "operator/SoftmaxImpl.hpp" -#include "operator/SoftmaxImpl_forward_kernels.hpp" -#include "utils/Types.h" +#include "aidge/operator/SoftmaxImpl.hpp" +#include "aidge/operator/SoftmaxImpl_forward_kernels.hpp" +#include "aidge/utils/Types.h" #include <numeric> #include <vector> diff --git a/tests/CMakeLists.txt b/unit_tests/CMakeLists.txt similarity index 100% rename from tests/CMakeLists.txt rename to unit_tests/CMakeLists.txt diff --git a/tests/Test_Scheduler.cpp b/unit_tests/Test_Scheduler.cpp similarity index 98% rename from tests/Test_Scheduler.cpp rename to unit_tests/Test_Scheduler.cpp index 4e6747e8e57bf2d826da564b76a75591878353d8..57f3ce2e0ba66c6f68b4c7a49a06595f64987ca5 100644 --- a/tests/Test_Scheduler.cpp +++ b/unit_tests/Test_Scheduler.cpp @@ -13,11 +13,11 @@ #include <memory> #include <string> -#include "data/Tensor.hpp" -#include "graph/Node.hpp" -#include "graph/GraphView.hpp" -#include "graph/OpArgs.hpp" -#include "scheduler/Scheduler.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/graph/Node.hpp" +#include "aidge/graph/GraphView.hpp" +#include "aidge/graph/OpArgs.hpp" +#include "aidge/scheduler/Scheduler.hpp" #include "aidge_cpu.hpp" using namespace Aidge; diff --git a/tests/Test_TensorImpl.cpp b/unit_tests/Test_TensorImpl.cpp similarity index 96% rename from tests/Test_TensorImpl.cpp rename to unit_tests/Test_TensorImpl.cpp index a912e3dcee06c354b05b7da51c44e69bcb3b523b..ca9e7df5617fa0ccff2ecf2c69ef45208f9f9da5 100644 --- a/tests/Test_TensorImpl.cpp +++ b/unit_tests/Test_TensorImpl.cpp @@ -13,8 +13,8 @@ #include <catch2/catch_test_macros.hpp> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" using namespace Aidge; diff --git a/tests/operator/Test_AddImpl.cpp b/unit_tests/operator/Test_AddImpl.cpp similarity index 97% rename from tests/operator/Test_AddImpl.cpp rename to unit_tests/operator/Test_AddImpl.cpp index 847e7ae96a0d3c8e89e1d36562d55f62b33d0f30..13356ba21bd50c88801e4f7a2a6e7d30e79bb97c 100644 --- a/tests/operator/Test_AddImpl.cpp +++ b/unit_tests/operator/Test_AddImpl.cpp @@ -11,10 +11,10 @@ #include <catch2/catch_test_macros.hpp> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" #include "aidge_cpu.hpp" -#include "operator/Add.hpp" +#include "aidge/operator/Add.hpp" using namespace Aidge; diff --git a/tests/operator/Test_AvgPoolingImpl.cpp b/unit_tests/operator/Test_AvgPoolingImpl.cpp similarity index 97% rename from tests/operator/Test_AvgPoolingImpl.cpp rename to unit_tests/operator/Test_AvgPoolingImpl.cpp index 2ee57560d7eccad3c5d16d7e4152a6204a7a8552..e6ff2aa7b2958805ae6bcdb97587c00dadfa574d 100644 --- a/tests/operator/Test_AvgPoolingImpl.cpp +++ b/unit_tests/operator/Test_AvgPoolingImpl.cpp @@ -13,10 +13,10 @@ #include <memory> #include <cstdlib> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" #include "aidge_cpu.hpp" -#include "operator/AvgPooling.hpp" +#include "aidge/operator/AvgPooling.hpp" using namespace Aidge; diff --git a/tests/operator/Test_BatchNormImpl.cpp b/unit_tests/operator/Test_BatchNormImpl.cpp similarity index 97% rename from tests/operator/Test_BatchNormImpl.cpp rename to unit_tests/operator/Test_BatchNormImpl.cpp index 4c6b20e182869c19eba10d99a2572b8523626d06..eace14ec4ef257e5911d15122b5c1e67d7ac169f 100644 --- a/tests/operator/Test_BatchNormImpl.cpp +++ b/unit_tests/operator/Test_BatchNormImpl.cpp @@ -12,10 +12,10 @@ #include <catch2/catch_test_macros.hpp> #include <memory> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" #include "aidge_cpu.hpp" -#include "operator/BatchNorm.hpp" +#include "aidge/operator/BatchNorm.hpp" using namespace Aidge; diff --git a/tests/operator/Test_ConvDepthWiseImpl.cpp b/unit_tests/operator/Test_ConvDepthWiseImpl.cpp similarity index 97% rename from tests/operator/Test_ConvDepthWiseImpl.cpp rename to unit_tests/operator/Test_ConvDepthWiseImpl.cpp index 835c43f62c7416a434676830b3ccaf3618e9b52b..444c0d4590a49e06089535881f704d5f8535a4ee 100644 --- a/tests/operator/Test_ConvDepthWiseImpl.cpp +++ b/unit_tests/operator/Test_ConvDepthWiseImpl.cpp @@ -12,10 +12,10 @@ #include <catch2/catch_test_macros.hpp> #include <memory> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" #include "aidge_cpu.hpp" -#include "operator/ConvDepthWise.hpp" +#include "aidge/operator/ConvDepthWise.hpp" using namespace Aidge; diff --git a/tests/operator/Test_ConvImpl.cpp b/unit_tests/operator/Test_ConvImpl.cpp similarity index 99% rename from tests/operator/Test_ConvImpl.cpp rename to unit_tests/operator/Test_ConvImpl.cpp index ca3e9926afdc83872bc0fd7d576d0e8b4f6ef05f..358c402bd9501cf274df6a20ebdce34d46295f6c 100644 --- a/tests/operator/Test_ConvImpl.cpp +++ b/unit_tests/operator/Test_ConvImpl.cpp @@ -13,10 +13,10 @@ #include <cstdlib> #include <memory> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" #include "aidge_cpu.hpp" -#include "operator/Conv.hpp" +#include "aidge/operator/Conv.hpp" using namespace Aidge; diff --git a/tests/operator/Test_FCImpl.cpp b/unit_tests/operator/Test_FCImpl.cpp similarity index 98% rename from tests/operator/Test_FCImpl.cpp rename to unit_tests/operator/Test_FCImpl.cpp index be4361bb59c7824662e0b633e4ea2f80295e13dc..f3056e078cf2aea27de4768b9a62e2fc7f9c3906 100644 --- a/tests/operator/Test_FCImpl.cpp +++ b/unit_tests/operator/Test_FCImpl.cpp @@ -13,9 +13,9 @@ #include <memory> #include "aidge_cpu.hpp" -#include "data/TensorImpl.hpp" -#include "data/Tensor.hpp" -#include "operator/FC.hpp" +#include "aidge/data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/operator/FC.hpp" using namespace Aidge; diff --git a/tests/operator/Test_LeakyReLUImpl.cpp b/unit_tests/operator/Test_LeakyReLUImpl.cpp similarity index 98% rename from tests/operator/Test_LeakyReLUImpl.cpp rename to unit_tests/operator/Test_LeakyReLUImpl.cpp index b753e61887879b01c6d2c88d89f6e6668c76754a..582a2276acb4b8b2589ab051d337cb3f721fa6a2 100644 --- a/tests/operator/Test_LeakyReLUImpl.cpp +++ b/unit_tests/operator/Test_LeakyReLUImpl.cpp @@ -11,10 +11,10 @@ #include <catch2/catch_test_macros.hpp> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" #include "aidge_cpu.hpp" -#include "operator/LeakyReLU.hpp" +#include "aidge/operator/LeakyReLU.hpp" using namespace Aidge; diff --git a/tests/operator/Test_ReLUImpl.cpp b/unit_tests/operator/Test_ReLUImpl.cpp similarity index 98% rename from tests/operator/Test_ReLUImpl.cpp rename to unit_tests/operator/Test_ReLUImpl.cpp index 59a5b47f5fde58a5170b6e4bbc3c3fd84094d4ac..99f5cd6a1e97dd7c8e29559f8debd438cf9b57b6 100644 --- a/tests/operator/Test_ReLUImpl.cpp +++ b/unit_tests/operator/Test_ReLUImpl.cpp @@ -11,10 +11,10 @@ #include <catch2/catch_test_macros.hpp> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" #include "aidge_cpu.hpp" -#include "operator/ReLU.hpp" +#include "aidge/operator/ReLU.hpp" #include <memory> diff --git a/tests/operator/Test_SoftmaxImpl.cpp b/unit_tests/operator/Test_SoftmaxImpl.cpp similarity index 98% rename from tests/operator/Test_SoftmaxImpl.cpp rename to unit_tests/operator/Test_SoftmaxImpl.cpp index 6a3ceb5cd00c2a3d361543e2b5afbe9e1d297e02..32324b5cd2e03d33b79e7a3111d0dc4776b702e6 100644 --- a/tests/operator/Test_SoftmaxImpl.cpp +++ b/unit_tests/operator/Test_SoftmaxImpl.cpp @@ -11,10 +11,10 @@ #include <catch2/catch_test_macros.hpp> -#include "data/Tensor.hpp" -#include "data/TensorImpl.hpp" +#include "aidge/data/Tensor.hpp" +#include "aidge/data/TensorImpl.hpp" #include "aidge_cpu.hpp" -#include "operator/Softmax.hpp" +#include "aidge/operator/Softmax.hpp" #include <memory> diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000000000000000000000000000000000..8a9ecc2ea99d607e92feae1656ddbf6fdd82a2c1 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.0.1 \ No newline at end of file