platform/adaptation/npu/trix-engine.git
5 years ago[Bug] Replace 'npuengine' in some files to 'npu-engine'
Dongju Chae [Tue, 3 Sep 2019 05:42:01 +0000 (14:42 +0900)]
[Bug] Replace 'npuengine' in some files to 'npu-engine'

This commit replaces 'npuengine' in some files to 'npu-engine'.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Bug] bug fix in output callback handling
Dongju Chae [Thu, 29 Aug 2019 11:09:18 +0000 (20:09 +0900)]
[Bug] bug fix in output callback handling

This commit fixes minor bugs in output callback handling.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[API] Revise buffer types defined in libnpuhost.h
Dongju Chae [Thu, 29 Aug 2019 07:45:21 +0000 (16:45 +0900)]
[API] Revise buffer types defined in libnpuhost.h

This commit revises the buffer types defined in libnpuhost.h.

1) BUFFER_CONT/BUFFER_NON_CONT --> BUFFER_MAPPED

`BUFFER_CONT` cannot be used for user-provided buffers to avoid memory copies, because there is no way to find out their physical address.
For the purpose of avoiding memory copy, dma-buf sharing would be enough.
Also, `BUFFER_MAPPED` will indicate that the buffer already has a mapped buffer and users just can access this.

2) BUFFER_FD --> BUFFER_DMABUF

`BUFFER_FD` is somewhat ambiguous and confused with `BUFFER_FILE`.
So it's changed to `BUFFER_DMABUF`.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[NPUdrvAPI/test] Bug fix for npu open name
Parichay Kapoor [Thu, 22 Aug 2019 12:29:27 +0000 (21:29 +0900)]
[NPUdrvAPI/test] Bug fix for npu open name

Added bug fix for opening npu device name
Added check for npu test cases based on testmode or not
This fix makes npu dev_open_close work with npu fast model simulator

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Core/Utils] Make logging utility functions be thread-safe
Wook Song [Fri, 23 Aug 2019 10:18:40 +0000 (19:18 +0900)]
[Core/Utils] Make logging utility functions be thread-safe

This patch makes logging utility functions be thread-safe.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Core/Utils] Replace malloc() for logging
Wook Song [Fri, 23 Aug 2019 08:23:41 +0000 (17:23 +0900)]
[Core/Utils] Replace malloc() for logging

This patch replaces a malloc function for logging with char array.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests/IP] Add test cases for registerNPUmodel() with default conf
Wook Song [Fri, 23 Aug 2019 07:28:25 +0000 (16:28 +0900)]
[Tests/IP] Add test cases for registerNPUmodel() with default conf

This patch adds unit test cases for the functions related to
getNPUdevice() and registerNPUmodel() when the default conf is used.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Core/IP] bugfix: Make sure to return negative value for the error case
Wook Song [Fri, 23 Aug 2019 03:46:35 +0000 (12:46 +0900)]
[Core/IP] bugfix: Make sure to return negative value for the error case

In the 'registerNPUmodel' function, there is a case that returns 0
(which means NO ERROR) even if the 'registerNPUmodelmem' function is
failed. This patch fixes this bug.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Core/IP] Refactor the registerNPUmodelmem function
Wook Song [Tue, 20 Aug 2019 04:30:35 +0000 (13:30 +0900)]
[Core/IP] Refactor the registerNPUmodelmem function

This patch refactors the registerNPUmodelmem function including addition
of missing free().

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Tests] Separate utilities for creation of dummy model and buffer
Wook Song [Wed, 21 Aug 2019 06:46:31 +0000 (15:46 +0900)]
[Tests] Separate utilities for creation of dummy model and buffer

In order to make unit tests for several modules such as plugin-comm-ip
or app tests, it is required to create dummy models to be provided.
Fortunately, those procedure is already included in the
'dummy_inference' app test. Therefore, this patch separates those utility
functions for creation of dummy model and generic buffer from the
'dummy_inference' apptest. According to this change, dummy_inference
is also modified to use those separated functions.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Core/IP] bugfix: Add a missing parameter to loginfo
Wook Song [Thu, 22 Aug 2019 02:18:04 +0000 (11:18 +0900)]
[Core/IP] bugfix: Add a missing parameter to loginfo

