platform/adaptation/npu/trix-engine.git
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>
4 years ago[BUILD] add the build option for NPU data manipulation
Dongju Chae [Mon, 30 Dec 2019 06:27:38 +0000 (15:27 +0900)]
[BUILD] add the build option for NPU data manipulation

This commit adds the build option for NPU data manipulation.
As HW could provide this feature in the near future, it is enabled by
the build option.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TEST/MODELGEN] Sync with the updated npubinfmt.h
Dongju Chae [Fri, 13 Dec 2019 05:44:43 +0000 (14:44 +0900)]
[TEST/MODELGEN] Sync with the updated npubinfmt.h

This commit fixes a script to generate test models to sync new
npubinfmt.h

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[NPUBINFMT] Append per-tensor information (e.g., num, dims, emod)
Dongju Chae [Fri, 13 Dec 2019 05:39:17 +0000 (14:39 +0900)]
[NPUBINFMT] Append per-tensor information (e.g., num, dims, emod)

This commit appends per-tensor information such as dimensions, elem
size, emod, etc to 'npubinfmt.h'. This information is valid only for
npubinfmt v2. The previous version (v1) still valid. Also, we need to
make sure to assign its magic code to specify the npubinfmt version.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Release] NPU Engine 0.0.5 Release
Dongju Chae [Tue, 17 Dec 2019 06:35:07 +0000 (15:35 +0900)]
[Release] NPU Engine 0.0.5 Release

This commit starts NPU Engine 0.0.5 Release.

After this, 0.0.6 will include npubinfmt v2 and data manipulation.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[ASR] Revise inference-related SW stack for NPU-ASR
Dongju Chae [Tue, 17 Dec 2019 06:25:35 +0000 (15:25 +0900)]
[ASR] Revise inference-related SW stack for NPU-ASR

This commit revises all inference-related SW stack for ASR.
It reuses exsiting codes using npu device type, using effective op.
Also, It adds new example apptest for NPU-ASR device.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[DOC] Revise doc to describe additional info (ubuntu/testdata)
Dongju Chae [Mon, 2 Dec 2019 05:19:44 +0000 (14:19 +0900)]
[DOC] Revise doc to describe additional info (ubuntu/testdata)

This commit revises doc to describe additional info related to ubuntu
build and testdata package.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[README] Revise README.md to describe 'tools' folder
Dongju Chae [Mon, 2 Dec 2019 05:07:39 +0000 (14:07 +0900)]
[README] Revise README.md to describe 'tools' folder

This commit revises README.md to describe 'tools' folder.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[ASR] make ASR use a dummy model
Dongju Chae [Fri, 29 Nov 2019 05:53:58 +0000 (14:53 +0900)]
[ASR] make ASR use a dummy model

This commit makes ASR use a dummy model to utilize existing codes.

In ASR device, registerModel() is not required. But, we can utilize
existing codes using a dummy model.
Also, as ASR can't resize I/O buffers on model registeration, new API
.resize_buffers() is required.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TESTDATA-GEN] Fix the input size to include esum sizes for all layers
Dongju Chae [Fri, 29 Nov 2019 05:28:58 +0000 (14:28 +0900)]
[TESTDATA-GEN] Fix the input size to include esum sizes for all layers

This commit fixes the input size to include esum sizes for all layers.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Dist/Debian] Create a new package containing test data
Wook Song [Fri, 29 Nov 2019 05:35:11 +0000 (14:35 +0900)]
[Dist/Debian] Create a new package containing test data

This patch creates a new package containing test data separated
from the example package.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years agoCommon/Typedef: Update input mode description
MyungJoo Ham [Fri, 29 Nov 2019 00:34:06 +0000 (09:34 +0900)]
Common/Typedef: Update input mode description

