platform/adaptation/npu/trix-engine.git
4 years ago[Refactor/Comm] Revise Comm. Plugin interface and IP plugin impl.
Dongju Chae [Fri, 3 Apr 2020 04:48:04 +0000 (13:48 +0900)]
[Refactor/Comm] Revise Comm. Plugin interface and IP plugin impl.

This patch revises comm. plugin interface and IP plugin implementation.
It now handles only data transfer between npu-engine and outside.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor/Mem] Revise memory allocator
Dongju Chae [Fri, 3 Apr 2020 04:33:25 +0000 (13:33 +0900)]
[Refactor/Mem] Revise memory allocator

This patch revises memory allocator in npu engine.
The configuration devices which memory allocator will be used.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor/Model/Buffer] Revise Model/Buffer derived from HWmem
Dongju Chae [Fri, 3 Apr 2020 04:13:18 +0000 (13:13 +0900)]
[Refactor/Model/Buffer] Revise Model/Buffer derived from HWmem

This patch revises model and buffer implementations, derived from
HWmem class.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor/HWmem] Revise Hardwar memory (HWmem)
Dongju Chae [Fri, 3 Apr 2020 03:37:22 +0000 (12:37 +0900)]
[Refactor/HWmem] Revise Hardwar memory (HWmem)

This patch revise Hardware memory structure & implementation.
Model and Buffer will be derived class of HWmem, and HWmem has
different implementation. It's designed to use bridge pattern.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor/NPU] Revise NPU driver APIs
Dongju Chae [Thu, 2 Apr 2020 10:13:06 +0000 (19:13 +0900)]
[Refactor/NPU] Revise NPU driver APIs

This patch revises NPU driver source codes in npu-engine.

1) Seperate each device impl. into different files.
2) Use the driver API instance in npu-engine components.

This only implementes APIs of emulation. We need to implement
other device's APIs in near future.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor/Utils] Revise utility/conf features
Dongju Chae [Thu, 2 Apr 2020 10:06:47 +0000 (19:06 +0900)]
[Refactor/Utils] Revise utility/conf features

This patch revises utility/conf features in npu-engine.

1) Move the related sources to ./utils folder
- To remove the Module Cycle Dependency (MCD) in SAM analysis.

2) Replace C-based library implementation to standard library

3) Remove 'working_dir' and add 'num_threads' in configuration.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years agoRemove the unused header, NPUARMPlugin.h
Dongju Chae [Fri, 3 Apr 2020 07:11:03 +0000 (16:11 +0900)]
Remove the unused header, NPUARMPlugin.h

This patch removes the unsed header, NPUARMPlugin.h

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[SAM] Remove unused files before applying SAM report
Dongju Chae [Tue, 31 Mar 2020 07:02:38 +0000 (16:02 +0900)]
[SAM] Remove unused files before applying SAM report

This patch removes unused files before applying SAM report.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[IOCTL] Rename GET_READY to GET_STATE
Wook Song [Fri, 20 Mar 2020 02:49:02 +0000 (11:49 +0900)]
[IOCTL] Rename GET_READY to GET_STATE

According to changes in the device driver, this patch renames the IOCTL
named TRINITY_IOCTL_GET_READY to TRINITY_IOCTL_GET_STATE.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/IP] Use the device name prefix for trinity vision as 'triv-'
Wook Song [Fri, 27 Mar 2020 09:19:09 +0000 (18:19 +0900)]
[Core/IP] Use the device name prefix for trinity vision as 'triv-'

This patch fixes a bug related to the device node name for the trinity
vision device.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/NPU] Change the device name of vision npu to triv-$id
Wook Song [Mon, 23 Mar 2020 07:17:15 +0000 (16:17 +0900)]
[Core/NPU] Change the device name of vision npu to triv-$id

This patch changes the device name of vision npu to use the suffix,
'-${device_id}'.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Fix/ioctl] always initialize the ioctl arguments to zero
Dongju Chae [Thu, 19 Mar 2020 10:43:24 +0000 (19:43 +0900)]
[Fix/ioctl] always initialize the ioctl arguments to zero