This patch fixes a bug which is that a required parameter is omitted
from loginfo in runNPU_sync().

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[test/handler] Adding unittest for handler
Parichay Kapoor [Fri, 16 Aug 2019 05:21:34 +0000 (14:21 +0900)]
[test/handler] Adding unittest for handler

Adding unittest for handler and corresponding fixes

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[GEM] Change the base path of GEM driver
Dongju Chae [Wed, 21 Aug 2019 09:35:53 +0000 (18:35 +0900)]
[GEM] Change the base path of GEM driver

This commit changes the base path of GEM driver
: /dev/dri/cardXX --> /dev/cardXX

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[AppTest] Add an example AppTest to test async output callbacks
Dongju Chae [Wed, 21 Aug 2019 09:43:40 +0000 (18:43 +0900)]
[AppTest] Add an example AppTest to test async output callbacks

This commit adds an AppTest to test async output callbacks.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[ip] Added bug fixes for IP
Parichay Kapoor [Tue, 20 Aug 2019 06:11:53 +0000 (15:11 +0900)]
[ip] Added bug fixes for IP

Added bug fixes for IP for the apptest to pass

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[test/inf] Adding unittest for ne-inf
Parichay Kapoor [Tue, 13 Aug 2019 03:44:13 +0000 (12:44 +0900)]
[test/inf] Adding unittest for ne-inf

Adding unittest for ne-inf and corresponding bug fixes
Merged functionality of switch_buffers into get_next_buffer

Code coverage -
ne-inf 4.0 -> 84.8
ne-host-input-service 6.6 -> 70.0

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[NE] Add order in constructor and destructor
Parichay Kapoor [Tue, 13 Aug 2019 03:32:55 +0000 (12:32 +0900)]
[NE] Add order in constructor and destructor

Add order in the calling of constructor and destructor
The order is -
IP->handler->mem,scheduler->n4
inputservices->NPUdrvAPI->conf

The order of IP and inputservices (ip->inputservices) is currently
maintained using priority of constructor and destructor

The order of constructor and destructor is important as the
constructor/destructor of the modules are dependent on each other
and without the order being set, the behavior is randomized

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Packaging] Append apptest packaging and analyze its test coverage
Dongju Chae [Wed, 14 Aug 2019 07:34:38 +0000 (16:34 +0900)]
[Packaging] Append apptest packaging and analyze its test coverage

This commit changes .spec file to append scripts for apptest packaging and its test coverage.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[NE] Bug fix on ne-handler.c and plugin-comm-ip.c
Dongju Chae [Wed, 14 Aug 2019 04:22:02 +0000 (13:22 +0900)]
[NE] Bug fix on ne-handler.c and plugin-comm-ip.c

This commit fixes minor bugs detected during AppTest execution.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[AppTest] Add example AppTest: dummy inference
Dongju Chae [Wed, 14 Aug 2019 04:21:02 +0000 (13:21 +0900)]
[AppTest] Add example AppTest: dummy inference

This commit adds an example AppTest program, named dummy inference.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[GEM] Increase test coverage in GEM APIs
Dongju Chae [Tue, 13 Aug 2019 07:19:51 +0000 (16:19 +0900)]
[GEM] Increase test coverage in GEM APIs

This commit increases the test coverage in GEM APIs.

Test coverage: 34% --> 75.5%.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N71] Add extra test cases to increase coverage and fix some bugs
Dongju Chae [Fri, 9 Aug 2019 07:26:07 +0000 (16:26 +0900)]
[N71] Add extra test cases to increase coverage and fix some bugs

This commit adds extra test cases in N71.
And, it fixes the bug for resizing hwmem.

Test coverage is increated from 79.7% to 85.7%.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[NE] Remove submodels heirarchy
Parichay Kapoor [Thu, 8 Aug 2019 08:00:28 +0000 (17:00 +0900)]
[NE] Remove submodels heirarchy