There had been some confusion related with inputs for ASR.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
4 years ago[Dist/Debian] Change prefixes of sub-packages to npu-engine-*
Wook Song [Thu, 28 Nov 2019 04:18:41 +0000 (13:18 +0900)]
[Dist/Debian] Change prefixes of sub-packages to npu-engine-*

This patch changes the prefixes of sub-packages from libnpuengine- to
npu-engine-.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Meson] Clean code in meson build scripts
Wook Song [Thu, 28 Nov 2019 04:16:48 +0000 (13:16 +0900)]
[Meson] Clean code in meson build scripts

This patchs cleans code in meson build scripts.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[FIX/RUN_SYNC] Fix the timing issue due to early inference completion
Dongju Chae [Tue, 26 Nov 2019 11:07:28 +0000 (20:07 +0900)]
[FIX/RUN_SYNC] Fix the timing issue due to early inference completion

This commit fixes the timing issue caused when `run_sync()`'s inference is finished too
early. This patch introduces an extra variable to check whether the callback is
called or not.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[BUG/HWMEM] setup_hwmem() bug fix: hwmem deactivation on return
Dongju Chae [Tue, 26 Nov 2019 11:00:19 +0000 (20:00 +0900)]
[BUG/HWMEM] setup_hwmem() bug fix: hwmem deactivation on return

This commit fixes the bug, which `setup_hwmem()` has an ambiguous
assumption for hwmem deactivation. Now, `setup_hwmem()` does not
deactivate hwmem, which should be handled in its caller.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[LOG] Remove unnecessary logs and fix some log typos
Dongju Chae [Tue, 26 Nov 2019 12:53:23 +0000 (21:53 +0900)]
[LOG] Remove unnecessary logs and fix some log typos

This commit removes unnecessary logs and fixes some log typos.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[CONF] Remove iniparser's duplicated loads & error messages
Dongju Chae [Wed, 27 Nov 2019 07:44:04 +0000 (16:44 +0900)]
[CONF] Remove iniparser's duplicated loads & error messages

This commit removes iniparser's duplicated loads and error messages.
The origianl codes used to call load_conf() multiple times, generating
meaningless error messages.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Debian] Update version to 0.0.3
Wook Song [Wed, 27 Nov 2019 03:46:41 +0000 (12:46 +0900)]
[Debian] Update version to 0.0.3

Update version to 0.0.3

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Debian] Generate multi-layer data for application test
Wook Song [Wed, 27 Nov 2019 03:43:46 +0000 (12:43 +0900)]
[Dist/Debian] Generate multi-layer data for application test

This patch removes the tarball containing multi-layer data for
application test and makes those data be generated at the build-time.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Tizen] Generate multi-layer data for application test
Wook Song [Wed, 27 Nov 2019 02:07:01 +0000 (11:07 +0900)]
[Dist/Tizen] Generate multi-layer data for application test

This patch removes the tarball containing multi-layer test data and
makes those test data be generated at build time.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Debian] Gernerate single layer data for application test
Wook Song [Wed, 27 Nov 2019 00:06:56 +0000 (09:06 +0900)]
[Dist/Debian] Gernerate single layer data for application test

This patch removes the tarball containing pre-build single layer model
data for application data. Instead, those test data is generated at
build time by this patch.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Tizen] Generate single layer data for application test
Wook Song [Tue, 26 Nov 2019 23:48:34 +0000 (08:48 +0900)]
[Dist/Tizen] Generate single layer data for application test

Instead of tarball, the sigle layer data for application test is
generated at build-time by this patch. In addition, this patch creates a
new package containing those test data.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Debian] Add omitted npu-engine.ini to the main package
Wook Song [Tue, 26 Nov 2019 04:28:05 +0000 (13:28 +0900)]
[Dist/Debian] Add omitted npu-engine.ini to the main package

