You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/26 07:57:52 UTC

[GitHub] [incubator-nuttx-apps] jerpelea opened a new pull request #983: Add support for NNabla C Runtime

jerpelea opened a new pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983


   ## Summary
   This is a runtime library for inference Neural Network created
   by Neural Network Libraries.
   
   Project git: https://github.com/sony/nnabla-c-runtime
   
   It is almost independent from external libraries(depends on C
   standard math library) and is written in Pure C (C99).
   
   It has been developed with priority over readability rather than
   performance, making it ideal for learning and porting.
   It adopts an extensible architecture, and you can use the function
   you implemented yourself as necessary for applications that need performance.
   
   Project license : Apache 2.0 License
   https://github.com/sony/nnabla-c-runtime/blob/master/LICENSE
   
   ## Impact
   ML
   
   ## Testing
   spresense
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] jerpelea commented on pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#issuecomment-1022103850


   @xiaoxiang781216 
   /bin/sh: 1: arm-nuttx-eabi-gcc: not found
   
   is this a knonw CI issue? I cant find issues with the PR


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] jerpelea commented on a change in pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#discussion_r792423150



##########
File path: mlearning/libnnablart/nnablart.defs
##########
@@ -0,0 +1,42 @@
+############################################################################
+# apps/mlearning/libnnablart/nnablart.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+
+nnabla.zip:
+	$(Q) curl -L https://github.com/sony/nnabla-c-runtime/archive/refs/tags/v$(CONFIG_NNABLA_RT_VER).zip -o nnabla.zip
+	$(Q) unzip -o nnabla.zip
+	$(Q) mv nnabla-c-runtime-$(CONFIG_NNABLA_RT_VER) nnabla-c-runtime
+
+.nnabla_headers: nnabla.zip
+	$(shell mkdir -p $(TOPDIR)$(DELIM)include$(DELIM)nnablart$(DELIM))
+	$(eval headers := $(wildcard nnabla-c-runtime$(DELIM)include$(DELIM)nnablart$(DELIM)*.h))
+	$(foreach header,$(headers),$(shell cp -rf $(header) $(TOPDIR)$(DELIM)include$(DELIM)nnablart))

Review comment:
       I already tried that but it will not work since several headers have circular dependency for cmsis so I did the same for nnabla
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#discussion_r792416806



##########
File path: mlearning/libnnablart/nnablart.defs
##########
@@ -0,0 +1,42 @@
+############################################################################
+# apps/mlearning/libnnablart/nnablart.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+
+nnabla.zip:
+	$(Q) curl -L https://github.com/sony/nnabla-c-runtime/archive/refs/tags/v$(CONFIG_NNABLA_RT_VER).zip -o nnabla.zip
+	$(Q) unzip -o nnabla.zip
+	$(Q) mv nnabla-c-runtime-$(CONFIG_NNABLA_RT_VER) nnabla-c-runtime
+
+.nnabla_headers: nnabla.zip
+	$(shell mkdir -p $(TOPDIR)$(DELIM)include$(DELIM)nnablart$(DELIM))
+	$(eval headers := $(wildcard nnabla-c-runtime$(DELIM)include$(DELIM)nnablart$(DELIM)*.h))
+	$(foreach header,$(headers),$(shell cp -rf $(header) $(TOPDIR)$(DELIM)include$(DELIM)nnablart))

Review comment:
       can we create a link instead? or expose the search by in Make.defs:
   https://github.com/apache/incubator-nuttx-apps/blob/master/crypto/libtomcrypt/Make.defs#L26-L27




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] jerpelea commented on pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#issuecomment-1022212350


   @xiaoxiang781216 fixed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] jerpelea commented on pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#issuecomment-1022937528


   @xiaoxiang781216 can we ignore the yaml error?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#issuecomment-1023014694


   It's strange that linter report the issue happen in .github/workflows/build.yml since we haven't change it for a long time.
   
   > @xiaoxiang781216 can we ignore the yaml error?
   
   Let's merge your change first.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] jerpelea commented on a change in pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#discussion_r792457685