This patch initializes ioctl arguments to zero.

It's to prevent from forgetting to initialize newly added variables
in the ioctl argument structures.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[npubinfmt] variable-length metadata size
Dongju Chae [Wed, 18 Mar 2020 11:07:00 +0000 (20:07 +0900)]
[npubinfmt] variable-length metadata size

This patch makes the metadata size be a variable-size.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Mem/GEM] add the memory/GEM API to allocate segments
Dongju Chae [Wed, 18 Mar 2020 05:27:29 +0000 (14:27 +0900)]
[Mem/GEM] add the memory/GEM API to allocate segments

This patch adds the memory/GEM API to allocate segments

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor/GEM] Refactor GEMdrvAPI to seperate emulation codes
Dongju Chae [Wed, 18 Mar 2020 05:24:44 +0000 (14:24 +0900)]
[Refactor/GEM] Refactor GEMdrvAPI to seperate emulation codes

This patch makes refactor of GEMdrvAPI to seperate emulation codes

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[ASR] Disable the ASR apptest for a while
Dongju Chae [Tue, 17 Mar 2020 09:19:04 +0000 (18:19 +0900)]
[ASR] Disable the ASR apptest for a while

This patch disables the ASR apptest until the TRIA driver is prepared.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[cgem/version] Fix the version handling in cgem driver API
Dongju Chae [Tue, 17 Mar 2020 07:02:48 +0000 (16:02 +0900)]
[cgem/version] Fix the version handling in cgem driver API

This patch fixes the version handling in cgem driver API.

After the Tizen base is updated, the original version checking
is not working. Thus, we now reply on the standard drm driver
version check API (i.e., drmGetVersion) in libdrm/xf86drm.h.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Handler] Fix error handling on output allocation
Dongju Chae [Mon, 16 Mar 2020 03:05:09 +0000 (12:05 +0900)]
[Handler] Fix error handling on output allocation

This commit fixes error handling on output allocation

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] NPU Engine 1.2.0 release
Dongju Chae [Tue, 10 Mar 2020 03:21:28 +0000 (12:21 +0900)]
[Release] NPU Engine 1.2.0 release

This commit makes the NPU Engine 1.2.0 release

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Version] Make meson.build forward the version info. to sources
Dongju Chae [Tue, 10 Mar 2020 03:13:39 +0000 (12:13 +0900)]
[Version] Make meson.build forward the version info. to sources

This commit is to make meson.build forward the version info. to sources.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Priority] Disable the comment-out of priority setting
Dongju Chae [Tue, 10 Mar 2020 03:25:17 +0000 (12:25 +0900)]
[Priority] Disable the comment-out of priority setting

This commit disables the comment-out of priority setting as
the kernel header was newly updated.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor] Refactor according the changes in the device driver
Wook Song [Fri, 6 Mar 2020 06:26:34 +0000 (15:26 +0900)]
[Refactor] Refactor according the changes in the device driver

This patch applies the recent changes in the kernel device driver [1] to
the related modules.

[1] 27ff14af [Drivers/SRNPU] Restructure SRNPU Core and Vision drivers

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Release] NPU Engine release 1.1.4
Dongju Chae [Fri, 6 Mar 2020 03:04:08 +0000 (12:04 +0900)]
[Release] NPU Engine release 1.1.4

This commit makes a NPU Engine release 1.1.4

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[UnitTest] change the way to run unittests in debian/rules
Dongju Chae [Fri, 6 Mar 2020 05:37:51 +0000 (14:37 +0900)]
[UnitTest] change the way to run unittests in debian/rules

This commit changes the way to run unittests in debian/rules

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Fix] Rename DSP-related ones to HW/Recurring
Dongju Chae [Fri, 6 Mar 2020 05:33:18 +0000 (14:33 +0900)]
[Fix] Rename DSP-related ones to HW/Recurring

