platform/adaptation/npu/trix-engine.git
3 years ago[Emul/2TOPS] Use environment variable to set the command file
Dongju Chae [Thu, 12 Nov 2020 06:52:59 +0000 (15:52 +0900)]
[Emul/2TOPS] Use environment variable to set the command file

This patch uses environment variable to set the command file
for libmrpsim. The 2-TOPS emulation uses different arch spec.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Release] npu-engine 2.2.5 release
Dongju Chae [Wed, 4 Nov 2020 05:50:24 +0000 (14:50 +0900)]
[Release] npu-engine 2.2.5 release

This patch makes npu-engine 2.2.5 release.
Please refer to ./CHANGES for details.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Model/Tops] Check the TOPS which TRIV2 device supports
Dongju Chae [Mon, 9 Nov 2020 09:08:46 +0000 (18:08 +0900)]
[Model/Tops] Check the TOPS which TRIV2 device supports

This patch adds the routine to check the TOPS device supports.
It compares the device's TOPS and model-described TOPS.
For backward-compatability, if TOPS is zero, it's regarded as "don't care"

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[npubinfmt] Add the size of dsp memory to npubinfmt
Dongju Chae [Tue, 10 Nov 2020 07:22:03 +0000 (16:22 +0900)]
[npubinfmt] Add the size of dsp memory to npubinfmt

This patch adds the size of dsp memory to npubinfmt.h as extra
variable for DSP.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[npubinfmt] add macro to get 'TOPS' from npu_version
Dongju Chae [Wed, 4 Nov 2020 09:45:09 +0000 (18:45 +0900)]
[npubinfmt] add macro to get 'TOPS' from npu_version

This patch adds macro to get 'TOPS' from npu_version field
in npubinfmt.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[UnitTest] Add LD_LIBRARY_PATH to test envionment
Dongju Chae [Tue, 3 Nov 2020 09:51:15 +0000 (18:51 +0900)]
[UnitTest] Add LD_LIBRARY_PATH to test envionment

This patch adds LD_LIBRARY_PATH to test envionment.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Emul] Revise NPU emulation to use libmrpsim.so
Dongju Chae [Fri, 30 Oct 2020 02:08:43 +0000 (11:08 +0900)]
[Emul] Revise NPU emulation to use libmrpsim.so

From now on, we don't use libnpu-engine-emul.so. Instead,
libmrpsim.so will do such work, and support profiling as well.
Also, the emulation on Tizen env. is now disabled.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/Coverage] Fix the coverage script
Dongju Chae [Tue, 3 Nov 2020 03:14:14 +0000 (12:14 +0900)]
[Fix/Coverage] Fix the coverage script

This patch fixes the coverage script to generate gtest .xml output
files.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Debian/Coverage] Generage coverage report on debian
Dongju Chae [Mon, 2 Nov 2020 03:20:24 +0000 (12:20 +0900)]
[Debian/Coverage] Generage coverage report on debian

This patch enables coverage report generation on debian env.
Because libmrpsim.so does not support Tizen, the way to generate
line coverage also needs to be changed.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/AppTest] Increase the timeout for triv2 bulk apptest
Dongju Chae [Mon, 2 Nov 2020 07:10:51 +0000 (16:10 +0900)]
[Fix/AppTest] Increase the timeout for triv2 bulk apptest

This patch increases the timeout for triv2 bulk apptest,
from 100ms to 5000ms. It was too tight to execute FSRCNN
on FastModel envionment.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Test/Util] Revise some apptests to use common test utility
Dongju Chae [Mon, 26 Oct 2020 11:06:50 +0000 (20:06 +0900)]
[Test/Util] Revise some apptests to use common test utility

This patch revises some apptests to use common test utility.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[DataConvert] Add missing warning messages on data converter
Dongju Chae [Mon, 26 Oct 2020 06:41:11 +0000 (15:41 +0900)]
[DataConvert] Add missing warning messages on data converter

This patch adds missing warning messages on data converter.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Release] npu-engine 2.2.4 release
Dongju Chae [Wed, 21 Oct 2020 09:46:18 +0000 (18:46 +0900)]
[Release] npu-engine 2.2.4 release