##########
File path: mlearning/libnnablart/nnablart.defs
##########
@@ -0,0 +1,42 @@
+############################################################################
+# apps/mlearning/libnnablart/nnablart.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+
+nnabla.zip:
+	$(Q) curl -L https://github.com/sony/nnabla-c-runtime/archive/refs/tags/v$(CONFIG_NNABLA_RT_VER).zip -o nnabla.zip
+	$(Q) unzip -o nnabla.zip
+	$(Q) mv nnabla-c-runtime-$(CONFIG_NNABLA_RT_VER) nnabla-c-runtime
+
+.nnabla_headers: nnabla.zip
+	$(shell mkdir -p $(TOPDIR)$(DELIM)include$(DELIM)nnablart$(DELIM))
+	$(eval headers := $(wildcard nnabla-c-runtime$(DELIM)include$(DELIM)nnablart$(DELIM)*.h))
+	$(foreach header,$(headers),$(shell cp -rf $(header) $(TOPDIR)$(DELIM)include$(DELIM)nnablart))

Review comment:
       tested on nnabla and works fine




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] jerpelea commented on a change in pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
jerpelea commented on a change in pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#discussion_r792423150



##########
File path: mlearning/libnnablart/nnablart.defs
##########
@@ -0,0 +1,42 @@
+############################################################################
+# apps/mlearning/libnnablart/nnablart.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+
+nnabla.zip:
+	$(Q) curl -L https://github.com/sony/nnabla-c-runtime/archive/refs/tags/v$(CONFIG_NNABLA_RT_VER).zip -o nnabla.zip
+	$(Q) unzip -o nnabla.zip
+	$(Q) mv nnabla-c-runtime-$(CONFIG_NNABLA_RT_VER) nnabla-c-runtime
+
+.nnabla_headers: nnabla.zip
+	$(shell mkdir -p $(TOPDIR)$(DELIM)include$(DELIM)nnablart$(DELIM))
+	$(eval headers := $(wildcard nnabla-c-runtime$(DELIM)include$(DELIM)nnablart$(DELIM)*.h))
+	$(foreach header,$(headers),$(shell cp -rf $(header) $(TOPDIR)$(DELIM)include$(DELIM)nnablart))

Review comment:
       I already tried that but it will not work since several headers have circular dependency
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#discussion_r792966113



##########
File path: mlearning/libnnablart/Make.defs
##########
@@ -0,0 +1,26 @@
+############################################################################
+# apps/mlearning/libnnablart/Make.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+CONFIGURED_APPS += $(APPDIR)/mlearning/libnnablart
+endif
+
+CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/mlearning/libnnablart/nnabla-c-runtime/include/nnablart/}
+CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/mlearning/libnnablart/nnabla-c-runtime/include/nnablart/}

Review comment:
       need move into ifeq/endif section at line 21-23 to avoid to pollute the search path when user doesn't enable libnnablart

