Let's start preparing for compiler windows SDK release.
We have already prepared for it last year, it is expected to go smoothly. But since there have been many changes so far, it may be different from what we thought it would be. To prevent this, prepare in advance:)
These are what I'm gonna do. Please feel free to add what you think we have to do=)
nnpkg works as expectednnpkg user interfaces$ ./nnas create-package --prefix install
-- Use '20200508' SDK preset
-- Building for: Visual Studio 16 2019
-- The C compiler identification is MSVC 19.24.28314.0
-- The CXX compiler identification is MSVC 19.24.28314.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Use 'release' configuration
-- Download GTEST from https://github.com/google/googletest/archive/release-1.8.0.tar.gz
-- Download GTEST from https://github.com/google/googletest/archive/release-1.8.0.tar.gz - done
-- Extract GTEST
-- Extract GTEST - done
-- Cleanup GTEST
-- Cleanup GTEST - done
-- Build GTEST from C:/git-sdk-64/ONE/infra/nncc/../../externals/GTEST
CMake Error at C:/git-sdk-64/ONE/infra/cmake/modules/ExternalBuildTools.cmake:78 (message):
GTEST Package: Installation failed (check
'C:/Users/sw4670.chae/AppData/Local/Temp/tmp.xsO1Y9Ck3H/nncc/overlay/GTEST.log'
for details)
Call Stack (most recent call first):
C:/git-sdk-64/ONE/infra/cmake/packages/GTestConfig.cmake:13 (ExternalBuild_CMake)
C:/git-sdk-64/ONE/infra/cmake/packages/GTestConfig.cmake:21 (_GTest_build)
CMakeLists.txt:43 (find_package)
CMakeLists.txt:105 (nnas_find_package)
-- Configuring incomplete, errors occurred!
See also "C:/Users/sw4670.chae/AppData/Local/Temp/tmp.xsO1Y9Ck3H/nncc/CMakeFiles/CMakeOutput.log".
.NET Frameworkโโ Microsoft (R) Build Engine โโโโ 16.4.0+e901037fe
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1001: โโ โโ โโโโ โโโโฤกโิดฯดโ.
โโโโฤก: -j4
โโโโฤก โโโโโโ โโโโโโ "MSBuild -help"โโ โิทโโฯผโโโ.
.NET Frameworkโโ Microsoft (R) Build Engine โโโโ 16.4.0+e901037fe
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1008: โโโโโโฦฎโโ โฯณโโโ โโโโโโ โโ โึฝโโฯดโ.
โโโโฤก: install
โโโโฤก โโโโโโ โโโโโโ "MSBuild -help"โโ โิทโโฯผโโโ.
Looking in links: c:\Users\SW4670~1.CHA\AppData\Local\Temp\tmpr3qo7kw4
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-19.2.3 setuptools-41.2.0
Collecting pip
Downloading https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl (1.5MB)
|################################| 1.5MB 409kB/s
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/95/95/f657b6e17f00c3f35b5f68b10e46c3a43af353d8856bd57bfcfb1dbb3e92/setuptools-47.1.1-py3-none-any.whl (583kB)
|################################| 583kB 1.6MB/s
Installing collected packages: pip, setuptools
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Found existing installation: setuptools 41.2.0
Uninstalling setuptools-41.2.0:
Successfully uninstalled setuptools-41.2.0
Successfully installed pip-20.1.1 setuptools-47.1.1
ERROR: Could not find a version that satisfies the requirement tensorflow==2.2.0 (from versions: none)
ERROR: No matching distribution found for tensorflow==2.2.0
:unamused:
nnpkg user interfacesnnpkg's usage is like below as of now.
Usage: tf2nnpkg --info <path/to/info> --graphdef <path/to/pb> [OPTION] -o <path/to/nnpkg/directory>
Since circle2circle has come in, we need to extend the option argument to pass it to circle2circle.
circle2circle's usage is like below.
Optimization options:
--fuse_bcq : Enable FuseBCQ Pass
--fuse_instnorm : Enable FuseInstanceNormalization Pass
--resolve_customop_add : Enable ResolveCustomOpAddPass Pass
--resolve_customop_batchmatmul : Enable ResolveCustomOpBatchMatMulPass Pass
--quantize_with_minmax : Enable QuantizeWithMinMax Pass
Require three following parameters (input_dtype, output_dtype, granularity)
Ex: --quantize_with_minmax float32 uint8 layer
--quantize_dequantize_weights : Enable QuantizeDequantizeWeights Pass
Require three following parameters (input_dtype, output_dtype, granularity)
Ex: --quantize_dequantize_weights float32 uint8 channel
There are two categories.
I think users expect the optimization pass to be ON by default. So what I think its interface have to be is like this.
[OPTIONS]
--off_fuse_bcq
--off_fuse_instnorm
--off_resolve_customop_add
--off_resolve_customop_batchmatmul
--quantize_with_minmax input_dtype output_dtype granularity
--quantize_dequantize_weights input_dtype output_dtype granularity
What I think is;
nnpkg, we turn on all the options for default. there is no turn-off option for now.(1) is not good... :)
And for quantization we there are steps so we may think different for this... need more time for this :)
@seanshpark
I think 1 + 2 looks good.
Turn on all the options for default. If given -O0, no optimization. If given -O1, some optimization and so on. And It doesn't seem necessary to tell the user which pass is turned on for each level.
usage is just simple like this
USAGE: tf2nnpkg --info <path/to/info> --graphdef <path/to/pb> -o <path/to/nnpkg/directory> [-O{opt-level}]
And for quantization we there are steps so we may think different for this... need more time for this :)
I agree:) Maybe we will discuss this after e2e quant module comes in.
@jinevening , can you please describe in simple steps of quantization?