Remove the submodel heirarchy (#119)
Updated the related sections to handle model instead of submodel

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[ip] Add test mode for plugin-comm ip
Parichay Kapoor [Mon, 12 Aug 2019 04:35:21 +0000 (13:35 +0900)]
[ip] Add test mode for plugin-comm ip

Add test mode for plugin-comm ip to enable testing of npu-engine.so
without device

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[mem/N11] Remove double buffering related code
Parichay Kapoor [Thu, 8 Aug 2019 04:49:34 +0000 (13:49 +0900)]
[mem/N11] Remove double buffering related code

Remove double buffering related code as it is not possible
Its not possible for user to allocate memory to be reused in npu-engine.
1. If user allocates just memory for input, then there isnt enough space
for output to be accomodated in it based on output offset from compiled
binary.
2. If user wants to allocates memory big enough for input as well as output
, then user will need access to npubinary with proper interfacing.
So, for now, independent of the format the user provides data in, there
will be a buffer allocated in ne-mem and the input will be copied.

In future, add API where user can request for an input buffer, where it
can directly load the data.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Utils] Increase test coverage in ne-conf/utils.c
Dongju Chae [Fri, 9 Aug 2019 07:15:55 +0000 (16:15 +0900)]
[Utils] Increase test coverage in ne-conf/utils.c

This commit adds test cases to increase test coverage for ne-conf/utils.c

- ne-conf.c: 51.6% --> 94%
- ne-utils.c: 85.9% --> 92.3%

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Build/Dir] Reconstruct core source directory
Dongju Chae [Fri, 9 Aug 2019 07:00:19 +0000 (16:00 +0900)]
[Build/Dir] Reconstruct core source directory

This commit reconstructs core source directory.

The below is the summary of what's changed.

1. reconstruct src directory (issue #153), like
+-- src/
|   +-- host/
|   +-- core/
|       +-- ne-*.c/ne-*.h
|       +-- ip/
|       +-- gem/
|       +-- npu/
|   +-- test/
|       +-- unittests/
|       +-- apptests/
2. change meson.build scripts to keep the same style.
3. change source file names to have the same prefix.

It resolves #153.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[GEM] Add test_mode in gem driver API.
Dongju Chae [Thu, 8 Aug 2019 06:01:01 +0000 (15:01 +0900)]
[GEM] Add test_mode in gem driver API.

This commit adds the test mode in gem driver API.
It means that memory allocator can keep the same code semantics regardless the test mode.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[README] Change README.md to add some related links
Dongju Chae [Thu, 8 Aug 2019 05:05:44 +0000 (14:05 +0900)]
[README] Change README.md to add some related links

This commit adds some related links to README.md.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[mem-test] Added unittest for ne-mem for npu async modes
Parichay Kapoor [Thu, 8 Aug 2019 01:35:38 +0000 (10:35 +0900)]
[mem-test] Added unittest for ne-mem for npu async modes

Added unittest for ne-mem for npu async modes and corresponding fixes
Minor bug fixes for unittest of ne-mem

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[N11] Update permission and buffer sequence
Parichay Kapoor [Tue, 6 Aug 2019 12:17:50 +0000 (21:17 +0900)]
[N11] Update permission and buffer sequence

Log skipping of output buffers
Check all buffers/processing is complete before changing modes
Using memory given by user directly has been removed, and added memcpy for all cases
Minor bug fixes

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[N11] Setup sequence number
Parichay Kapoor [Tue, 6 Aug 2019 04:31:55 +0000 (13:31 +0900)]
[N11] Setup sequence number

Setup sequence number for each input and buffer

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[async mode] Handle N11 async mode with buffering
Parichay Kapoor [Mon, 5 Aug 2019 10:19:22 +0000 (19:19 +0900)]
[async mode] Handle N11 async mode with buffering

Add handling of async mode for input with buffering
Add cb check for NULL in runNPU_async

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[N11] Implement generic buffer for input and output
Parichay Kapoor [Fri, 2 Aug 2019 06:09:12 +0000 (15:09 +0900)]
[N11] Implement generic buffer for input and output

Implement generic buffer for input output and models

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[N11] Implement generic buffer for input and output
Parichay Kapoor [Fri, 2 Aug 2019 06:09:12 +0000 (15:09 +0900)]
[N11] Implement generic buffer for input and output

Implement generic buffer for input output and models

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[NPUdrvAPI] Using conf test_mode for testing NPUdrvAPI
Parichay Kapoor [Tue, 6 Aug 2019 04:11:43 +0000 (13:11 +0900)]
[NPUdrvAPI] Using conf test_mode for testing NPUdrvAPI

Using test_mode from conf for testing NPUdrvAPI
Restructuring - add libutils with conf and util files
This allows sharing conf+util files easily with libnpu and libgem

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[N11] Update interface to support for different kinds of buffers
Parichay Kapoor [Thu, 1 Aug 2019 07:55:54 +0000 (16:55 +0900)]
[N11] Update interface to support for different kinds of buffers

Updated interface to support different kinds of buffers

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Conf] Fix the bug in parsing 'main.test_mode'
Dongju Chae [Mon, 5 Aug 2019 09:27:02 +0000 (18:27 +0900)]
[Conf] Fix the bug in parsing 'main.test_mode'

