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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Dongju Chae [Fri, 8 Nov 2019 11:51:57 +0000 (20:51 +0900)]
[FIX] Make model generator generate final input/output fmap
This commit fixes the model generator to generate final input/output fmap
Its dependent testdata is also updated.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Fri, 8 Nov 2019 07:41:29 +0000 (16:41 +0900)]
[MEM] Add .reset_buffer() to prevent deadlocks on various error cases
This commit adds new API, .reset_buffer(), to prevent deadlocks on various error cases.
When some errors occurs, ne-host-inputservice.c and ne-inf.c used to emulate normal execution by explicitly calling return_buffer().
However, as output callback can be not called, deadlock situations often happen when the exact transition of buffer states is not performed.
So, this patch makes the buffer state to initial one on all error cases to reduce the complexity and prevent deadlocks.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Thu, 7 Nov 2019 08:34:33 +0000 (17:34 +0900)]
[TESTDATA] Add testdata generator with multi-layer models
This commit adds testdata generator with multi-layer models.
The meson build script will be updated soon.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Tue, 5 Nov 2019 02:25:01 +0000 (11:25 +0900)]
[UNITTEST] Fix dummy model metadata and callback check
This commit fixes the metadata of dummy models and callback check routine.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Fri, 8 Nov 2019 07:11:40 +0000 (16:11 +0900)]
[TESTDATA] Update the NPU binary generator for multi-layer models
This commit updates the NPU binary generator for multi-layer models
It also updates testdata (i.e., *.tar.gz)
Signed-off-by: Dongju Chae dongju.chae@samsung.com
Wook Song [Tue, 5 Nov 2019 04:58:02 +0000 (13:58 +0900)]
[Test/AppTests] Reduce number of tests when running on the simulator
Currently, there are two modes in NPU-Engine, one is test mode which
means it runs without interaction with the fastmodel simulator, and the
other mode which means it runs with actual interaction with the
simulator. To shorten the test time, this patch reduces the number of
tests in async_callbacks when the test runs in the not-test mode.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Wook Song [Tue, 5 Nov 2019 04:29:00 +0000 (13:29 +0900)]
[Core/Conf] Add an API to get the current running mode
Although the config data has a global scope, it would be removed after
all and replaced with APIs to get information from it. This patch adds
an API to get the current running mode from the global config data.
Signed-off-by: Wook Song <wook16.song@samsung.com>
Dongju Chae [Mon, 4 Nov 2019 05:24:32 +0000 (14:24 +0900)]
[NPU/CONF] Bug fix due to wrong config loads in NPU driver API
This commit fixes the bug due to wrong config loads in NPU driver API.
We should not use `load_conf_default()` because it may overlap user-provided configs.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 4 Nov 2019 07:13:41 +0000 (16:13 +0900)]
[MEM/CMA] Bug fix in cma wrappers for dmabuf map/unmap
This commit fixes the bug in cma wrappers for dmabuf map/unmap.
Because buffers are often resized, we need to carefully maintain the dmabuf/handle mapping.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Thu, 31 Oct 2019 08:17:10 +0000 (17:17 +0900)]
[BUG] Fix the wrong encoding for input/output offset when generating a NPU model
This commit fixes the wrong encoding for input/output offset when generating a NPU model.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Thu, 31 Oct 2019 08:14:14 +0000 (17:14 +0900)]
[FIX] fix the bug in example_visa apptest when it handles fgetc
This commit fixes the bug in example_visa apptest.
As fgetc() returns integer type not charactor type, it should be fixed.
Otherwise, the EOF check can be failed.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Wed, 30 Oct 2019 12:47:11 +0000 (21:47 +0900)]
[BUG] fix srnpu unittests to use valid dmabuf id
This commit fixes srnpu unittests to use valid dmabuf ids with cgem/srtlb.
In NE_TEST_MODE=0 (i.e., real mode in FastModel), we need to carefuly set ioctl parameters.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Wed, 30 Oct 2019 12:26:56 +0000 (21:26 +0900)]
[BUG] Fix the wrong ioctl arguments in srnpu APIs
This commit fixes the wrong ioctl arguments in srnpu APIs
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
채동주/On-Device Lab(SR)/Staff Engineer/삼성전자 [Wed, 30 Oct 2019 10:25:17 +0000 (19:25 +0900)]
Revert "[BUG/NPU] bug fix in npu_open() for fd return"
This reverts commit
d273a2553b48f73d29070aadd7725752ae74089e.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Wed, 30 Oct 2019 09:44:52 +0000 (18:44 +0900)]
[BUG] Fix wrong ioctl argument for dmabuf mapping
This commit fixes wrong ioctl argument for dmabuf mapping
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Wed, 30 Oct 2019 03:07:09 +0000 (12:07 +0900)]
[BUG] Fix bugs in the unittest for srtlb APIs
This commit fixes bugs in the unittest for srtlb APIs.
When dmabuf fds are mapped to srtlb driver, they should be valid.
So, this patch uses the exsiting APIs providing dmabuf-sharing, cgem APIs in NE.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 28 Oct 2019 11:15:38 +0000 (20:15 +0900)]
[BUG/NPU] bug fix in npu_open() for fd return
This commit fixes the bug in npu_open(), which returns id not fd.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
MyungJoo Ham [Tue, 3 Sep 2019 07:39:48 +0000 (16:39 +0900)]
[ASR] Add skeleton for ASR support
ASR (Automatic Speech Recognition), which uses SRP for Audio, support is required.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Parichay Kapoor [Mon, 14 Oct 2019 07:13:29 +0000 (16:13 +0900)]
[TLBdrvAPI] sr TLB API driver implementation
Added sr TLB driver implementation
Added unittests for TLB api driver
Bug fix for hash table hashing generating constant
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Fri, 25 Oct 2019 07:45:47 +0000 (16:45 +0900)]
[n4/n3] return buffer in case of error
Return the buffer in case of error from NPU state to output state
This avoids hung state when error occurs or stop called in between processing the buffer
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Dongju Chae [Thu, 24 Oct 2019 10:54:02 +0000 (19:54 +0900)]
[APPTEST] Add the apptest to test example visa binaries
This commit adds the apptest to test example visa binaries.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Fri, 25 Oct 2019 05:23:23 +0000 (14:23 +0900)]
[TEST] Add a script to generete a NPU model with visa data
This commit adds a script to generate NPU model with visa data files.
Currently, we don't have compiled binaries, which means we have to generate test models with this.
Also, it adds testdata which contains both visa data and pre-generated binaries.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Mon, 14 Oct 2019 05:22:01 +0000 (14:22 +0900)]
[DMABUF] Add new APIs for sync features on dmabuf
This commit adds new APIs for sync features on dmabuf.
Also, its clients (such as ne-mem) should make sure that mmap() for dmabuf is being used for sync.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Parichay Kapoor [Fri, 27 Sep 2019 10:57:56 +0000 (19:57 +0900)]
[mem/npu] Add register of dmabuf when alloc memory
Added registration of dmabuf fd when memory is allocated in ne-mem
Correspondingly de-registration is also added
Registration is performed for all hwmem_type allocated by ne-mem
Added TLB user side driver along with interface to register/deregister dmabuf
Using dmabuf id in host input service when calling NPU driver
V2:
Renamed functions in GEMdrvAPI
gem_prime_export() -> gem_prime_handle_to_fd()
gem_prime_import() -> gem_prime_fd_to_handle()
add close(dmabuf_fd) for dmabuf_fd received via gem_prime_handle_to_fd()
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Parichay Kapoor [Tue, 1 Oct 2019 07:45:55 +0000 (16:45 +0900)]
[TLBdrvAPI] Added TLB user-side API skeleton
Added user side API skeleton for translation lookaside buffer
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Dongju Chae [Tue, 1 Oct 2019 08:00:06 +0000 (17:00 +0900)]
[MEM] Resolve the race condition bug in buffer resizing
This commit resolves the race condition bug in buffer resizing.
It introduces reference counters to track of buffer usage.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Dongju Chae [Tue, 1 Oct 2019 03:59:34 +0000 (12:59 +0900)]
[MEM] Revise enum hwmem_type for readability
This commit revised `enum hwmem_type` for readability.
Originally, HWMEM_TYPE_BUFFER/MODEL/USER are used but they don't represent their properties.
Instead of them, I add three types
- HWMEM_TYPE_INTERNAL_POOL: hwmem mananged in memory pool
- HWMEM_TYPE_INTERNAL_CMA: hwmem managed in kernel cma
- HWMEM_TYPE_EXTERNAL: external hwmem that cannot be mananged in NE
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>
Parichay Kapoor [Fri, 20 Sep 2019 05:02:13 +0000 (14:02 +0900)]
[NPUdrvAPI] Updated interface
Updated the interface of NPU user side driver based on updated memory interface
and remove the support of icam/other modes
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
Dongju Chae [Wed, 25 Sep 2019 06:12:23 +0000 (15:12 +0900)]
[MEM] Rename the API 'get_size' to 'get_pool_size'
This commit renames the API 'get_size', which is an ambiguous name, to 'get_pool_size'.
Signed-off-by: Dongju Chae <dongju.chae@samsung.com>