This commit renames DSP to HW/recurring because TRIV2 already
contains DSP inside SoC, and we don't know exact HW used in VD.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Dist] Fix .spec file for Tizen dist
Dongju Chae [Fri, 6 Mar 2020 03:34:55 +0000 (12:34 +0900)]
[Dist] Fix .spec file for Tizen dist

This commit fixes .spec file (e.g., wrong syntax, missing manifest)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Dist] Add install_rpath for test cases
Dongju Chae [Thu, 5 Mar 2020 10:26:10 +0000 (19:26 +0900)]
[Dist] Add install_rpath for test cases

This commit adds install_rpath for test cases

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[ThreadPool/UnitTest] Add unittest to test thread pool functionality
Dongju Chae [Mon, 2 Mar 2020 10:09:18 +0000 (19:09 +0900)]
[ThreadPool/UnitTest] Add unittest to test thread pool functionality

This commit adds unittest to test the functionality of thread pool.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[CleanUp/UnitTest] Revise some unittests
Dongju Chae [Mon, 2 Mar 2020 10:08:37 +0000 (19:08 +0900)]
[CleanUp/UnitTest] Revise some unittests

This commit revises some unittests.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[DSP/ThreadPool] Handle tasks with high priority immediately
Dongju Chae [Mon, 2 Mar 2020 10:05:24 +0000 (19:05 +0900)]
[DSP/ThreadPool] Handle tasks with high priority immediately

This commit handles tasks with high priority immediately.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[InputService/DSP] Add internal input service with DSP
Dongju Chae [Thu, 27 Feb 2020 08:22:34 +0000 (17:22 +0900)]
[InputService/DSP] Add internal input service with DSP

This commit implements DSP input service for TRIV-2.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[ThreadPool] Seperate the thread pool impl. from host inputservice.
Dongju Chae [Thu, 27 Feb 2020 07:18:20 +0000 (16:18 +0900)]
[ThreadPool] Seperate the thread pool impl. from host inputservice.

This commit seperates the thread pool impl. from host inputservice for
other input services.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[API/DSP] Implement runNPU_internalInput() for VDNPU with DSP inputs
Dongju Chae [Thu, 27 Feb 2020 04:48:16 +0000 (13:48 +0900)]
[API/DSP] Implement runNPU_internalInput() for VDNPU with DSP inputs

This commit implements runNPU_internalInput() for VDNPU with DSP inputs.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Tests] Revise unit/apptests to sync with updated interfaces
Dongju Chae [Tue, 25 Feb 2020 11:35:18 +0000 (20:35 +0900)]
[Tests] Revise unit/apptests to sync with updated interfaces

This commit revises unit/apptests to sync with updated interfaces.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Revision] Revise ne-host-inputservice.c to use thread pool
Dongju Chae [Tue, 25 Feb 2020 11:28:27 +0000 (20:28 +0900)]
[Revision] Revise ne-host-inputservice.c to use thread pool

This commit revises ne-host-inputservice.c to use thread pool.
For no buffering mode, user library needs to manage multiple threads.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Revision] Implement no buffering for NPU inference
Dongju Chae [Tue, 25 Feb 2020 11:26:54 +0000 (20:26 +0900)]
[Revision] Implement no buffering for NPU inference

This commit implements no buffering for NPU inference.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Option] Add the option to manage buffering
Dongju Chae [Tue, 25 Feb 2020 11:14:57 +0000 (20:14 +0900)]
[Option] Add the option to manage buffering

This commit adds the option to manage buffering.
We are going to move the duty of scheduling to kernel driver.
This option will handle this.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[API/Priority] Add the API to set timeout/priority per model
Dongju Chae [Tue, 25 Feb 2020 11:07:48 +0000 (20:07 +0900)]
[API/Priority] Add the API to set timeout/priority per model

This commit adds the API to set timeout/priority per model.
Note that per-request handling requires more software burdens, and API
modification, which are not desirable.
Also, we now support three types of priorities for inference requests,
HIGH, MID, and LOW.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] NPU Engine release 1.1.3
Dongju Chae [Thu, 5 Mar 2020 04:55:25 +0000 (13:55 +0900)]
[Release] NPU Engine release 1.1.3