This patch makes npu-engine 2.2.4 release

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[FIX] Fix input/output data size calculation
Dongju Chae [Wed, 21 Oct 2020 09:44:05 +0000 (18:44 +0900)]
[FIX] Fix input/output data size calculation

This patch fixes input/output data size calculation.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Release] npu-engine 2.2.3 release
Dongju Chae [Wed, 23 Sep 2020 06:28:22 +0000 (15:28 +0900)]
[Release] npu-engine 2.2.3 release

This patch makes npu-engine 2.2.3 release.
Please check its details at ./CHANGES.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Profile] Implement the prototype of profiling APIs
Dongju Chae [Mon, 21 Sep 2020 05:51:52 +0000 (14:51 +0900)]
[Profile] Implement the prototype of profiling APIs

This patch implements the prototype of profiling APIs.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/Coverity] Resolve the reported coverity issues
Dongju Chae [Wed, 23 Sep 2020 06:53:46 +0000 (15:53 +0900)]
[Fix/Coverity] Resolve the reported coverity issues

This patch resolves the coverity issues reported by AnalysisHub,
which includes
- Uninitialized variables
- Resource leaks
- Race conditions

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Bug/Unregister] Fix the bug related to unregisterModels()
Dongju Chae [Wed, 23 Sep 2020 06:13:47 +0000 (15:13 +0900)]
[Bug/Unregister] Fix the bug related to unregisterModels()

This patch fixes the bug related to unregisterModels ().
The original codes just clear a model vector structure,
which was supposed to call unsetModel() per each model.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[AppTests] Skip the test when the given model is not compatible
Wook Song [Thu, 17 Sep 2020 12:04:45 +0000 (21:04 +0900)]
[AppTests] Skip the test when the given model is not compatible

When the given model is not compatible with the test case, this patch
makes the test skip that model with a proper message instead of
regarding it as a failed case.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[libnpuhost/profile] Add new APIs for NPU profiling
Dongju Chae [Tue, 15 Sep 2020 07:10:45 +0000 (16:10 +0900)]
[libnpuhost/profile] Add new APIs for NPU profiling

This patch adds new APIs for NPU profiling, but
they are not yet implemented.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[AppTests] Do not install the dummy apptests in normal release
Wook Song [Thu, 17 Sep 2020 05:00:35 +0000 (14:00 +0900)]
[AppTests] Do not install the dummy apptests in normal release

Since the dummy apptests are only for the line coverage calculation,
this patch tunrns off the installation of those apptests in the normal
release.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[AppTests/BulkGem] Fix a bug in destroying a DRM handle
Wook Song [Thu, 17 Sep 2020 03:21:10 +0000 (12:21 +0900)]
[AppTests/BulkGem] Fix a bug in destroying a DRM handle

This is a trivial patch that fixes a bug in destroying a DRM handle. It
returns 0 when it succeeds in destroying the given DRM handle.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[UnitTest/Bug] Add deregisterModel() after runInput()
Dongju Chae [Fri, 11 Sep 2020 08:14:35 +0000 (17:14 +0900)]
[UnitTest/Bug] Add deregisterModel() after runInput()

This patch adds deregisterModel() after runInput().
When we run this unittest twice, the kernel panic occurs.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[UnitTest] Reduce the sleep time for npu unittest
Dongju Chae [Fri, 11 Sep 2020 07:08:14 +0000 (16:08 +0900)]
[UnitTest] Reduce the sleep time for npu unittest

This patch reduces the sleep time for npu unittest.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/AppTest] Deprecated enum in libtinyxml2-dev
Dongju Chae [Wed, 9 Sep 2020 05:15:43 +0000 (14:15 +0900)]
[Fix/AppTest] Deprecated enum in libtinyxml2-dev

This patch removes the build error in Ubuntu 18.04 (SPIN),
due to the deprecated enum (XML_NO_ERROR) in libtinyxml2-dev,

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[AppTest] Add apptest to test models with different constraints
Dongju Chae [Mon, 7 Sep 2020 05:56:18 +0000 (14:56 +0900)]
[AppTest] Add apptest to test models with different constraints