This patch adds the omitted npu-engine.ini file to the main package.
Note that this file is installed in the etc directory under /opt/trinity
when the emulation mode is enabled.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Debian] Fix a warning about 'badly formatted trailer line'
Wook Song [Tue, 26 Nov 2019 04:04:46 +0000 (13:04 +0900)]
[Dist/Debian] Fix a warning about 'badly formatted trailer line'

This patch fixes a warning about 'badly formatted trailer line' in
the changelog file.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Meson] Replace version string of meson with >= 0.42
Wook Song [Tue, 26 Nov 2019 06:43:30 +0000 (15:43 +0900)]
[Meson] Replace version string of meson with >= 0.42

Since OBS does not provide meson >= 0.50, this patch replaces the
version string of meson with >=0.42.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[ASR/IP] Revise getnumNPU/ASRdevice() to use common function
Dongju Chae [Mon, 25 Nov 2019 07:12:27 +0000 (16:12 +0900)]
[ASR/IP] Revise getnumNPU/ASRdevice() to use common function

This commit revises getnumNPU/ASRdevice() to use common function.
Also, getASRdevice() is implemented in a similar way to the NPU device.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[BUILD/ASR] Remove asr-specific codes to reuse existing one
Dongju Chae [Mon, 25 Nov 2019 07:11:26 +0000 (16:11 +0900)]
[BUILD/ASR] Remove asr-specific codes to reuse existing one

This commit removes asr-specific codes & dependency to reuse existing
one.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TESTDATA] Bug fix on CONVE mod calculation
Dongju Chae [Mon, 25 Nov 2019 11:51:49 +0000 (20:51 +0900)]
[TESTDATA] Bug fix on CONVE mod calculation

This commit fixes the bug on CONVE mode calculation.

As CONVE's esum uses the output size, mod calcs also should be matched.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[RELEASE] Add CHANGES to maintain changelog & make 0.0.2 release
Dongju Chae [Fri, 22 Nov 2019 02:11:41 +0000 (11:11 +0900)]
[RELEASE] Add CHANGES to maintain changelog & make 0.0.2 release

This commit adds CHANGES to maintain changelog and increases the package
version to 0.0.2.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TEST] Add ubuntu auto_test & enable example_visa as default
Dongju Chae [Fri, 22 Nov 2019 11:57:24 +0000 (20:57 +0900)]
[TEST] Add ubuntu auto_test & enable example_visa as default

This commit adds ubuntu auto_test and enables example_visa as default.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[CONF] Revise all source codes which have used test_mode conf
Dongju Chae [Fri, 22 Nov 2019 10:34:50 +0000 (19:34 +0900)]
[CONF] Revise all source codes which have used test_mode conf

This commit revises all source codes which have used test_mode conf.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[CONF] Remove test_mode configuration
Dongju Chae [Fri, 22 Nov 2019 10:13:21 +0000 (19:13 +0900)]
[CONF] Remove test_mode configuration

This commit removes test_mode configuration cuz it's no longer used.
Now, NPU Engine runs with either NPU Emulation (Ubuntu 16.04) or real
NPU device (FastModel)

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Valgrind] Revise a way to enable valgrind to remove redundant codes
Dongju Chae [Fri, 22 Nov 2019 08:03:56 +0000 (17:03 +0900)]
[Valgrind] Revise a way to enable valgrind to remove redundant codes

This commit revises a way to enable valgrind to remove redundant codes.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Tools/GenTestData] Update model_gen tool to use testdata packages
Wook Song [Fri, 22 Nov 2019 07:22:53 +0000 (16:22 +0900)]
[Tools/GenTestData] Update model_gen tool to use testdata packages

This patch updates the model_gen tool to be possible to use the file
provided by testdata packages from the decoder and libnpuvision.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tools/GenTestData/Meson] Fix errors while building for real mode
Wook Song [Fri, 22 Nov 2019 07:32:18 +0000 (16:32 +0900)]
[Tools/GenTestData/Meson] Fix errors while building for real mode