This commit fixes the parsing bug because 'main.test_mode' can be a string like 'False'.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[BUILD] remove debug packages of npu-engine
Dongju Chae [Fri, 2 Aug 2019 08:09:33 +0000 (17:09 +0900)]
[BUILD] remove debug packages of npu-engine

This commit removes debug packages.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Packaging] Add example package including UnitTests and AppTests
Dongju Chae [Thu, 1 Aug 2019 11:41:39 +0000 (20:41 +0900)]
[Packaging] Add example package including UnitTests and AppTests

This commit append the packaging script for npu-engine-example.
It will include unit tests and app tests (TBD).

This package will be uploaded and executed in ARM FastModel emulator.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[TAOS-CI/Test] Fix test coverage bug in TAOS-CI system
Dongju Chae [Thu, 1 Aug 2019 06:28:16 +0000 (15:28 +0900)]
[TAOS-CI/Test] Fix test coverage bug in TAOS-CI system

This commit fixes the bug to analyze test coverage in CI system.
This bug results from that gcov/lcov couldn't find a right relative path (e.g., ../)

It resolves issue #141.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N11] Added N11 prototype implementation
Parichay Kapoor [Wed, 31 Jul 2019 05:08:02 +0000 (14:08 +0900)]
[N11] Added N11 prototype implementation

Added N11 prototype implementation
Updated interface of ne-handler to return id/version on register
Added minor bug fixes

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Build] Fix type errors to support ARM32 build
Dongju Chae [Wed, 31 Jul 2019 11:01:54 +0000 (20:01 +0900)]
[Build] Fix type errors to support ARM32 build

This commit fixes type castring to support ARM32 build

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Test/Bug] Apply valgrind bug report in NPU API test
Dongju Chae [Wed, 31 Jul 2019 06:05:42 +0000 (15:05 +0900)]
[Test/Bug] Apply valgrind bug report in NPU API test

This commit fixes a bug in NPU API test, reported by valgrind.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[BUILD] Fix typo in rpm spec file
Dongju Chae [Wed, 31 Jul 2019 05:33:17 +0000 (14:33 +0900)]
[BUILD] Fix typo in rpm spec file

This commit fixes typo in rpm spec file (e.g., core->src)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[BUILD] Add use_valgrind option in rpm spec file
Dongju Chae [Wed, 31 Jul 2019 05:30:17 +0000 (14:30 +0900)]
[BUILD] Add use_valgrind option in rpm spec file

Add option to enable valgrind

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Services] Updated N4x services based on update on interface
Parichay Kapoor [Mon, 29 Jul 2019 05:04:13 +0000 (14:04 +0900)]
[Services] Updated N4x services based on update on interface

Updated host input service (NPU) and ARM plugin based on update on interface

