Commit Graph
102 Commits
Author SHA1 Message Date
nihui 8f1727ace8 more code coverage 2020-07-24 18:43:00 +08:00
nihui bb5bfe3841 avx2 infrastructure (#1943) 2020-07-21 21:21:55 +08:00
nihui 11cffce114 armv8.2 infrastructure (#1856)
* runtime cpu dispatch

* force thread one

* disable openmp for coverage

* simplify test layer

* print NCNN_TARGET_ARCH

* less ci build variants

* weight fp16 storage option

* test convdw int8

* apple a12 a13

* ncnn_add_layer ncnn_add_shader cmake macro
2020-07-19 19:29:52 +08:00
nihui 3ff40b0679 Ci rv32imc (#1940) 2020-07-15 20:25:44 +08:00
nihui fe6bc1ed4d Ci rv64gcv and rv64gc (#1936) 2020-07-14 22:55:19 +08:00
nihui 6538b95102 fix interp and lrn test 2020-07-10 23:15:45 +08:00
nihuini 2cd8e4d0fa fix floor ceil test with very small numbers 2020-07-10 19:59:00 +08:00
nihuini c218eee1e0 fix binaryop test ooops 2020-07-10 19:12:03 +08:00
nihuini 9a38962be2 much longer test ... 2020-07-10 18:43:42 +08:00
nihuini 0d6cc01d55 innerproduct handle mish activation, fix naive C testing, fix #1930 2020-07-10 15:48:22 +08:00
nihui be330e0fc4 test mat pixel 2020-07-09 22:11:57 +08:00
nihuini 5d7b410ca8 test squeezenet with memory pool 2020-07-09 10:38:34 +08:00
nihui 109e079c51 test deconvolution with output shape and padding 2020-07-08 22:03:43 +08:00
nihuini 00ef566609 implement full permute tag support for reshape 2020-07-08 20:06:45 +08:00
nihui 0fdd432fb3 Ci test squeezenet load from binary model and load from memory (#1928) 2020-07-08 15:08:36 +08:00
nihui 7f5047d1dc Ci test end2end squeezenet (#1919) 2020-07-06 21:50:45 +08:00
nihui fb4daa5c96 reshape packing with permute, fix #1909 2020-07-04 20:09:53 +08:00
Tijmen VerhulsdonckandRestyled.io 3325cf94f8 Added AVX swish/lrn/batchnorm (#1897)
* added avx versions of commonly used layers

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* Unroll loops and increase test coverage

* Restyled/pull 1897 (#13)

* Restyle

Co-authored-by: Restyled.io <commits@restyled.io>

* cleanup variable declaration

* fix ctest

* Restyled/pull 1897 (#14)

Restyle
Co-authored-by: Restyled.io <commits@restyled.io>

* Fix ctest for convolutions without AVX.

Co-authored-by: Restyled.io <commits@restyled.io>
2020-07-01 21:41:22 +08:00
Tijmen VerhulsdonckandRestyled.io 73aa99e83c LSTM arm/x86 + fp16 innerproduct arm (#1881)
* added fp16 weight storage version

* Small changes

* Fixed fp16 weight storage layers

* fix innerproduct

* fix loop error

* Fix windows build.

Disable fp 16 conversion when detecting int8 weights.

Implement requested changes.

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* Update option.cpp

Set fp16 storage based on vulkan being used or not.

* added ability for storing state in lstm layer

* added avx lstm

* added arm lstm

* fix innerproduct activation location and add 4 parallel channel version

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* revert arm file

* commit before switch

* implement requested changes

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* More x86 optimized implementations of common layers.

Added LSTM layers for arm and x86 + a ctest to verify the layer accuracy

Added fp16 innerproduct for arm

* fix non avx build

* Add fp16 arm compiler and cpu checks. Remove statefullness from LSTM implementation.

* Fix build check for fp16 arm

* Bypass lstm_fp16 if not supported

* Build order was incorrect

* fix std::min missing in windows build

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* attempting to fix gnu build by enabling: -mfp16-format=ieee to fix the missing __fp16 type

* remove double "fix"

* Specify ieee fp16 format

* implement requested changes

* fix arm non-fp16 build

* fix arm lstm

* Restyled/pull 1881 (#15)

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

Co-authored-by: Restyled.io <commits@restyled.io>

* Check blob size on arm lstm

* fix styling

Co-authored-by: Restyled.io <commits@restyled.io>
2020-07-01 21:40:21 +08:00
Tijmen VerhulsdonckandRestyled.io 26999fab19 Fix AVX wino 3x3 and improve convolution test converage (#1891)
* Fix winograd 3x3 avx and extend test converage

* fix ctest on non-avx path

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* remove unused broadcasts

* Comment with #if 0

Co-authored-by: Restyled.io <commits@restyled.io>
2020-06-30 12:28:30 +08:00
nihui 12ce58074e some code clean 2020-06-26 22:19:34 +08:00
Tijmen VerhulsdonckandRestyled.io 66618340ac x86 fp16 weight storage optimizations (#1871)
* added fp16 weight storage version

* Small changes

* Fixed fp16 weight storage layers

* fix innerproduct

* fix loop error

* Fix windows build.

Disable fp 16 conversion when detecting int8 weights.

Implement requested changes.

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* Update option.cpp

Set fp16 storage based on vulkan being used or not.

* fix innerproduct activation location and add 4 parallel channel version

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* revert arm file

* implement requested changes

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

Co-authored-by: Restyled.io <commits@restyled.io>
2020-06-26 18:40:21 +08:00
Tijmen VerhulsdonckandRestyled.io 82637995c1 3x3 winograd elempack8 (#1865)
* Added 3x3 pack8 winograd implementation

* working winograd 3x3 and direct 2x2

* Remove typo

* remove debug print

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* fix non avx build

* Added flatten and reshape avx implementations

* attempt to fix ios sim build

* Fix build

* Revert include removal

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

Co-authored-by: Restyled.io <commits@restyled.io>
2020-06-23 09:15:41 +08:00
nihuini 71db6e1da5 shufflechannel reverse group style 2020-06-22 14:59:43 +08:00
Tijmen VerhulsdonckandRestyled.io d1b5711791 X86 Elempack 8 AVX implementations. (#1853)
* added avx implementations of FC and Max pool

* Specify AVX2

* Small fixes and using Fused avx activations

* fix type casting

* fixing some CI errors

* Fix code format

* fix pooling test

* remove vector typedef

* More compile fixes

* remove vector typedef

* set c++ version to 17

* Force c++ 17

* Fixing mathfun

* Try and workaround typedef issues

* typefix

* Remove typedef

* switch to static inline

* attempting to fix msvc bug

* Verified MSVX FIX

* Fixing clang build

* commit before switch

* More avx and packing implementation

* Fix ctest

* starting the depthwise pack 8 implementation

* Unrolled loop

* add depthwise pack 8 implementations

* Working 1x1 pack 8 implementation added

* revert incorrect changes

* added conact elempack 8

* more elempack enabled layers added and started on the conversion of the winograd pack4 conv 3x3

* Added code formatting

* fix styling

* Unroll loops

* unrolling loops

* Added more elempac layers for mobilenet v3

* revert commit

* fix code style

* remove arm neon references

* remove pack4 references

* More cleanup

* added packing avx code

* fixing linux build ctests

* remove usage of aligned loads

* More aligned mem ops removed

* Cleanup, revert some files and remove not working winograd and shufflechannel implementation

* add stackoverflow referal

* Fix windows build

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* implement requested chaanges

* remove reshape

* revert arm file change

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

* fix unterminated directive

Co-authored-by: Restyled.io <commits@restyled.io>
2020-06-20 10:15:23 +08:00
nihuini c38d304369 the implicit gpu instance makes life easier :) 2020-06-18 19:48:08 +08:00
Tijmen Verhulsdonck a91a18b901 AVX innerproduct and pooling 2x2 versions (#1839)
* added avx implementations of FC and Max pool

* Specify AVX2

* Small fixes and using Fused avx activations

* fix type casting

* fixing some CI errors

* Fix code format

* fix pooling test

* remove vector typedef

* More compile fixes

* remove vector typedef

* set c++ version to 17

* Force c++ 17

* Fixing mathfun

* Try and workaround typedef issues

* typefix

* Remove typedef

* switch to static inline

* attempting to fix msvc bug

* Verified MSVX FIX

* Fixing clang build

* fix pooling on MSVC

* Remove c++ 17

* Implement requested changes

* small cleanup

* fix aligment

* fix pooling import

* revert "Implement requested changes"

This reverts commit 5d8cc9494b.

* fix import order

* Undo aligned load
2020-06-16 21:25:44 +08:00
nihui 3ef995ed1e format code style and setup restyled.io (#1840) 2020-06-13 22:17:51 +08:00
Tijmen Verhulsdonck e3b31511ad Added AVX implementation to cast to/from bfloat and float32 (#1836) 2020-06-12 19:57:04 +08:00
Tijmen Verhulsdonck da09e5e7f1 Adding channel padding support for blazeface model. (#1826)
* Add channel padding and blazeface model support.

* remove python binding

* remove std::min usage

* fix reference blob usage

* Increased padding test  coverage

* implement requested changes
2020-06-09 19:25:40 +08:00
JackieWu ce2251db05 Improve ROIAlign (accelerate ROIAlign, support sampling ratio and aligned ROIAlign) (#1820)
* update roialign

* update tool for roialign

* fix ceil for roialign

* fix ios build

* fix

* fix

* make it compatibile with the old version

* fix ios build

* trigger CI

* fix test

* order

* build

* remove code

* merge roialign

* accelerate ROIAlign

* update note

* rename func

* roialign version

* trigger CI

* fix roialign

* use ref for pre-calc in roialign

* retrigger CI

* pre-alloc
2020-06-08 21:40:24 +08:00
nihui 8fec0038ba fix ci test 2020-06-01 22:30:49 +08:00
nihuini 4a624c636b skip image tests on unsupported platforms 2020-06-01 19:27:26 +08:00
zhiliu6 d23cef320c Add Swish layer (#1799)
* add swish layer

* add swish test
2020-05-30 18:16:57 +08:00
nihui 15a4b2c878 test pad same mode 2020-05-25 21:38:56 +08:00
nihuini 0efcf63f51 mat pixel rotate test 2020-05-25 20:09:25 +08:00
nihuini ebabfa60c1 disable image storage test on macos and ios 2020-05-18 20:07:40 +08:00
zhiliu6 3bfabf1d6a Add fused convolution and mish layer support. (#1761) 2020-05-17 13:14:09 +08:00
nihui 9c0e46b00a priorbox test fix 2020-05-16 19:31:14 +08:00
nihui 52c2782922 priorbox test 2020-05-16 19:01:49 +08:00
nihuini f350c96112 memorydata vulkan 2020-05-11 12:37:28 +08:00
nihui f9332e04e4 enable image storage test (#1744)
* enable image storage test

* update swiftshader, use subzero backend, opt default
2020-05-08 18:58:59 +08:00
nihuini b9e9b99e56 reuse device packing and unpacking, noop test, fix packing test 2020-05-08 15:07:48 +08:00
nihui 9a9a618229 image storage is mandatory, less options makes life easier 2020-05-08 00:09:35 +08:00
nihui e8688b042f fuse packing cast storage, binaryop image shader, dummy buffer and image, device-wide utility packing converter operators, fix multi-blob layer test 2020-05-05 21:31:07 +08:00
zhiliu6 bd55ddcf0d Add mish layer (#1733)
* add mish layer

* add mish test
2020-04-30 22:53:30 +08:00
nihui 62da1228e1 adreno image shader + fp16 + fp16a (#1714)
* wip

* wip

* fix

* image and imageview can not be destroyed until command execution ends

* fast copy path for tightly packed data

* wip

* texture load works

* 1d 3d image

* record clone image, multiple commands share one image reference

* upload download image

* layer forward accept vkimagemat

* vkimagemat graph works

* staging vkimagemat for passing dynamic parameters, macro for fp32+image shader, padding image shader

* vkimagemat elemsize

* convolution test pass

* conv1x1s1 image shader

* fast staging image allocator from host memory, pooling image shader

* convolutiondepthwise image shader

* innerproduct image shader

* packing image shader

* crop deconvolution image shader

* resolve spirv binding types

* image fp16 and fp16a, cast image shader

* eltwise image shader

* wip

* absval image shader

* deconvolutiondepthwise image shader

* concat image shader, squeezenet works

* noop split image shader

* uniform precision hint

* layer support_image_storage

* wip

* vulkan device utility operator

* command is storage and packing option aware

* fallback to cpu on image allocation failed, mobilenetssd works

* flatten image shader, enable more test

* ci test

* check imgfp32 imgfp16 imgfp16a features

* fix ci test

* fix ci test

* upgrade swiftshader

* wip

* opt aggressive

* imgfp16p

* opt none

* convolution winograd image shader

* fix flush range, fast copy path for continous buffer

* minor fix

* fix innerproduct

* wip ...

* wip

* cast fix

* packing test

* wip

* image fp16p is fp16p

* wip

* silence

* more line info

* code clean

* softmax image shader
2020-04-30 17:08:30 +08:00
nihuini b2d9325c0d test activation fusion 2020-04-23 14:52:22 +08:00
nihuini 956ab49d02 fix conv1x1s1 pack4to1 bf16s 2020-04-13 12:39:15 +08:00
nihuini 36f6942fa0 testing time is too long ... 2020-04-13 11:24:31 +08:00