This patch adds apptests to test models with different constraints
(e.g., priority), which can be used for multi-tasking.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[UnitTest] Add unit test cases to test functional of api in invalid case
kaka [Tue, 1 Sep 2020 10:55:57 +0000 (17:55 +0700)]
[UnitTest] Add unit test cases to test functional of api in invalid case
and increase coverage

This patch add some test case and expectation
- ne_libnpuhost_test : call getNPUdeviceByType with invalid num_devices
- ne_core_sched_test: add negative test case for set/get apis.
- ne_core_handler_test: call unsetModel in uninitilized test case,
add triv_prepare_dma_input_buffers to test BUFFER_DMABUF type,
add triv_prepare_input_buffers2_n to test with empty buffers,
add handler_generic_buffers_n to test with BUFFER_UNDEFINED type,
add handler_triv_stop_internal_n to check stopInternal with invalid id,
add handler_common_get_npu_device_by_type_n to check getNPUdeviceByType
with invalid type.

Signed-off-by: Truong Van bac <bac.truong@samsung.com>
This patch add some test case, assertion and  expectation
- Increase coverage
- Add need assertion in some object
Signed-off-by: Truong Van bac <bac.truong@samsung.com>
3 years ago[Fix/Utils] Use the standard library to restore format changes
Dongju Chae [Thu, 3 Sep 2020 04:03:51 +0000 (13:03 +0900)]
[Fix/Utils] Use the standard library to restore format changes

This patch uses the standard library (i.e., std::ios_base::fmtflags)
to retore format changes in std::cout. It removes any side-effect.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/Utils] Fix missing format restoration of model inspector
Dongju Chae [Wed, 2 Sep 2020 05:02:13 +0000 (14:02 +0900)]
[Fix/Utils] Fix missing format restoration of model inspector

This patch fixes missing format restoration of model inspector,
reported by coverity.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Release] npu-engine 2.2.2 release
Dongju Chae [Fri, 21 Aug 2020 02:21:18 +0000 (11:21 +0900)]
[Release] npu-engine 2.2.2 release

This patch makes npu-engine 2.2.2 release.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[TRIV2] Add data manipulation support for TRIV2
Dongju Chae [Thu, 20 Aug 2020 06:25:51 +0000 (15:25 +0900)]
[TRIV2] Add data manipulation support for TRIV2

This patch adds data manipulation support for TRIV2,
which converts data layout between NHWC and HW format.

It includes data quantization as well.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[DataManip] Implement data converter class
Dongju Chae [Tue, 25 Aug 2020 10:48:51 +0000 (19:48 +0900)]
[DataManip] Implement data converter class

This patch adds data converter class, which mainly perform
the data format conversion and quantization.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/Utils] Fix typo in model-inspect.cc
Dongju Chae [Fri, 21 Aug 2020 02:50:35 +0000 (11:50 +0900)]
[Fix/Utils] Fix typo in model-inspect.cc

This patch fixes typo in model-inspect.cc

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Bug/Weight] fix bug accessing weight seg idx when the data is empty
Dongju Chae [Thu, 27 Aug 2020 05:01:33 +0000 (14:01 +0900)]
[Bug/Weight] fix bug accessing weight seg idx when the data is empty

This patch fixes the bug accessing weight segment index
even when the weight data is empty.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Utils] Add npu-engine-utils packages
Dongju Chae [Thu, 20 Aug 2020 08:19:53 +0000 (17:19 +0900)]
[Utils] Add npu-engine-utils packages

This patch adds npu-engine-utils packages.
Currently, we support only model-inspect.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[libnpuhost] remove unused APIs
Dongju Chae [Thu, 20 Aug 2020 02:15:04 +0000 (11:15 +0900)]
[libnpuhost] remove unused APIs

This patch removes unused APIs.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[FIX/DMABUF] Fix external segments handling
Dongju Chae [Thu, 20 Aug 2020 02:00:04 +0000 (11:00 +0900)]
[FIX/DMABUF] Fix external segments handling