This patch fixes errors while building the test data generation tool for
real mode.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Packaging] Remove the libnpuvision dependency for release mode
Dongju Chae [Tue, 19 Nov 2019 07:24:19 +0000 (16:24 +0900)]
[Packaging] Remove the libnpuvision dependency for release mode

This commit removes the libnpuvision dependency for release mode.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[FIX] version check fixup for some packages
Dongju Chae [Fri, 22 Nov 2019 04:59:17 +0000 (13:59 +0900)]
[FIX] version check fixup for some packages

This commit fixes the version checking for some packages.
Note that the version checking of gcc is not working because it's meta
package.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Tools/Meson] Include gen-testdata in build tree
Wook Song [Wed, 20 Nov 2019 07:31:55 +0000 (16:31 +0900)]
[Tools/Meson] Include gen-testdata in build tree

This patch adds meson build scripts in order to include gen-testdata in
the build tree.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Tizen] Exclude tools for test data generation
Wook Song [Wed, 20 Nov 2019 09:06:38 +0000 (18:06 +0900)]
[Dist/Tizen] Exclude tools for test data generation

This patch excludes tools for test data generation from packaging.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tools/GenTestData] Fix a warning about sign-compare
Wook Song [Wed, 20 Nov 2019 08:59:25 +0000 (17:59 +0900)]
[Tools/GenTestData] Fix a warning about sign-compare

This patch fixes the sign-compare warning in testdata_gen.cpp.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tools/GenTestData] Fix a warning about unused-result
Wook Song [Wed, 20 Nov 2019 08:08:28 +0000 (17:08 +0900)]
[Tools/GenTestData] Fix a warning about unused-result

This patch fixes the unused-result warning in testdata_gen.cpp.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Tools/GenTestData] Remove unneeded white spaces
Wook Song [Wed, 20 Nov 2019 07:52:33 +0000 (16:52 +0900)]
[Tools/GenTestData] Remove unneeded white spaces

This patch removes unneeded white spaces in testdata_gen.cpp.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Test] Move files related to testdata generation to the tools directory
Wook Song [Wed, 20 Nov 2019 06:55:23 +0000 (15:55 +0900)]
[Test] Move files related to testdata generation to the tools directory

This patch moves files related to testdata generation, which are
orinally placed in ./src/test/testdata, to the tools directory, i.e.,
./tools/gen-testdata.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Dist/Debian] Add omitted build-dependency on libiniparser-dev
Wook Song [Thu, 21 Nov 2019 06:48:16 +0000 (15:48 +0900)]
[Dist/Debian] Add omitted build-dependency on libiniparser-dev

This patch adds the omitted build-dependency on libiniparser-dev to the
debian control file.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[EMUL/BUG] Bug fix: when model_gen.py makes esum data (ESUM vs. CONVE)
Dongju Chae [Wed, 20 Nov 2019 04:40:48 +0000 (13:40 +0900)]
[EMUL/BUG] Bug fix: when model_gen.py makes esum data (ESUM vs. CONVE)

This commit fixes the bug when model generator makes esum data, which should have handled differently depending on OPCODE (i.e., ESUM vs. CONVE).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[EMUL/BUG] Bug fix: Add a missing line when setting esum data
Dongju Chae [Tue, 19 Nov 2019 07:52:06 +0000 (16:52 +0900)]
[EMUL/BUG] Bug fix: Add a missing line when setting esum data

This commit adds a missing line when setting esum data.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[CONF] Set the default resv mem size to 0 (Kernel CMA)
Dongju Chae [Tue, 19 Nov 2019 07:25:45 +0000 (16:25 +0900)]
[CONF] Set the default resv mem size to 0 (Kernel CMA)

This commit change the default resv mem size to 0 (Kernel CMA).

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[FIX/GEM] fix the size checking in gem_create() to prevent overflow
Dongju Chae [Tue, 19 Nov 2019 07:17:32 +0000 (16:17 +0900)]
[FIX/GEM] fix the size checking in gem_create() to prevent overflow