This commit makes NPU Engine release 1.1.3

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Dist] Specify install_rpath for ubuntu users
Dongju Chae [Thu, 5 Mar 2020 04:35:02 +0000 (13:35 +0900)]
[Dist] Specify install_rpath for ubuntu users

This commit specifies install_rpath for ubuntu users

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Testdata] Remove unnecessary model testdata
Dongju Chae [Tue, 3 Mar 2020 10:31:21 +0000 (19:31 +0900)]
[Testdata] Remove unnecessary model testdata

This commit removes unnecessary model testdata.
This was already moved to another repo.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[AppTest] Skip model apptests to remove testdata build dependency
Dongju Chae [Wed, 4 Mar 2020 09:59:47 +0000 (18:59 +0900)]
[AppTest] Skip model apptests to remove testdata build dependency

This commit skips model apptests in npu-engine, but CI server will
perform this test instead.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[NPU/UnitTest] Add a missing setup related to timeout, before run_input()
Dongju Chae [Tue, 3 Mar 2020 09:56:42 +0000 (18:56 +0900)]
[NPU/UnitTest] Add a missing setup related to timeout, before run_input()

This commit adds a missing setup of timeout before run_input()

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] NPU Engine v1.1.2 release
Dongju Chae [Tue, 3 Mar 2020 03:24:21 +0000 (12:24 +0900)]
[Release] NPU Engine v1.1.2 release

This commit makes NPU Engine v1.1.2 release.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Doc] Fix updated information
Dongju Chae [Wed, 26 Feb 2020 08:10:44 +0000 (17:10 +0900)]
[Doc] Fix updated information

This commit fixes updated information

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[VOC/API] Add a host API to get model metadata
Dongju Chae [Mon, 24 Feb 2020 07:49:50 +0000 (16:49 +0900)]
[VOC/API] Add a host API to get model metadata

This commit adds a host API to get model metadata.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] 1.1.1 release
Dongju Chae [Mon, 2 Mar 2020 04:59:50 +0000 (13:59 +0900)]
[Release] 1.1.1 release

This commit makes a NPU-Engine release, 1.1.1.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Bug/DataManip] Fix bug: skip data manip. when LAYOUT_SRNPU is used
Dongju Chae [Mon, 2 Mar 2020 04:55:06 +0000 (13:55 +0900)]
[Bug/DataManip] Fix bug: skip data manip. when LAYOUT_SRNPU is used

This commit fixes the bug that performed data manipulation on LAYOUT_SRNPU.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Coverage] Add a missing dependency for coverage generation
Dongju Chae [Fri, 28 Feb 2020 04:07:00 +0000 (13:07 +0900)]
[Coverage] Add a missing dependency for coverage generation

This commit adds a missing dependency for coverage generation, python.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] NPU Engine 1.1.0 release
Dongju Chae [Wed, 19 Feb 2020 09:49:33 +0000 (18:49 +0900)]
[Release] NPU Engine 1.1.0 release

This commit makes a NPU engine release, 1.1.0

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor] Remove npu emulation and testdata generation
Dongju Chae [Wed, 19 Feb 2020 08:20:42 +0000 (17:20 +0900)]
[Refactor] Remove npu emulation and testdata generation

This commit removes npu emulation and testdata generation from NPU
engine. They would be provided from other packages.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] release 1.0.1
Dongju Chae [Wed, 19 Feb 2020 03:47:55 +0000 (12:47 +0900)]
[Release] release 1.0.1

This commit makes a npu-engine release, 1.0.1.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Fix/TestGen] Remove uncessary input tensors
Dongju Chae [Wed, 19 Feb 2020 03:34:50 +0000 (12:34 +0900)]
[Fix/TestGen] Remove uncessary input tensors