This patch fixes external segments handling.
It was creating only one external segment.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Release] npu-engine 2.2.1 release and code freeze for release
Dongju Chae [Wed, 19 Aug 2020 05:29:50 +0000 (14:29 +0900)]
[Release] npu-engine 2.2.1 release and code freeze for release

This patch makes npu-engine 2.2.1 release and freezes the codes
for release.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[UnitTest] Remove unnecessary ifdef for emulation
Dongju Chae [Wed, 19 Aug 2020 06:27:39 +0000 (15:27 +0900)]
[UnitTest] Remove unnecessary ifdef for emulation

This patch removes unnecessary ifdef for emulation.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Doc/Test] Add documentation for nnstreamer-private-subplugin
Dongju Chae [Wed, 19 Aug 2020 04:34:34 +0000 (13:34 +0900)]
[Doc/Test] Add documentation for nnstreamer-private-subplugin

This patch adds documentation for nnstreamer-private-subplugin

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/UnitTest] Resolve memory leaks in unittest
Dongju Chae [Wed, 19 Aug 2020 02:49:05 +0000 (11:49 +0900)]
[Fix/UnitTest] Resolve memory leaks in unittest

This patch resolves memory leaks in libnpuhost unittest

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Doc/Fix] Fix 'how_to_test.md' to distinguish host/fastmodel shell
Dongju Chae [Tue, 18 Aug 2020 02:47:06 +0000 (11:47 +0900)]
[Doc/Fix] Fix 'how_to_test.md' to distinguish host/fastmodel shell

This patch fixes 'how_to_test_md' documentation to make it possible
to distinguish host and FastModel's shells.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[FIX] resolve minor svace/coverity issues
Dongju Chae [Tue, 18 Aug 2020 04:17:33 +0000 (13:17 +0900)]
[FIX] resolve minor svace/coverity issues

This patch resolves minor svace/coverity issues such as
- Uninitialized variables in constructor
- Memory leaks in unittests

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Release] npu-engine release 2.2.0
Dongju Chae [Tue, 4 Aug 2020 04:37:07 +0000 (13:37 +0900)]
[Release] npu-engine release 2.2.0

This patch makes new release, 2.2.0, of npu-engine library.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[FIX/FPGA] Add driver-assisted memcpy for workaround solution
Dongju Chae [Fri, 7 Aug 2020 08:05:55 +0000 (17:05 +0900)]
[FIX/FPGA] Add driver-assisted memcpy for workaround solution

This patch adds driver-assisted memcpy for workaround solution.

In the current FPGA env, memcpy() between FPGAs makes bit-flip
for a certain memory regions. This workaround codes can avoid
this issue by driver-assisted codes.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tests/Unit/Handler] Add a negative TC for registerModel()
Wook Song [Thu, 13 Aug 2020 09:12:42 +0000 (18:12 +0900)]
[Tests/Unit/Handler] Add a negative TC for registerModel()

This patch adds a negative TC for registerModel() in HostHandler.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/Unit] Fix no-assertion TCs reported by TCM
Wook Song [Thu, 13 Aug 2020 08:56:01 +0000 (17:56 +0900)]
[Tests/Unit] Fix no-assertion TCs reported by TCM

This patch fixes two no-assertion test cases for utilities reported by
TCM.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Core/Utils] Make logWrite have a return value
Wook Song [Thu, 13 Aug 2020 08:21:14 +0000 (17:21 +0900)]
[Core/Utils] Make logWrite have a return value

This patch makes the logWrite method of Logger class have a return
value.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[UnitTest] Add some negative cases for libnpuhost unittest
Dongju Chae [Thu, 13 Aug 2020 07:03:06 +0000 (16:03 +0900)]
[UnitTest] Add some negative cases for libnpuhost unittest

This patch adds some negative cases for libnpuhost unittest

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[UnitTest] Add new unittest for libnpuhost
Dongju Chae [Thu, 13 Aug 2020 06:02:00 +0000 (15:02 +0900)]
[UnitTest] Add new unittest for libnpuhost