Refer #105

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[UnitTest] Enable valgrind for unit tests in x86_64
Dongju Chae [Wed, 31 Jul 2019 05:05:49 +0000 (14:05 +0900)]
[UnitTest] Enable valgrind for unit tests in x86_64

This commit enables valgrind for unit tests (x86_64 only)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[BUILD] Revise directories for libnpu-engine
Dongju Chae [Wed, 31 Jul 2019 04:48:51 +0000 (13:48 +0900)]
[BUILD] Revise directories for libnpu-engine

This commit revises the whole directory such as
- merge each src folders into /src/
- merge common/host include files into /include/
- change packaging script to build libnpu-engine

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Dist/Tizen] Change build depenedency on kernel headers
Wook Song [Wed, 31 Jul 2019 03:36:44 +0000 (12:36 +0900)]
[Dist/Tizen] Change build depenedency on kernel headers

In order to enable build of npu-engine for x86 and armv7l architectures,
this patch changes build dependency on linux-fvp-headers to that on
linux-npu-headers.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[UnitTest] Add the python script to analyze unittest coverage.
Dongju Chae [Mon, 29 Jul 2019 10:07:08 +0000 (19:07 +0900)]
[UnitTest] Add the python script to analyze unittest coverage.

This commit adds the python script to analyze unittest coverage.
Note that it's copied from the nnstreamer repository.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N71] If a GEM driver is unavailable, fall back to test mode
Dongju Chae [Tue, 30 Jul 2019 03:58:38 +0000 (12:58 +0900)]
[N71] If a GEM driver is unavailable, fall back to test mode

This commit adds fallback mode for testing (checked using .ini option).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Dist/Tizen] Fix gbs build errors when unit tests are enabled
Wook Song [Tue, 30 Jul 2019 03:59:27 +0000 (12:59 +0900)]
[Dist/Tizen] Fix gbs build errors when unit tests are enabled

This patch fixes errors during gbs-build when unit tests are enabled.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Valgrid] Fix memory leak in ne-conf.c and ne-mem.c
Dongju Chae [Mon, 29 Jul 2019 10:01:33 +0000 (19:01 +0900)]
[Valgrid] Fix memory leak in ne-conf.c and ne-mem.c

This commit fixes memory leak in `ne-conf.c` and `ne-mem.c`.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N1] change API args to use model id/version instead of model itself
Dongju Chae [Mon, 29 Jul 2019 10:38:25 +0000 (19:38 +0900)]
[N1] change API args to use model id/version instead of model itself

This commit changes function arguments to use model id/param.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[TAOS-CI] Add test coverage package for TAOS-CI
Dongju Chae [Mon, 29 Jul 2019 10:10:40 +0000 (19:10 +0900)]
[TAOS-CI] Add test coverage package for TAOS-CI

This commit appends scripts for test coverage package to the spec file.
The package is used in TAOS-CI to show the analysis result for test coverage.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Conf] Load default configurations in constructor
Dongju Chae [Mon, 29 Jul 2019 10:18:34 +0000 (19:18 +0900)]
[Conf] Load default configurations in constructor

This commit updates to load default configurations in constructor.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N4C] Added implementations for configure and dataready
Parichay Kapoor [Fri, 12 Jul 2019 00:46:19 +0000 (09:46 +0900)]
[N4C] Added implementations for configure and dataready

Added implementations for configure and dataready
Updated changes in npu-host-service for successful build

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Meson] Enable tests for core libraries
Wook Song [Tue, 30 Jul 2019 02:29:40 +0000 (11:29 +0900)]
[Meson] Enable tests for core libraries

This patch enables tests for core libraries.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Meson] Clean-up meson build scripts
Wook Song [Tue, 30 Jul 2019 02:18:26 +0000 (11:18 +0900)]
[Meson] Clean-up meson build scripts

This patch revises meson build scripts in the whole project.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[NPUdrvAPI/test] Added unit tests for NPU driver api
Parichay Kapoor [Wed, 24 Jul 2019 11:32:37 +0000 (20:32 +0900)]
[NPUdrvAPI/test] Added unit tests for NPU driver api

