From ef3f7eb4d4aab619a5b3a349b3eac509bef435e8 Mon Sep 17 00:00:00 2001 From: Parichay Kapoor Date: Mon, 26 Jul 2021 17:47:14 +0900 Subject: [PATCH] [devel/pkg] Update the devel packaging Update the devel packaging to remove unnecessary headers. - weight/var_grad headers are removed - app_context and other graph, network related headers are removed. They can be added once network/neural network headers are refactored for custom models. - manager and dynamic_training_optimization header is removed - databuffer headers are commented. They will be updated once dataset refactoring is done. Signed-off-by: Parichay Kapoor --- debian/nntrainer-dev.install | 28 +++++++++++----------------- nntrainer/graph/meson.build | 12 ++++-------- nntrainer/layers/meson.build | 4 +--- nntrainer/meson.build | 3 --- nntrainer/models/meson.build | 5 +---- nntrainer/optimizers/meson.build | 3 ++- nntrainer/tensor/meson.build | 3 --- nntrainer/tensor/tensor_wrap_specs.h | 4 ++-- nntrainer/utils/meson.build | 3 +-- packaging/nntrainer.spec | 27 ++++++++++----------------- 10 files changed, 32 insertions(+), 60 deletions(-) diff --git a/debian/nntrainer-dev.install b/debian/nntrainer-dev.install index e8bffe3..9f4130f 100644 --- a/debian/nntrainer-dev.install +++ b/debian/nntrainer-dev.install @@ -1,29 +1,23 @@ -/usr/include/nntrainer/app_context.h +# node exporter and its dependencies /usr/include/nntrainer/nntrainer_error.h -/usr/include/nntrainer/nntrainer_log.h -/usr/include/nntrainer/nntrainer_logger.h -/usr/include/nntrainer/acti_func.h /usr/include/nntrainer/common_properties.h -/usr/include/nntrainer/weight.h -/usr/include/nntrainer/var_grad.h /usr/include/nntrainer/base_properties.h +/usr/include/nntrainer/props_util.h /usr/include/nntrainer/node_exporter.h -/usr/include/nntrainer/parse_util.h -/usr/include/nntrainer/graph_core.h -/usr/include/nntrainer/graph_node.h +# tensor headers +/usr/include/nntrainer/tensor.h +/usr/include/nntrainer/tensor_wrap_specs.h +# todo: update dataset headers /usr/include/nntrainer/databuffer.h /usr/include/nntrainer/databuffer_factory.h +# layer headers /usr/include/nntrainer/layer_context.h /usr/include/nntrainer/layer_devel.h -/usr/include/nntrainer/neuralnet.h -/usr/include/nntrainer/tensor.h -/usr/include/nntrainer/tensor_wrap_specs.h +/usr/include/nntrainer/layer_impl.h +# optimizer headers +/usr/include/nntrainer/optimizer_context.h /usr/include/nntrainer/optimizer_devel.h /usr/include/nntrainer/optimizer_impl.h -/usr/include/nntrainer/profiler.h -/usr/include/nntrainer/dynamic_training_optimization.h -/usr/include/nntrainer/layer_node.h -/usr/include/nntrainer/manager.h -/usr/include/nntrainer/network_graph.h +# pkg config and static binary /usr/lib/*/pkgconfig/nntrainer.pc /usr/lib/*/libnntrainer.a diff --git a/nntrainer/graph/meson.build b/nntrainer/graph/meson.build index 4f18f87..e0e6ad2 100644 --- a/nntrainer/graph/meson.build +++ b/nntrainer/graph/meson.build @@ -1,18 +1,14 @@ -layer_sources = [ +graph_sources = [ 'network_graph.cpp', 'graph_core.cpp' ] -layer_headers = [ - 'network_graph.h', - 'graph_node.h', - 'graph_core.h' -] +graph_headers = [] -foreach s : layer_sources +foreach s : graph_sources nntrainer_sources += meson.current_source_dir() / s endforeach -foreach h : layer_headers +foreach h : graph_headers nntrainer_headers += meson.current_source_dir() / h endforeach diff --git a/nntrainer/layers/meson.build b/nntrainer/layers/meson.build index 08cb94a..23b783d 100644 --- a/nntrainer/layers/meson.build +++ b/nntrainer/layers/meson.build @@ -32,9 +32,7 @@ layer_sources = [ layer_headers = [ 'layer_context.h', 'layer_devel.h', - 'acti_func.h', - 'layer_node.h', - 'layer_devel.h', + 'layer_impl.h', 'common_properties.h', ] diff --git a/nntrainer/meson.build b/nntrainer/meson.build index 793c333..9b396c2 100644 --- a/nntrainer/meson.build +++ b/nntrainer/meson.build @@ -5,10 +5,7 @@ nntrainer_inc = [ nntrainer_sources = [] nntrainer_headers = [ - 'app_context.h', 'nntrainer_error.h', - 'nntrainer_log.h', - 'nntrainer_logger.h' ] # Dependencies diff --git a/nntrainer/models/meson.build b/nntrainer/models/meson.build index 196fab0..13d3d5e 100644 --- a/nntrainer/models/meson.build +++ b/nntrainer/models/meson.build @@ -4,10 +4,7 @@ model_sources = [ 'dynamic_training_optimization.cpp' ] -model_headers = [ - 'neuralnet.h', - 'dynamic_training_optimization.h' -] +model_headers = [] foreach s : model_sources nntrainer_sources += meson.current_source_dir() / s diff --git a/nntrainer/optimizers/meson.build b/nntrainer/optimizers/meson.build index 866b07b..5269560 100644 --- a/nntrainer/optimizers/meson.build +++ b/nntrainer/optimizers/meson.build @@ -8,7 +8,8 @@ optimizer_sources = [ optimizer_headers = [ 'optimizer_devel.h', - 'optimizer_impl.h' + 'optimizer_impl.h', + 'optimizer_context.h' ] foreach s : optimizer_sources diff --git a/nntrainer/tensor/meson.build b/nntrainer/tensor/meson.build index d86987e..f849156 100644 --- a/nntrainer/tensor/meson.build +++ b/nntrainer/tensor/meson.build @@ -9,10 +9,7 @@ tensor_sources = [ ] tensor_headers = [ - 'manager.h', 'tensor.h', - 'weight.h', - 'var_grad.h', 'tensor_wrap_specs.h' ] diff --git a/nntrainer/tensor/tensor_wrap_specs.h b/nntrainer/tensor/tensor_wrap_specs.h index fe9fa69..03233f1 100644 --- a/nntrainer/tensor/tensor_wrap_specs.h +++ b/nntrainer/tensor/tensor_wrap_specs.h @@ -50,7 +50,7 @@ enum class WeightInitializer { * @brief Specification of the Weight as a tensor wrapper * * @details The tuple values are dimension, initializer, regularizer, - * regularizer_constant, need_gradient property amd name of the Weight object. + * regularizer_constant, need_gradient property amd name of the tensor object. */ typedef std::tuple @@ -60,7 +60,7 @@ typedef std::tuple VarGradSpec; diff --git a/nntrainer/utils/meson.build b/nntrainer/utils/meson.build index 39c8a88..28d76c0 100644 --- a/nntrainer/utils/meson.build +++ b/nntrainer/utils/meson.build @@ -8,9 +8,8 @@ util_sources = [ ] util_headers = [ - 'profiler.h', 'base_properties.h', - 'parse_util.h', + 'props_util.h', 'node_exporter.h' ] diff --git a/packaging/nntrainer.spec b/packaging/nntrainer.spec index 6d42b28..51bd1b8 100644 --- a/packaging/nntrainer.spec +++ b/packaging/nntrainer.spec @@ -431,33 +431,26 @@ cp -r result %{buildroot}%{_datadir}/nntrainer/unittest/ %config %{_sysconfdir}/nntrainer.ini %files devel -%{_includedir}/nntrainer/app_context.h +# node exporter and its dependencies %{_includedir}/nntrainer/nntrainer_error.h -%{_includedir}/nntrainer/nntrainer_log.h -%{_includedir}/nntrainer/nntrainer_logger.h -%{_includedir}/nntrainer/acti_func.h %{_includedir}/nntrainer/common_properties.h -%{_includedir}/nntrainer/weight.h -%{_includedir}/nntrainer/var_grad.h %{_includedir}/nntrainer/base_properties.h +%{_includedir}/nntrainer/props_util.h %{_includedir}/nntrainer/node_exporter.h -%{_includedir}/nntrainer/parse_util.h -%{_includedir}/nntrainer/graph_core.h -%{_includedir}/nntrainer/graph_node.h +# tensor headers +%{_includedir}/nntrainer/tensor.h +%{_includedir}/nntrainer/tensor_wrap_specs.h +# @todo: update dataset headers %{_includedir}/nntrainer/databuffer.h %{_includedir}/nntrainer/databuffer_factory.h +# layer headers %{_includedir}/nntrainer/layer_context.h %{_includedir}/nntrainer/layer_devel.h -%{_includedir}/nntrainer/neuralnet.h -%{_includedir}/nntrainer/tensor.h -%{_includedir}/nntrainer/tensor_wrap_specs.h +%{_includedir}/nntrainer/layer_impl.h +# optimizer headers +%{_includedir}/nntrainer/optimizer_context.h %{_includedir}/nntrainer/optimizer_devel.h %{_includedir}/nntrainer/optimizer_impl.h -%{_includedir}/nntrainer/profiler.h -%{_includedir}/nntrainer/dynamic_training_optimization.h -%{_includedir}/nntrainer/layer_node.h -%{_includedir}/nntrainer/manager.h -%{_includedir}/nntrainer/network_graph.h %{_libdir}/pkgconfig/nntrainer.pc %files devel-static -- 2.7.4