This patch adds new unittest for libnpuhost.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Test/Util] Add util class for testing
Dongju Chae [Thu, 13 Aug 2020 05:59:26 +0000 (14:59 +0900)]
[Test/Util] Add util class for testing

This patch adds util class for testing.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Doc] Describe how to test NPU-DDK packages on FastModel
Dongju Chae [Tue, 11 Aug 2020 10:56:31 +0000 (19:56 +0900)]
[Doc] Describe how to test NPU-DDK packages on FastModel

This patch makes new doc for describing how to test NPU-DDK packages.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[AHub/TCM] Add config.yaml for TCM on AHub
Wook Song [Wed, 12 Aug 2020 08:33:00 +0000 (17:33 +0900)]
[AHub/TCM] Add config.yaml for TCM on AHub

This patch adds a config.yaml file for Test Case Manager running on
the Analysis Hub infra.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Fix/UnitTest] Fix some unittests of ne-inf.cc due to timing issue
Dongju Chae [Wed, 12 Aug 2020 09:39:54 +0000 (18:39 +0900)]
[Fix/UnitTest] Fix some unittests of ne-inf.cc due to timing issue

This fixes some unitests of ne-inf.cc.
Sometimes, invoke() returns -EBUSY due to the previous one.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[UnitTest] Increase unittests' sleep time to 100ms
Dongju Chae [Wed, 12 Aug 2020 06:48:48 +0000 (15:48 +0900)]
[UnitTest] Increase unittests' sleep time to 100ms

This patch increases unittests' sleep time to 100ms.
In some emulated envionment, the original sleep time is too fast
to check certain negative cases.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/UnitTest] Fix some unresolved coverity issues in handler unittest
Dongju Chae [Wed, 12 Aug 2020 04:33:57 +0000 (13:33 +0900)]
[Fix/UnitTest] Fix some unresolved coverity issues in handler unittest

This patch fixes some unresolved coverity issues in handler unittest

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/AppTest] Remove a model instance in TesterTRIV2
Dongju Chae [Wed, 12 Aug 2020 04:33:31 +0000 (13:33 +0900)]
[Fix/AppTest] Remove a model instance in TesterTRIV2

This patch removes a model instance in TesterTRIV2 for each TRIV2
apptest. It makes svace/coverity warnings due to assigned file names.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tests/App] Update the application-level test for hw-recurring task
Wook Song [Tue, 11 Aug 2020 12:45:50 +0000 (21:45 +0900)]
[Tests/App] Update the application-level test for hw-recurring task

This patch updates the application-level test for hw-recurring task
according to the changes in the kernel driver.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Core/NPUDrvAPI/Triv2] Implement stop_target()
Wook Song [Tue, 11 Aug 2020 12:44:29 +0000 (21:44 +0900)]
[Core/NPUDrvAPI/Triv2] Implement stop_target()

This patch adds implementation of the virtual function, stop_target().

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Test] Slightly increase test time
Dongju Chae [Tue, 11 Aug 2020 10:22:05 +0000 (19:22 +0900)]
[Test] Slightly increase test time

This patch slightly increases test time. Otherwise, some unittests
are failed due to timing issue.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverage] Increase the code coverage for HWmem
Dongju Chae [Tue, 11 Aug 2020 08:28:55 +0000 (17:28 +0900)]
[Coverage] Increase the code coverage for HWmem

This patch increases the code coverage for HWmem.
The final coverage for 'ne-hwmem.cc' is 100%.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverity] Resolve coverity issues due to uninitialized variables
Dongju Chae [Tue, 11 Aug 2020 10:11:35 +0000 (19:11 +0900)]
[Coverity] Resolve coverity issues due to uninitialized variables

This patch resolves coverity issues due to uninitialized variables
(UNINIT_CTOR, UNINIT).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverity] Resolve coverity issues due to object scope escape
Dongju Chae [Tue, 11 Aug 2020 09:52:04 +0000 (18:52 +0900)]
[Coverity] Resolve coverity issues due to object scope escape