This commit fixes the size checking in gem_create(), which caused size
overflow due to alignment.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Core/NPU/Emul] Fill the function body for CONVE emulation
Wook Song [Mon, 18 Nov 2019 07:14:38 +0000 (16:14 +0900)]
[Core/NPU/Emul] Fill the function body for CONVE emulation

This patch fills the function body for emulation of the CONVE
instruction and enables the emulation using it.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/NPU/Emul] Fill the function body for ReLU emulation
Wook Song [Mon, 18 Nov 2019 05:01:57 +0000 (14:01 +0900)]
[Core/NPU/Emul] Fill the function body for ReLU emulation

This function fills the function body for emulation of the ReLU
instruction. Using this function, the emulation for ReLU is enabled.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/NPU/Emul] Fill the function body for AVGP emulation
Wook Song [Mon, 18 Nov 2019 04:42:20 +0000 (13:42 +0900)]
[Core/NPU/Emul] Fill the function body for AVGP emulation

This function fills the function body for emulation of the Average
Pooling instruction. The emulation for AVGP is enabled via this
function.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[README/DOC] Revise README.md and add some documentation
Dongju Chae [Mon, 18 Nov 2019 02:26:17 +0000 (11:26 +0900)]
[README/DOC] Revise README.md and add some documentation

This commit revises README.md and add some documentation.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[BUG] Bug fix in CONV emulation and esum/weight data setup
Dongju Chae [Mon, 18 Nov 2019 13:01:55 +0000 (22:01 +0900)]
[BUG] Bug fix in CONV emulation and esum/weight data setup

Thix commit fixes the bug in CONV emulation and esum/weight data setup.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TESTDATA] Add a testcase for multi-layer model to test CONVE/ReLU/AVGP
Dongju Chae [Tue, 19 Nov 2019 03:13:25 +0000 (12:13 +0900)]
[TESTDATA] Add a testcase for multi-layer model to test CONVE/ReLU/AVGP

This commit adds new testcase, testcase3, to test CONVE/ReLU/AVGP.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TESTDATA/FIX] Fix the model generation to use specified addresses
Dongju Chae [Tue, 19 Nov 2019 03:08:57 +0000 (12:08 +0900)]
[TESTDATA/FIX] Fix the model generation to use specified addresses

This commit fixes the model generation to use specified addresses

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Core/NPU/Emul] Add skeleton code for ReLU, AVGP, CONVE, TCNV, TCNVE
Wook Song [Fri, 15 Nov 2019 05:17:19 +0000 (14:17 +0900)]
[Core/NPU/Emul] Add skeleton code for ReLU, AVGP, CONVE, TCNV, TCNVE

This patch adds skeleton code for running operators, ReLU, AVGP, CONVE,
TCNV, and TCNVE, in the test mode.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/NPU/Emul] Add a struct representing instruction format for TCNVE
Wook Song [Fri, 15 Nov 2019 02:31:26 +0000 (11:31 +0900)]
[Core/NPU/Emul] Add a struct representing instruction format for TCNVE

This patch adds a data struct representing the instruction format for
TCNVE.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/NPU/Emul] Add a struct representing instruction format for CONVE
Wook Song [Fri, 15 Nov 2019 02:27:58 +0000 (11:27 +0900)]
[Core/NPU/Emul] Add a struct representing instruction format for CONVE

This patch adds a data struct representing the instruction format for
CONVE.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/NPU/Emul] Add a struct representing instruction format for TCNV
Wook Song [Fri, 15 Nov 2019 02:15:07 +0000 (11:15 +0900)]
[Core/NPU/Emul] Add a struct representing instruction format for TCNV

This patch adds a data struct representing the instruction format for
TCNV.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/NPU/Emul] Add a struct representing instruction format for AVGP
Wook Song [Fri, 15 Nov 2019 02:06:49 +0000 (11:06 +0900)]
[Core/NPU/Emul] Add a struct representing instruction format for AVGP