This commit removes uncessary input tensors for testcase generation.
Only 'in0' input tensor in the first layer is valid.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] NPU engine 1.0.0 release
Dongju Chae [Fri, 7 Feb 2020 06:48:44 +0000 (15:48 +0900)]
[Release] NPU engine 1.0.0 release

This commit releases new version of NPU engine, 1.0.0.
Now we need to consider the version matching with NPU_Linux-kernel.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TestdataGen] Reuse NPU emul to generate reference data for tvn models
Dongju Chae [Fri, 14 Feb 2020 08:06:38 +0000 (17:06 +0900)]
[TestdataGen] Reuse NPU emul to generate reference data for tvn models

This commit reuses NPU emul to generate reference data for tvn models.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Refactor/Emul] Refactor NPU emulations for random testdata generation
Dongju Chae [Fri, 14 Feb 2020 04:47:54 +0000 (13:47 +0900)]
[Refactor/Emul] Refactor NPU emulations for random testdata generation

This commit refactors NPU emulation for random testdata generation.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Timeout] Change codes to send timeout information to the kernel
Dongju Chae [Tue, 11 Feb 2020 09:36:46 +0000 (18:36 +0900)]
[Timeout] Change codes to send timeout information to the kernel

This commit changes related source codes to send the timeout information
to the srnpu kernel driver.
Also, it adds timestamp to include the time consumed in software stack
as well as execution time of npu inference.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Test] Enable apptests using actual models only on x86_64
Dongju Chae [Fri, 14 Feb 2020 04:03:03 +0000 (13:03 +0900)]
[Test] Enable apptests using actual models only on x86_64

This commit enables apptests using actual models only on x86_64.
Qemu emulation is too slow to handle I/O operations.
Also, FastModel will test them on aarch64, so it's redundant.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Test/tvn] Exclude models with bugs
Dongju Chae [Fri, 14 Feb 2020 04:02:29 +0000 (13:02 +0900)]
[Test/tvn] Exclude models with bugs

This commit excludes some models with bugs.
It was reported to NPU_Compiler part.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[AppTest] Revise visa example apptest for readability
Dongju Chae [Fri, 14 Feb 2020 03:52:07 +0000 (12:52 +0900)]
[AppTest] Revise visa example apptest for readability

This commit revises example apptest for readability.
It will be reused for tvn models, too.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Packaging] Do not generate testdata for armv7l
Dongju Chae [Fri, 14 Feb 2020 06:00:02 +0000 (15:00 +0900)]
[Packaging] Do not generate testdata for armv7l

This commit disables generating testdata for armv7l.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[ne-host-input-service] Add support for model ID
Parichay Kapoor [Tue, 4 Feb 2020 11:22:10 +0000 (20:22 +0900)]
[ne-host-input-service] Add support for model ID

When a model is set in the NPU, NPU now returns a model ID.
This model ID is to be passed back to NPU indicating the model to use
when the given input is to be run.
This allows different models to be registered to the NPU and run inputs
one by one in order or out of order without having to worry to register
model again and again from user side.

This PR adds support for this model ID.

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
4 years ago[BUG/NPUemul] add missing break in switch statement
Dongju Chae [Thu, 13 Feb 2020 10:58:19 +0000 (19:58 +0900)]
[BUG/NPUemul] add missing break in switch statement

This commit adds missing break in switch statement.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[README] Update README.md for the updated test directory
Dongju Chae [Wed, 12 Feb 2020 04:32:16 +0000 (13:32 +0900)]
[README] Update README.md for the updated test directory

This commit updates README.md for the updated test directory.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Test/Model] Change the test directory from ./src/test to ./tests
Dongju Chae [Tue, 11 Feb 2020 03:34:47 +0000 (12:34 +0900)]
[Test/Model] Change the test directory from ./src/test to ./tests

This commit changes the test directory from ./src/test to ./tests.
Also, this new directory now includes pre-built model binaries.
(e.g., NPU models from NPU_Compiler)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[libnpuhost] Add the API to set timeout for next inferences
Dongju Chae [Mon, 10 Feb 2020 04:18:31 +0000 (13:18 +0900)]
[libnpuhost] Add the API to set timeout for next inferences