This patch resolves coverity issues due to wrapper object use after
free (WRAPPER_ESCAPE).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverity] Resolve coverity issues due to unchecked return value
Dongju Chae [Tue, 11 Aug 2020 09:46:12 +0000 (18:46 +0900)]
[Coverity] Resolve coverity issues due to unchecked return value

This patch resolves coverity issues due to unchecked return value
from library (CHECKED_RETURN).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverity] Resolve coverity issues due to resource leak
Dongju Chae [Tue, 11 Aug 2020 09:42:12 +0000 (18:42 +0900)]
[Coverity] Resolve coverity issues due to resource leak

This patch resolves coverity issues due to resource leak
in test codes (RESOURCE_LEAK).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverity] Resolve coverity issues due to parsing warning
Dongju Chae [Tue, 11 Aug 2020 09:36:24 +0000 (18:36 +0900)]
[Coverity] Resolve coverity issues due to parsing warning

This patch resolves coverity issues due to parsing warning
, which hides parameters (PW.PARAMETER_HIDDEN).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverity] Resolve coverity issues due to no virtual destructor
Dongju Chae [Tue, 11 Aug 2020 09:33:41 +0000 (18:33 +0900)]
[Coverity] Resolve coverity issues due to no virtual destructor

This patch resolves coverity issues due to no virtual destructor
in HWmem class (VIRTUAL_DTOR).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverity] Resolve coverity issues due to printf format
Dongju Chae [Tue, 11 Aug 2020 09:22:55 +0000 (18:22 +0900)]
[Coverity] Resolve coverity issues due to printf format

This patch resolves coveirty issues due to invalid type in printf
format (PRINTF_ARGS).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverity] Resolve coverity issues due to calling risky function
Dongju Chae [Tue, 11 Aug 2020 09:18:50 +0000 (18:18 +0900)]
[Coverity] Resolve coverity issues due to calling risky function

This patch resolves coverity issues due to calling risky function
(DC.WEAK_CRYPTO)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tests/Unit/Handler] Add test cases for getNPU_deviceStatus()
Wook Song [Mon, 10 Aug 2020 06:43:03 +0000 (15:43 +0900)]
[Tests/Unit/Handler] Add test cases for getNPU_deviceStatus()

This patch adds positive and negative test cases for
getNPU_deviceStatus() in ne-handler.cc.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Core/Handler] Remove assert in getDeviceStatus ()
Wook Song [Mon, 10 Aug 2020 06:39:39 +0000 (15:39 +0900)]
[Core/Handler] Remove assert in getDeviceStatus ()

This patch removes assert in getDeviceStatus () and then make it returns
a negative errono when api is NULL.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[UnitTest] Decrease sleep time for fast CI tests
Dongju Chae [Tue, 11 Aug 2020 01:31:46 +0000 (10:31 +0900)]
[UnitTest] Decrease sleep time for fast CI tests

This patch decreases sleep time for fast CI tests (to 1ms).
In FastModel, sleep is extreamly slow.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[UnitTest] rename testsuite names
Dongju Chae [Mon, 10 Aug 2020 11:37:24 +0000 (20:37 +0900)]
[UnitTest] rename testsuite names

This patch renames testsuite names, which affects .xml log files.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix/UnitTest] fix the memory leak in handler unittests
Dongju Chae [Mon, 10 Aug 2020 10:46:02 +0000 (19:46 +0900)]
[Fix/UnitTest] fix the memory leak in handler unittests

This patch fixes the memory leak in handler unittests

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Fix] resolve undefined macro (DRM_RDWR) issue in SPIN obs
Dongju Chae [Mon, 10 Aug 2020 10:34:22 +0000 (19:34 +0900)]
[Fix] resolve undefined macro (DRM_RDWR) issue in SPIN obs

This patch resolved undefined macro (DRM_RDWR) issue in SPIN obs build

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Coverage] Remove header files from gcovr coverage analysis
Dongju Chae [Mon, 10 Aug 2020 04:59:20 +0000 (13:59 +0900)]
[Coverage] Remove header files from gcovr coverage analysis