Added unit test cases for NPU driver api
This only tests the internal working of the api
Syscalls/Interaction with device is ignored in this testing
This test suite should pass with/without device driver/device available
Fixed Doxygen entries

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Meson] Apply work-around in order to fix gbs-build errors
Wook Song [Mon, 29 Jul 2019 08:10:38 +0000 (17:10 +0900)]
[Meson] Apply work-around in order to fix gbs-build errors

This patch applies several work-around solutions in order to fix
gbs-build errors. Note that this is not permanent solutions. After CI
system is enabled, we need to take look into whole build scripts.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Dist/Tizen] Modify the rpm sepc file according to meson revision
Wook Song [Mon, 29 Jul 2019 08:09:06 +0000 (17:09 +0900)]
[Dist/Tizen] Modify the rpm sepc file according to meson revision

Since the meson build scripts are revised, it is required to revise the
rpm spec file as well.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Engine/Scheduler] Replace 'n4_opmode' with 'submodel_opmode'
Wook Song [Mon, 29 Jul 2019 08:07:27 +0000 (17:07 +0900)]
[Engine/Scheduler] Replace 'n4_opmode' with 'submodel_opmode'

There is no 'n4_opmode' anymore. This patch replaces 'n4_opmode' with
'submodel_opmode' to fix build errors.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Engine/HostInputService] Define a dummy for 'N4_OPS_HOST_INPUT'
Wook Song [Mon, 29 Jul 2019 07:44:31 +0000 (16:44 +0900)]
[Engine/HostInputService] Define a dummy for 'N4_OPS_HOST_INPUT'

Since 'N4_OPS_HOST_INPUT' is omitted from the current source tree, this
patch just defines a dummy for 'N4_OPS_HOST_INPUT' as a work-around.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Engine/InputService] Fix build error due to incompatible-pointer-types
Wook Song [Mon, 29 Jul 2019 07:38:04 +0000 (16:38 +0900)]
[Engine/InputService] Fix build error due to incompatible-pointer-types

This patch fixes build errors in the header file for 'inputservice'
due to incompatible-pointer-types.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years agoEngine/HostInputService] Block lines refering to non-existent member
Wook Song [Mon, 29 Jul 2019 07:29:08 +0000 (16:29 +0900)]
Engine/HostInputService] Block lines refering to non-existent member

In order to fix build errors, this patch blocks lines that refer to
non-existent member of a struct. Note that this ia a work-around. We
need to fix it.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Core/HostInputService] Fix build error, 'maybe-uninitialized'
Wook Song [Mon, 29 Jul 2019 06:48:11 +0000 (15:48 +0900)]
[Core/HostInputService] Fix build error, 'maybe-uninitialized'

This patch fixes a build error caused by a local variable used without
initialization.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Core/HostInputService] Include 'srnpu.h' from 'misc'
Wook Song [Mon, 29 Jul 2019 06:46:13 +0000 (15:46 +0900)]
[Core/HostInputService] Include 'srnpu.h' from 'misc'

This patch changes the location of 'srnpu.h' from 'linux' to 'misc'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Core] Include srnpu.h from 'misc'
Wook Song [Mon, 29 Jul 2019 06:40:33 +0000 (15:40 +0900)]
[Core] Include srnpu.h from 'misc'

This patch changes the location of 'srnpu.h' from 'linux' to 'misc'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Engine/ArmPlugin] Fix build error due to incompatible-pointer-types
Wook Song [Mon, 29 Jul 2019 06:36:38 +0000 (15:36 +0900)]
[Engine/ArmPlugin] Fix build error due to incompatible-pointer-types

This patch fixes a build error due to initialization from incompatible
pointer types between the arm_plugin_configure function and the function
pointer, configure, in the inputservice structure.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[Engine/Handler] Fix undefined reference to un-implemented functions
Wook Song [Mon, 29 Jul 2019 06:30:06 +0000 (15:30 +0900)]
[Engine/Handler] Fix undefined reference to un-implemented functions