This commit adds the API to set timeout for next inferences.
It will be called before runNPU_* functions.
Also, if the timeout is zero, the next inferences are regarded
as time-critical tasks (i.e., preemption mode).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[FIX] Set buffer data to zero in the test mode
Dongju Chae [Tue, 11 Feb 2020 07:48:15 +0000 (16:48 +0900)]
[FIX] Set buffer data to zero in the test mode

This commit sets buffer data to zero in the test mode.
Otherwise, it causes valgrind warnings.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Test] Disable example_visa apptest in armv7l
Dongju Chae [Tue, 11 Feb 2020 07:14:02 +0000 (16:14 +0900)]
[Test] Disable example_visa apptest in armv7l

This commit disables example_visa apptest in armv7l.
The libnpuvision library often makes segmentation fault in armv7l, but
we cannot fix this.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] NPU engine 0.0.7 release
Dongju Chae [Fri, 7 Feb 2020 04:02:39 +0000 (13:02 +0900)]
[Release] NPU engine 0.0.7 release

This commit releases NPU engine 0.0.7.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Bug/Fix] Add a missing line for npu_run_input
Dongju Chae [Wed, 5 Feb 2020 10:23:27 +0000 (19:23 +0900)]
[Bug/Fix] Add a missing line for npu_run_input

This commit adds a missing line for npu_run_input.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Debian/Dist] Add missing dependency for sub-packages of npu-engine
Dongju Chae [Tue, 4 Feb 2020 09:57:32 +0000 (18:57 +0900)]
[Debian/Dist] Add missing dependency for sub-packages of npu-engine

This commit adds missing dependency for sub-packages of npu-engine.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Coverage] Fix unittest coverage script
Dongju Chae [Tue, 4 Feb 2020 07:52:58 +0000 (16:52 +0900)]
[Coverage] Fix unittest coverage script

This commit fixes unittest coverage script to be compatible with gcc-9

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Unittest/Fix] Remove check routines after .return_buffer()
Dongju Chae [Mon, 3 Feb 2020 06:19:32 +0000 (15:19 +0900)]
[Unittest/Fix] Remove check routines after .return_buffer()

This commit removes check routines after .return_buffer().

We cannot ensure buffer states after .return_buffer() becasue after
this function call, we will lose the ownership of the buffer.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Quantization] Do not perform quantization for 1-byte types
Dongju Chae [Fri, 31 Jan 2020 07:27:57 +0000 (16:27 +0900)]
[Quantization] Do not perform quantization for 1-byte types

This commit makes that quantization is not performed for 1-byte types
such as uint8_t and int8_t because they have the same data size with
DATA_TYPE_SRNPU.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[FIX] fix meson version dependency
Dongju Chae [Fri, 31 Jan 2020 07:18:46 +0000 (16:18 +0900)]
[FIX] fix meson version dependency

This commit fixes meson version dependency, 0.50

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] NPU Engine 0.0.6 release
Dongju Chae [Tue, 7 Jan 2020 04:07:07 +0000 (13:07 +0900)]
[Release] NPU Engine 0.0.6 release

This commit releases a newer version of NPU Engine library, 0.0.6.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Test/Quantization] Add a unittest to test quantization
Dongju Chae [Thu, 30 Jan 2020 09:32:44 +0000 (18:32 +0900)]
[Test/Quantization] Add a unittest to test quantization

This commit adds a unittest to test quantization.
If data type is not DATA_TYPE_SRNPU, we need to perform quantization.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Test/DataManip] Add a unittest to test data manipulation
Dongju Chae [Thu, 30 Jan 2020 09:32:24 +0000 (18:32 +0900)]
[Test/DataManip] Add a unittest to test data manipulation

This commit adds a unittest to test data manipulation.
If a depth is not a multiple of WPL_A (i.e., 64), padding is added.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[FIX] Fix some functions' descriptions
Dongju Chae [Thu, 30 Jan 2020 08:20:02 +0000 (17:20 +0900)]
[FIX] Fix some functions' descriptions