This patch removes header files from gcovr coverage analysis.
So, the total coverage can be slightly decreased :(

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[SAM/Segt] Reduce complexity of segment table creation
Dongju Chae [Mon, 10 Aug 2020 05:56:16 +0000 (14:56 +0900)]
[SAM/Segt] Reduce complexity of segment table creation

This patch reduces the complexity of segment table creation.
The Max CC is decreased to 17 from 25.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[UnitTest] Add a script to count positive/negative testcases
Dongju Chae [Mon, 10 Aug 2020 07:30:36 +0000 (16:30 +0900)]
[UnitTest] Add a script to count positive/negative testcases

This patch adds a script to count positive/negative testcases,
to easily keep track of the ratio of negative testcases.

It's executed when 'unit_test' flag is enabled in gbs build.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tests/Unit] Add test cases for getNPUmodel_metadata ()
Wook Song [Mon, 10 Aug 2020 05:37:21 +0000 (14:37 +0900)]
[Tests/Unit] Add test cases for getNPUmodel_metadata ()

This patch adds several positive and negative test cases for
getNPUmodel_metadata ().

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Core/Handler] Replace realloc() with malloc()
Wook Song [Mon, 10 Aug 2020 05:27:54 +0000 (14:27 +0900)]
[Core/Handler] Replace realloc() with malloc()

After realloc (), the old pointer used in ralloc () could point invalid
address so that we cannot use meta->magiccode. This patch simply
replaces realloc () with malloc () to avoid such issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Fix/HW] Fix the emulated impl. of hw-input-service
Dongju Chae [Mon, 10 Aug 2020 08:09:00 +0000 (17:09 +0900)]
[Fix/HW] Fix the emulated impl. of hw-input-service

This patch fixes the emulated impl. of hw-input-service.
In emulation mode, a device path is not available.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Svace] Fix svace issues newly detected
Dongju Chae [Mon, 10 Aug 2020 08:45:47 +0000 (17:45 +0900)]
[Svace] Fix svace issues newly detected

This patch fixes svace issues newly detected, which includes
- UNINT.CTOR
- NULL_AFTER_DEREF
- FALL_THROUGH
- ...

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Core/HwInputSrv] Use dev_t instead of the path of device node
Wook Song [Thu, 6 Aug 2020 08:00:52 +0000 (17:00 +0900)]
[Core/HwInputSrv] Use dev_t instead of the path of device node

To indicate the device that provides the HW input, this patch uses dev_t
instead of the path of the device node.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Doc] Update usage example
Dongju Chae [Wed, 5 Aug 2020 05:55:56 +0000 (14:55 +0900)]
[Doc] Update usage example

This patch updates doc/usage_exampled.md due to renamed apptests.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Apptest] Rename all apptests to be more intuitive
Dongju Chae [Wed, 5 Aug 2020 02:16:11 +0000 (11:16 +0900)]
[Apptest] Rename all apptests to be more intuitive

This patch renames all apptests to be more intuitive.
Also, some apptests (e.g., dummy-asr) is enabled due to a code coverage issue.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[SAM/Segt] Reduce Cyclomatic Complexity in segment table creation
Dongju Chae [Mon, 3 Aug 2020 08:36:55 +0000 (17:36 +0900)]
[SAM/Segt] Reduce Cyclomatic Complexity in segment table creation

This patch reduces Cyclomatic Complexity in segment table creation
process, reported by SAM analysis.

Also, it fixes missing error handling for external segments with
non-zero segment offsets.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tests/AppTests] Add an application test to verify GEM compatibility
Wook Song [Tue, 4 Aug 2020 09:38:37 +0000 (18:38 +0900)]
[Tests/AppTests] Add an application test to verify GEM compatibility

This patch adds an application-level test to verify GEM compatibility of
NPU DDK.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/App] Fix wrong indentations
Wook Song [Mon, 3 Aug 2020 01:50:54 +0000 (10:50 +0900)]
[Tests/App] Fix wrong indentations

This patch is a trivial one that fixes wrong indentations.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[Tests/Unittests/HwMem] Replace 'vgem' with 'cgem'
Wook Song [Tue, 4 Aug 2020 09:43:54 +0000 (18:43 +0900)]
[Tests/Unittests/HwMem] Replace 'vgem' with 'cgem'