This patch fixes build errors due to undefined reference to
un-implemented functions, exitNEcomm and initNEcomm.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[DIST/Tizen] Add build dependency on linux-fvp
Wook Song [Fri, 26 Jul 2019 08:03:21 +0000 (17:03 +0900)]
[DIST/Tizen] Add build dependency on linux-fvp

This patch fixes errors occurring since a necessary kernel header is not
provided.

Signed-off-by: Wook Song <wook16.song@samsung.com>
5 years ago[N12] The prototype of FastModel comm plugin
Dongju Chae [Tue, 23 Jul 2019 04:33:55 +0000 (13:33 +0900)]
[N12] The prototype of FastModel comm plugin

This commit adds the prototype of fastmodel comm plugin using TCP/IP.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Build] revise meson files to make a single project
Parichay Kapoor [Fri, 26 Jul 2019 06:04:16 +0000 (15:04 +0900)]
[Build] revise meson files to make a single project

merge core and host into a single project
npu-engine final .so with interface of libnpuhost.h in ip comm mode only
libnpuhost.h and npu-engine interface to be done by N11 (plugin-ip-comm.c)
npu-engine exe build only in fast model mode
include common dir for header properly

Working on issue #114

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[ne] Create submodel for input service
Parichay Kapoor [Fri, 19 Jul 2019 08:23:39 +0000 (17:23 +0900)]
[ne] Create submodel for input service

Create dummy submodel for input computation service corresponding to the input opmode
Add enum in typedef corresponding to the type of submodel in its meta
n4_opmode replaces with submodel_ops
updated the order of the submodels in the model

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[NE-scheduler] Interface between N3 and N4
Parichay Kapoor [Fri, 19 Jul 2019 10:53:26 +0000 (19:53 +0900)]
[NE-scheduler] Interface between N3 and N4

N3's interface takes in the input_mode op along with list of submodels or a model
However, N4C interface takes in the n4_opmode which points to the device to be run
This patch links the two interface in N3 implementation

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[NE] Add .gitignore
Dongju Chae [Fri, 26 Jul 2019 08:27:04 +0000 (17:27 +0900)]
[NE] Add .gitignore

This commit adds .gitignore

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N44] N44 is now deprecated
Dongju Chae [Thu, 25 Jul 2019 07:15:25 +0000 (16:15 +0900)]
[N44] N44 is now deprecated

N44 is now deprecated.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[ne-inputservice] Update the interface for configure
Parichay Kapoor [Wed, 17 Jul 2019 10:55:30 +0000 (19:55 +0900)]
[ne-inputservice] Update the interface for configure

Updated the interface for configure
Replaced n40_data data in configure with cb_data
Further the data will not be present in n4_configure #93
Removed cb/cb_data from n40_data

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Build] Add a meson option to select a comm plugin.
Dongju Chae [Mon, 22 Jul 2019 06:26:06 +0000 (15:26 +0900)]
[Build] Add a meson option to select a comm plugin.

This commit adds a meson option to select a comm plugin

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Build] Build NE as an executable instead of library.
Dongju Chae [Mon, 22 Jul 2019 06:24:41 +0000 (15:24 +0900)]
[Build] Build NE as an executable instead of library.

This commit changes meson.build to build NE as an executable.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[UnitTest] Append auto unittests to npu-engine.spec
Dongju Chae [Fri, 19 Jul 2019 08:31:14 +0000 (17:31 +0900)]
[UnitTest] Append auto unittests to npu-engine.spec

This PR appends auto unittests to npu-engine.spec
(and missing dependency for gtest)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N4C] Make only N4C call .getNextBuffer() in N7
Dongju Chae [Fri, 19 Jul 2019 02:17:13 +0000 (11:17 +0900)]
[N4C] Make only N4C call .getNextBuffer() in N7

This commit adds getNextBuffer wrappers in N2 and N3, and append prefixes.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N42] Implementation for setting up device and callbacks
Parichay Kapoor [Thu, 11 Jul 2019 05:56:57 +0000 (14:56 +0900)]
[N42] Implementation for setting up device and callbacks