##########
File path: mlearning/libnnablart/Makefile
##########
@@ -0,0 +1,119 @@
+############################################################################
+# apps/mlearning/libnnablart/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+include nnablart.defs
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+SRC = nnabla-c-runtime/src
+
+CSRCS   += $(SRC)/functions/utilities/accessor.c
+CSRCS   += $(SRC)/functions/utilities/fixedpoint.c
+CSRCS   += $(SRC)/functions/utilities/list.c
+CSRCS   += $(SRC)/functions/utilities/shape.c
+CSRCS   += $(SRC)/functions/implements/activation/sigmoid.c
+CSRCS   += $(SRC)/functions/implements/activation/relu.c
+CSRCS   += $(SRC)/functions/implements/activation/tanh.c
+CSRCS   += $(SRC)/functions/implements/activation/softmax.c
+CSRCS   += $(SRC)/functions/implements/activation/selu.c
+CSRCS   += $(SRC)/functions/implements/activation/elu.c
+CSRCS   += $(SRC)/functions/implements/activation/prelu.c
+CSRCS   += $(SRC)/functions/implements/activation/leakyrelu.c
+CSRCS   += $(SRC)/functions/implements/activation/crelu.c
+CSRCS   += $(SRC)/functions/implements/activation/celu.c
+CSRCS   += $(SRC)/functions/implements/activation/swish.c
+CSRCS   += $(SRC)/functions/implements/math/abs.c
+CSRCS   += $(SRC)/functions/implements/math/batch_matmul.c
+CSRCS   += $(SRC)/functions/implements/math/exp.c
+CSRCS   += $(SRC)/functions/implements/math/identity.c
+CSRCS   += $(SRC)/functions/implements/math/log.c
+CSRCS   += $(SRC)/functions/implements/math/round.c
+CSRCS   += $(SRC)/functions/implements/quantization/binary_tanh.c
+CSRCS   += $(SRC)/functions/implements/quantization/binary_sigmoid.c
+CSRCS   += $(SRC)/functions/implements/quantization/binary_connect_affine.c
+CSRCS   += $(SRC)/functions/implements/quantization/binary_weight_affine.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/add_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/arithmetic.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/arithmetic_fixed.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/arithmetic_generic.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/div2.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/mul2.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/mul_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/pow2.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/pow_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/r_div_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/r_pow_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/r_sub_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/sub2.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/add2.c
+CSRCS   += $(SRC)/functions/implements/logical/maximum_scalar.c
+CSRCS   += $(SRC)/functions/implements/logical/minimum_scalar.c
+CSRCS   += $(SRC)/functions/implements/logical/maximum2.c
+CSRCS   += $(SRC)/functions/implements/logical/minimum2.c
+CSRCS   += $(SRC)/functions/implements/logical/sign.c
+CSRCS   += $(SRC)/functions/implements/array/matrix_diag.c
+CSRCS   += $(SRC)/functions/implements/array/matrix_diag_part.c
+CSRCS   += $(SRC)/functions/implements/array/reshape.c
+CSRCS   += $(SRC)/functions/implements/array/concatenate.c
+CSRCS   += $(SRC)/functions/implements/array/split.c
+CSRCS   += $(SRC)/functions/implements/array/stack.c
+CSRCS   += $(SRC)/functions/implements/array/shift.c
+CSRCS   += $(SRC)/functions/implements/array/slice.c
+CSRCS   += $(SRC)/functions/implements/array/flip.c
+CSRCS   += $(SRC)/functions/implements/array/transpose.c
+CSRCS   += $(SRC)/functions/implements/array/pad.c
+CSRCS   += $(SRC)/functions/implements/neural_network/pooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/max_pooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/sum_pooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/average_pooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/unpooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/deconvolution.c
+CSRCS   += $(SRC)/functions/implements/neural_network/affine/affine.c
+CSRCS   += $(SRC)/functions/implements/neural_network/affine/affine_fixed8.c
+CSRCS   += $(SRC)/functions/implements/neural_network/affine/affine_fixed16.c
+CSRCS   += $(SRC)/functions/implements/neural_network/affine/affine_generic.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_generic.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_float.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_int8.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_int16.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_common.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/binary_connect_convolution.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/binary_weight_convolution.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/depthwise_convolution.c
+CSRCS   += $(SRC)/functions/implements/normalization/batch_normalization.c
+CSRCS   += $(SRC)/functions/implements/normalization/mean_subtraction.c
+CSRCS   += $(SRC)/functions/implements/stochasticity/dropout.c
+CSRCS   += $(SRC)/functions/implements/reduction/sum.c
+CSRCS   += $(SRC)/functions/implements/unimplemented.c
+CSRCS   += $(SRC)/runtime/function_context.c
+CSRCS   += $(SRC)/runtime/runtime.c
+CSRCS   += $(SRC)/runtime/runtime_internal.c
+endif
+
+CFLAGS += -I$(TOPDIR)/include/nnabla/

Review comment:
       don't need