This is a trivial ont that replaces the keyword, 'vgem', with 'cgem'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[API/HwInput] Fix runInternal() API for HW input service
Dongju Chae [Wed, 29 Jul 2020 06:15:10 +0000 (15:15 +0900)]
[API/HwInput] Fix runInternal() API for HW input service

This patch fixes runInternal() APi for HW input service.
It requires extra variables in run_input ioctl structure.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Svace] Resolve unresolved svace issues
Dongju Chae [Mon, 3 Aug 2020 07:23:48 +0000 (16:23 +0900)]
[Svace] Resolve unresolved svace issues

This patch resolves some svace issued, which includes
- UNINIT_LOCAL_VAR.EX
- DEREF_OF_NULL.ASSIGN
- MEMORY_LEAK.EX
- INTEGER_OVERFLOW
...

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[Tests/UnitTests] Add test cases for HWMemExternal (gem)
Wook Song [Wed, 22 Jul 2020 05:21:13 +0000 (14:21 +0900)]
[Tests/UnitTests] Add test cases for HWMemExternal (gem)

This patch adds basic test cases to check the HWMemExternal interface
with GEM.

Signed-off-by: Wook Song <wook16.song@samsung.com>
3 years ago[UnitTest/NPU] Fix the handling of runInput() return values
Dongju Chae [Wed, 29 Jul 2020 06:15:47 +0000 (15:15 +0900)]
[UnitTest/NPU] Fix the handling of runInput() return values

This patch fixes the handling of runInput() return values.
Now, runInput can return 0 or positive values.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[NPUBINFMT] Add an NPU (i.e., arch) version in npubinfmt
Dongju Chae [Thu, 23 Jul 2020 09:00:04 +0000 (18:00 +0900)]
[NPUBINFMT] Add an NPU (i.e., arch) version in npubinfmt

This patch adds an NPU version (e.g., v2.1.1) in npubinfmt

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[API/RunInternal] Implement run_internal (HW recurring) API
Dongju Chae [Wed, 22 Jul 2020 05:40:54 +0000 (14:40 +0900)]
[API/RunInternal] Implement run_internal (HW recurring) API

This patch implements run_internal (HW_recurring) API, and
adds its apptest.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
3 years ago[libnpuhost] Revisiting alloc/dealloc APIs
Dongju Chae [Thu, 23 Jul 2020 01:57:45 +0000 (10:57 +0900)]
[libnpuhost] Revisiting alloc/dealloc APIs

This patch revisits alloc/dealloc APIs in libnpuhost.
It adds generic alloc/dealloc functions for input/model aliases,
and alloc() for multi-tensors no longer forces contiguous memory space.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[AppTest] test cpu polling for output notification
Dongju Chae [Wed, 15 Jul 2020 04:12:49 +0000 (13:12 +0900)]
[AppTest] test cpu polling for output notification

This patch adds new option to enable cpu polling, instead of interrupt,
for output notification in the 'multiple_runs' apptest.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[AppTest] Add apptest for multiple runs with the same model
Dongju Chae [Thu, 9 Jul 2020 10:12:55 +0000 (19:12 +0900)]
[AppTest] Add apptest for multiple runs with the same model

This patch adds apptest for multiple runs with the same model

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] npu-engine 2.0.5 release
Dongju Chae [Mon, 6 Jul 2020 06:20:42 +0000 (15:20 +0900)]
[Release] npu-engine 2.0.5 release

This patch makes npu-engine 2.0.5 release.

Changelog
- Fix tensor size calculations on TRIV2 layout
- Add some testcases to run infernces using an async thread

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Triv2] Fix calculating input/output tensor sizes on TRIV2 layout
Dongju Chae [Mon, 6 Jul 2020 06:17:11 +0000 (15:17 +0900)]
[Triv2] Fix calculating input/output tensor sizes on TRIV2 layout

This patch fixes calculating input/output tensor sizes on TRIV2 layout

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