Added implementation to interface with the device
Added callbacks
Added minor bug fixes

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[Build/Fix] Fix minor compile errors (with gbs)
Dongju Chae [Fri, 19 Jul 2019 08:23:56 +0000 (17:23 +0900)]
[Build/Fix] Fix minor compile errors (with gbs)

This updates minor compiler errors

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N42] Added function implementations
Parichay Kapoor [Mon, 8 Jul 2019 11:39:00 +0000 (20:39 +0900)]
[N42] Added function implementations

Added implementation for empty functions

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
5 years ago[NE] Remove 'first_buffer' in configure functions.
Dongju Chae [Wed, 17 Jul 2019 10:08:10 +0000 (19:08 +0900)]
[NE] Remove 'first_buffer' in configure functions.

This commit removes buffer arguments in configure functions.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N4C] Make N4C's register/unregister() use its own mutex
Dongju Chae [Wed, 17 Jul 2019 06:42:13 +0000 (15:42 +0900)]
[N4C] Make N4C's register/unregister() use its own mutex

This commit changes N4C to use its own mutex in register/unregister()

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N3] Add N3's wrapper of output callback
Dongju Chae [Wed, 17 Jul 2019 09:40:52 +0000 (18:40 +0900)]
[N3] Add N3's wrapper of output callback

This commit adds the output callback wrapper for N3.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N44] Add prototype impl. of N44
Dongju Chae [Thu, 4 Jul 2019 08:20:19 +0000 (17:20 +0900)]
[N44] Add prototype impl. of N44

This commit includes the basic implementation for N44.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N40] Fix compiler error in ne-inputservice.h
Dongju Chae [Thu, 4 Jul 2019 08:19:24 +0000 (17:19 +0900)]
[N40] Fix compiler error in ne-inputservice.h

This commit re-arranges the order of structure definitions to fix compile errors.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N71] Split the compaction algorithm into two-step one
Dongju Chae [Wed, 17 Jul 2019 08:10:20 +0000 (17:10 +0900)]
[N71] Split the compaction algorithm into two-step one

This commit splits the compaction algorithm into two-step one.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Main] Make main() call N2's init/exit functions.
Dongju Chae [Tue, 16 Jul 2019 11:34:24 +0000 (20:34 +0900)]
[Main] Make main() call N2's init/exit functions.

This commit changes main() to call N2's init/exit functions.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Main] Fix bugs in argument parsing
Dongju Chae [Tue, 16 Jul 2019 11:32:33 +0000 (20:32 +0900)]
[Main] Fix bugs in argument parsing

This commit fixs the argument parsing bug. It didn't check whether `argc` is larger than 1.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Conf] Implement configuration parsing
Dongju Chae [Tue, 16 Jul 2019 12:27:50 +0000 (21:27 +0900)]
[Conf] Implement configuration parsing

This commit implements configuration parsing in `ne-conf.c`

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Build] Revise meson.build for each module
Dongju Chae [Tue, 16 Jul 2019 09:37:46 +0000 (18:37 +0900)]
[Build] Revise meson.build for each module

This commit changes each meson.build file to use the same prefix and remove unncessary dependencies.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Build] Append sources for implemented modules to the build script
Dongju Chae [Mon, 15 Jul 2019 04:26:15 +0000 (13:26 +0900)]
[Build] Append sources for implemented modules to the build script

This commit appends implemented components to `npu_engine_common_sources`
- 'ne-armplugin.c'
- 'ne-handler.c'
- 'ne-scheduler.c'

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[Build] Add missing dependencies for NPU Engine
Dongju Chae [Mon, 15 Jul 2019 04:24:28 +0000 (13:24 +0900)]
[Build] Add missing dependencies for NPU Engine

This commit adds missing dependencies such as iniparser and libm

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
5 years ago[N71/Errno] Remove ne-error.h and use the log utility in ne-utils.h
Dongju Chae [Fri, 12 Jul 2019 06:02:16 +0000 (15:02 +0900)]
[N71/Errno] Remove ne-error.h and use the log utility in ne-utils.h

This commit changes codes to use the log utility in ne-utils.h

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>