##########
File path: mlearning/libnnablart/nnablart.defs
##########
@@ -0,0 +1,36 @@
+############################################################################
+# apps/mlearning/libnnablart/nnablart.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+
+nnabla.zip:
+	$(Q) curl -L https://github.com/sony/nnabla-c-runtime/archive/refs/tags/v$(CONFIG_NNABLA_RT_VER).zip -o nnabla.zip
+	$(Q) unzip -o nnabla.zip
+	$(Q) mv nnabla-c-runtime-$(CONFIG_NNABLA_RT_VER) nnabla-c-runtime
+
+context:: nnabla.zip
+
+distclean::
+	$(call DELDIR, $(TOPDIR)$(DELIM)include$(DELIM)nnabla$(DELIM))
+	$(call DELDIR, nnabla-c-runtime)
+	$(call DELFILE, nnabla.zip)
+	$(call DELFILE, .nnabla_headers)

Review comment:
       remove

##########
File path: mlearning/libnnablart/Makefile
##########
@@ -0,0 +1,119 @@
+############################################################################
+# apps/mlearning/libnnablart/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+include nnablart.defs
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+SRC = nnabla-c-runtime/src
+
+CSRCS   += $(SRC)/functions/utilities/accessor.c
+CSRCS   += $(SRC)/functions/utilities/fixedpoint.c
+CSRCS   += $(SRC)/functions/utilities/list.c
+CSRCS   += $(SRC)/functions/utilities/shape.c
+CSRCS   += $(SRC)/functions/implements/activation/sigmoid.c
+CSRCS   += $(SRC)/functions/implements/activation/relu.c
+CSRCS   += $(SRC)/functions/implements/activation/tanh.c
+CSRCS   += $(SRC)/functions/implements/activation/softmax.c
+CSRCS   += $(SRC)/functions/implements/activation/selu.c
+CSRCS   += $(SRC)/functions/implements/activation/elu.c
+CSRCS   += $(SRC)/functions/implements/activation/prelu.c
+CSRCS   += $(SRC)/functions/implements/activation/leakyrelu.c
+CSRCS   += $(SRC)/functions/implements/activation/crelu.c
+CSRCS   += $(SRC)/functions/implements/activation/celu.c
+CSRCS   += $(SRC)/functions/implements/activation/swish.c
+CSRCS   += $(SRC)/functions/implements/math/abs.c
+CSRCS   += $(SRC)/functions/implements/math/batch_matmul.c
+CSRCS   += $(SRC)/functions/implements/math/exp.c
+CSRCS   += $(SRC)/functions/implements/math/identity.c
+CSRCS   += $(SRC)/functions/implements/math/log.c
+CSRCS   += $(SRC)/functions/implements/math/round.c
+CSRCS   += $(SRC)/functions/implements/quantization/binary_tanh.c
+CSRCS   += $(SRC)/functions/implements/quantization/binary_sigmoid.c
+CSRCS   += $(SRC)/functions/implements/quantization/binary_connect_affine.c
+CSRCS   += $(SRC)/functions/implements/quantization/binary_weight_affine.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/add_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/arithmetic.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/arithmetic_fixed.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/arithmetic_generic.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/div2.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/mul2.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/mul_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/pow2.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/pow_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/r_div_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/r_pow_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/r_sub_scalar.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/sub2.c
+CSRCS   += $(SRC)/functions/implements/arithmetic/add2.c
+CSRCS   += $(SRC)/functions/implements/logical/maximum_scalar.c
+CSRCS   += $(SRC)/functions/implements/logical/minimum_scalar.c
+CSRCS   += $(SRC)/functions/implements/logical/maximum2.c
+CSRCS   += $(SRC)/functions/implements/logical/minimum2.c
+CSRCS   += $(SRC)/functions/implements/logical/sign.c
+CSRCS   += $(SRC)/functions/implements/array/matrix_diag.c
+CSRCS   += $(SRC)/functions/implements/array/matrix_diag_part.c
+CSRCS   += $(SRC)/functions/implements/array/reshape.c
+CSRCS   += $(SRC)/functions/implements/array/concatenate.c
+CSRCS   += $(SRC)/functions/implements/array/split.c
+CSRCS   += $(SRC)/functions/implements/array/stack.c
+CSRCS   += $(SRC)/functions/implements/array/shift.c
+CSRCS   += $(SRC)/functions/implements/array/slice.c
+CSRCS   += $(SRC)/functions/implements/array/flip.c
+CSRCS   += $(SRC)/functions/implements/array/transpose.c
+CSRCS   += $(SRC)/functions/implements/array/pad.c
+CSRCS   += $(SRC)/functions/implements/neural_network/pooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/max_pooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/sum_pooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/average_pooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/unpooling.c
+CSRCS   += $(SRC)/functions/implements/neural_network/deconvolution.c
+CSRCS   += $(SRC)/functions/implements/neural_network/affine/affine.c
+CSRCS   += $(SRC)/functions/implements/neural_network/affine/affine_fixed8.c
+CSRCS   += $(SRC)/functions/implements/neural_network/affine/affine_fixed16.c
+CSRCS   += $(SRC)/functions/implements/neural_network/affine/affine_generic.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_generic.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_float.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_int8.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_int16.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/convolution_common.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/binary_connect_convolution.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/binary_weight_convolution.c
+CSRCS   += $(SRC)/functions/implements/neural_network/convolution/depthwise_convolution.c
+CSRCS   += $(SRC)/functions/implements/normalization/batch_normalization.c
+CSRCS   += $(SRC)/functions/implements/normalization/mean_subtraction.c
+CSRCS   += $(SRC)/functions/implements/stochasticity/dropout.c
+CSRCS   += $(SRC)/functions/implements/reduction/sum.c
+CSRCS   += $(SRC)/functions/implements/unimplemented.c
+CSRCS   += $(SRC)/runtime/function_context.c
+CSRCS   += $(SRC)/runtime/runtime.c
+CSRCS   += $(SRC)/runtime/runtime_internal.c
+endif
+
+CFLAGS += -I$(TOPDIR)/include/nnabla/
+CFLAGS += -Wno-shadow -Wno-format
+
+BIN = libnnablart$(LIBEXT)
+
+VPATH += libnnablart