This comit fixes some functions' descriptions.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Quantization] Implement input/output quantization during data manip
Dongju Chae [Wed, 29 Jan 2020 09:12:38 +0000 (18:12 +0900)]
[Quantization] Implement input/output quantization during data manip

This commit implements input/output quantization during data
manipulation. It requires the intensive verification for calculations.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Test/npubinfmt_v2] Enable testcases for npubinfmt v2
Dongju Chae [Wed, 29 Jan 2020 04:53:55 +0000 (13:53 +0900)]
[Test/npubinfmt_v2] Enable testcases for npubinfmt v2

This commit enables testcases for npubinfmt v2. Also, it revises
the existing apptest, example_visa, to support NPU models with
npubinfmt v2.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[FIX] Remove unnecessary broadcast in callback handling
Dongju Chae [Tue, 28 Jan 2020 07:18:11 +0000 (16:18 +0900)]
[FIX] Remove unnecessary broadcast in callback handling

This commit removes unnecessary broadcast in callback handling.
It may cause a potential deadlock situation.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TEST] Change unit/apptest codes to sync with the updated interface.
Dongju Chae [Tue, 28 Jan 2020 04:42:19 +0000 (13:42 +0900)]
[TEST] Change unit/apptest codes to sync with the updated interface.

This commit changes unit/apptest codes to sync with the updated
interface.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[libnpuhost] Support output_buffers with multiple tensors
Dongju Chae [Tue, 28 Jan 2020 04:41:04 +0000 (13:41 +0900)]
[libnpuhost] Support output_buffers with multiple tensors

This commit changes libnpuhost.h to support output_buffers
to hold multiple tensors' data (like input_tensors).
Also, it revises other related codes for multi tensors and npubinfmt v2.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Fix] Fix warnings caused by the updated gcc version
Dongju Chae [Wed, 22 Jan 2020 07:29:01 +0000 (16:29 +0900)]
[Fix] Fix warnings caused by the updated gcc version

This commit fixs wraning caused by the updated gcc version.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[DataManip] Implement data manipulation for BUFFER_MAPPED
Dongju Chae [Mon, 20 Jan 2020 09:47:07 +0000 (18:47 +0900)]
[DataManip] Implement data manipulation for BUFFER_MAPPED

This commit implements data manipulation for BUFFER_MAPPED type.
For other types, it's not efficient for NPU Engine to handle them.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Fix/Log] Omit logs for third-party libraries (e.g., libnpuvision)
Dongju Chae [Thu, 16 Jan 2020 07:14:43 +0000 (16:14 +0900)]
[Fix/Log] Omit logs for third-party libraries (e.g., libnpuvision)

This commit omits dirty logs for third-party libraries including
libnpuvision and encoder. Such logs are printed as standrad output, thus
we can redirect them to /dev/null.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Handler] Revise data preparation for multiple tensors for inference.
Dongju Chae [Thu, 9 Jan 2020 10:16:05 +0000 (19:16 +0900)]
[Handler] Revise data preparation for multiple tensors for inference.

This commit revises data preparation for multiple tensors by adding new
handler API for feeding input data to NE buffer. It enables to feed
multiple tensors' data to the physically-contiguous NE buffer.
Also, this patch moves the impl of setup_hwmem() to ne-handler.c

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[AppTest] Revise existing unittests to use allocInputBuffers()
Dongju Chae [Tue, 14 Jan 2020 09:23:28 +0000 (18:23 +0900)]
[AppTest] Revise existing unittests to use allocInputBuffers()

This commit revises existing unittests to use allocInputBuffers().

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[libnpuhost] revise buffer allocation/cleanup APIs for users.
Dongju Chae [Thu, 9 Jan 2020 10:16:05 +0000 (19:16 +0900)]
[libnpuhost] revise buffer allocation/cleanup APIs for users.