This patch adds a data struct representing the instruction format for
AVGP.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Core/NPU/Emul] Add a struct representing instruction format for RELU
Wook Song [Fri, 15 Nov 2019 01:51:16 +0000 (10:51 +0900)]
[Core/NPU/Emul] Add a struct representing instruction format for RELU

This patch adds a data struct representing the instruction format for
RELU.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[NPU/EMUL] Add NPU emulation engine (support CONV/MAXP/ESUM)
Dongju Chae [Thu, 14 Nov 2019 10:03:56 +0000 (19:03 +0900)]
[NPU/EMUL] Add NPU emulation engine (support CONV/MAXP/ESUM)

This commit adds NPU emulation engine.
Currently, it supports CONV/MAXP/ESUM.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TESTDATA] Add enum for trinity opcodes
Dongju Chae [Fri, 15 Nov 2019 05:19:32 +0000 (14:19 +0900)]
[TESTDATA] Add enum for trinity opcodes

This commit adds enum for trinity opcodes.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[TESTDATA] Fix multi-layer testdata generation when setting their shamt
Dongju Chae [Thu, 14 Nov 2019 10:48:28 +0000 (19:48 +0900)]
[TESTDATA] Fix multi-layer testdata generation when setting their shamt

This commit fixes the bug in multi-layer testdata generation.
The shamt is differently set depending on an operation type.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Local/Dist/Debian] Run meson with PKG_CONFIG_PATH pointing libnpuvision
Wook Song [Thu, 14 Nov 2019 08:19:57 +0000 (17:19 +0900)]
[Local/Dist/Debian] Run meson with PKG_CONFIG_PATH pointing libnpuvision

NPU Engine requires dependencies on libnpuvision, which is placed under
/opt/trinity. In order to provide those dependencies, this patch adds
PKG_CONFIG_PATH pointing when running meson.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Local/Dist/Debian] Initial debianize
Wook Song [Thu, 14 Nov 2019 07:11:00 +0000 (16:11 +0900)]
[Local/Dist/Debian] Initial debianize

This patch debianizes this NPU Engine for Ubuntu 16.04 running on
x86_64.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[Local/Meson] Add a mode to build/run NPU Engine without FM simulator
Wook Song [Thu, 14 Nov 2019 07:05:51 +0000 (16:05 +0900)]
[Local/Meson] Add a mode to build/run NPU Engine without FM simulator

This patch adds a mode, build_test_only_mode, to build NPU Engine on
a Ubuntu x86_64 machine and to run it without the FastModel simulator.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[NPU/EMUL] Add a skeleton for NPU ioctl emulations
Dongju Chae [Tue, 12 Nov 2019 02:29:39 +0000 (11:29 +0900)]
[NPU/EMUL] Add a skeleton for NPU ioctl emulations

This commit adds a skeleton for NPU ioctl emulations. It replaces the existing NPU ioctls to dummy ones, and will eventually perform emulations (TODO).

Note that this source file is written in C++. The reason is the existing emulation codes for VISA are written in C++, and we need their C wrappers.

Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
4 years ago[Core/Conf] Make load_conf_default static
Wook Song [Mon, 4 Nov 2019 07:52:42 +0000 (16:52 +0900)]
[Core/Conf] Make load_conf_default static

In order to avoid confusion between load_conf and load_conf_default,
this patch makes the load_conf_default function static.

Signed-off-by: Wook Song <wook16.song@samsung.com>
4 years ago[NPU] add a missing header, typedef.h, to npubinfmt.h
Dongju Chae [Mon, 11 Nov 2019 03:03:49 +0000 (12:03 +0900)]
[NPU] add a missing header, typedef.h, to npubinfmt.h

This commit adds a missing header, tpyedef.h, to npubinfmt.h

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