Review comment:
       don't need

##########
File path: mlearning/libnnablart/nnablart.defs
##########
@@ -0,0 +1,36 @@
+############################################################################
+# apps/mlearning/libnnablart/nnablart.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifeq ($(CONFIG_NNABLA_RT),y)
+
+nnabla.zip:
+	$(Q) curl -L https://github.com/sony/nnabla-c-runtime/archive/refs/tags/v$(CONFIG_NNABLA_RT_VER).zip -o nnabla.zip
+	$(Q) unzip -o nnabla.zip
+	$(Q) mv nnabla-c-runtime-$(CONFIG_NNABLA_RT_VER) nnabla-c-runtime
+
+context:: nnabla.zip
+
+distclean::
+	$(call DELDIR, $(TOPDIR)$(DELIM)include$(DELIM)nnabla$(DELIM))

Review comment:
       remove

##########
File path: mlearning/libnnablart/nnablart.defs
##########
@@ -0,0 +1,36 @@
+############################################################################
+# apps/mlearning/libnnablart/nnablart.defs

Review comment:
       why not merge nnablart.defs to Makefile?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] pkarashchenko commented on pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#issuecomment-1022123612


   > @xiaoxiang781216 /bin/sh: 1: arm-nuttx-eabi-gcc: not found
   > 
   > is this a knonw CI issue? I cant find issues with the PR
   
   I also observe
   ```
   Untracked files:
     (use "git add <file>..." to include in what will be committed)
   	mlearning/Kconfig
   ```
   @jerpelea is it related?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] jerpelea commented on pull request #983: Add support for NNabla C Runtime

Posted by GitBox <gi...@apache.org>.
jerpelea commented on pull request #983:
URL: https://github.com/apache/incubator-nuttx-apps/pull/983#issuecomment-1022152220


   @pkarashchenko thanks! I added the .gitignore


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org