This commit revises buffer allocation/cleanup APIs for users.

Existing APIs, allocNPUBuffer() and cleanNPUBuffer(), handle memory
for only a single tensor. However, to support multiple tensors, we
need new pair of APIs to allocate memory for them at the same time
by allocating a single physically-contiguous buffer to cover all
tensors (in case of BUFFER_DMABUF).

So, this patch introduces new APIs for multiple tensors.
  - allocInputBuffers() & cleanInputBuffer()
Also, it renames existing APIs for single tensor.
  - allocInputBuffer() & cleanInputBUffer()
  - allocModelBuffer() & cleanModelBUffer()

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[libnpuhost/api] add the API to set data info for input/output tensors
Dongju Chae [Fri, 10 Jan 2020 06:45:01 +0000 (15:45 +0900)]
[libnpuhost/api] add the API to set data info for input/output tensors

This commit adds the API to set data info for input/output tensors.
It defines the data layout/type for tensor layouts, and NPU Engine
will use such information to perform data manipulation and quantization.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[ModelGen] Update model generator for newly added metadata info
Dongju Chae [Mon, 13 Jan 2020 05:18:52 +0000 (14:18 +0900)]
[ModelGen] Update model generator for newly added metadata info

This commit updates model generator for newly added metadata info,
quantization parameters.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[npubinfmt/v2] add quantization parameters for each input/output tensor
Dongju Chae [Fri, 10 Jan 2020 07:25:05 +0000 (16:25 +0900)]
[npubinfmt/v2] add quantization parameters for each input/output tensor

This commit adds quantization parameters to npubinfmt.h (v2), which will
be used to quantize each input/output activation.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Bug/Ip] Handle non-zero input offset in plugin-comm-ip.c
Dongju Chae [Mon, 13 Jan 2020 04:15:11 +0000 (13:15 +0900)]
[Bug/Ip] Handle non-zero input offset in plugin-comm-ip.c

This commit fixes the ip plugin to handle non-zero input offset.
It's valid only for npubinfmt v1. For npubinfmt v2, other PRs may
resolve this by handling per-tensor data manipulation.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Comm/Api] Add the API to obtain the metadata of target model
Dongju Chae [Mon, 13 Jan 2020 04:08:03 +0000 (13:08 +0900)]
[Comm/Api] Add the API to obtain the metadata of target model

This commit adds the API to obtain the metadata of target model.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Testdata] Fix testcase generator to consider non-zero input offset
Dongju Chae [Mon, 13 Jan 2020 04:04:08 +0000 (13:04 +0900)]
[Testdata] Fix testcase generator to consider non-zero input offset

This commit fixes testcase generator to consider non-zero input offset.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[DOC] Revise doc for .gbs.conf to remove repo.extra
Dongju Chae [Wed, 18 Dec 2019 07:08:30 +0000 (16:08 +0900)]
[DOC] Revise doc for .gbs.conf to remove repo.extra

This commit revises doc for .gbs.conf to remove repo.extra.
It's not necessary.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TESTGEN] Revise testcase generator for npubinfmt v2
Dongju Chae [Fri, 3 Jan 2020 09:15:54 +0000 (18:15 +0900)]
[TESTGEN] Revise testcase generator for npubinfmt v2

This commit revises testcase generator for npubinfmt v2.
It considers non-contiguous tensors as testcase*_v2.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[MODEL/META] Verify the magiccode in npubinfmt's metadata
Dongju Chae [Fri, 3 Jan 2020 05:09:28 +0000 (14:09 +0900)]
[MODEL/META] Verify the magiccode in npubinfmt's metadata

This commit verifies the magiccode in npubinfmt's metadata.
Also, it updates related unitttests to use the default magiccode.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TESTGEN] Revise model generator for npubinfmt v2
Dongju Chae [Mon, 30 Dec 2019 05:55:58 +0000 (14:55 +0900)]
[TESTGEN] Revise model generator for npubinfmt v2

This commit revises the model generator script to support npubinfmt v2.

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