Commit Graph
80 Commits
Author SHA1 Message Date
nihui f6b75ceeb8 add fp16s test, skip cpu test for fp16p (#6724) 2026-05-15 10:14:31 +08:00
nihui 544230f71d gemm x86 tile-N threading, drop testutil layer hook function (#6428)
* test threading
* drop testutil layer hook function
2025-11-28 15:48:48 +08:00
nihui 171b9d1bba use spdx license header, copyright Tencent (#6152) 2025-07-08 11:01:29 +08:00
nihui da7d1a10f7 test x86 arm convolution oom (#5492)
* skip mips loongarch riscv oom test atm

* test softmax oom
2024-06-11 11:06:09 +08:00
nihui 556b79ce4d create layer decoupled (#5258)
* create layer decoupled
* no more virtual public
* allow build test with shared library
* decouple cpu vulkan
* drop old scripts
2024-01-05 14:08:15 +08:00
nihui ded0b78bb2 fix nvidia vulkan crash on exit (#5234) 2023-12-20 11:32:53 +08:00
邓实诚andHonestDeng a1e3ebf8e5 implement simplemath (#4905)
* complete abs, fmod and sin function in simplemath.h

* remove some unused variables in simplemath.cpp

* modify test-coverage.yml and add some functions to simplemath.cpp

* modify erf.cpp which included math.h

* include platform.h for NCNN_SIMPLEMATH definition

* move utility constants and functions in simplemath.h to simplemath.cpp

* guard simplemath functions with extern "C"

* add NCNN_EXPORT macro in simplemath.h

* include plateform.h and guard all declarations with NCNN_SIMPLEMATH

* clean unused code in test_unaryop.cpp

* guard #include <vector> with NCNN_SIMPLEMATH in benchncnn.cpp

* add 'static' to guard functions that not declarated in header file

* modify sin and cos with better implementation

---------

Co-authored-by: HonestDeng <HonestDeng@users.noreply.github.com>
2023-10-23 10:51:51 +08:00
nihui c45c01c7c1 enable VK_KHR_cooperative_matrix (#4823)
* enable VK_KHR_cooperative_matrix
* add khr cm shader
* update glslang
* print matrix info
2023-07-27 19:21:13 +08:00
nihui 85991e2e0e test custom option, update ci (#4609)
* early return for cpu test

* make nvidia driver happy

* fix gemm x86 threading
2023-04-10 15:03:57 +08:00
nihui fed99fd35b gemm output transpose, prepack c (#4479)
* mha is now permute and reshape free
* gemm user defined tile mnk param
2023-01-27 13:03:04 +08:00
nihui 15761fc1a6 arm vfpv4 asimdhp asimdfhm optimization for gemm (#4432) 2022-12-28 21:29:21 +08:00
nihui 706831f8a9 arm vfpv4 optimization for innerproduct (#3950) 2022-06-24 15:39:52 +08:00
nihui 067e8e1d92 mips unified elempack for elementwise layers (#3928) 2022-06-19 19:29:47 +08:00
nihui 241524ffce discard weight memory for x86 arm vulkan (#3865)
* discard weight memory for x86 and vulkan
* drop arm innerproduct weight
* drop arm convolution weight
* drop arm convolutiondepthwise weight
* drop x86 vulkan deconvolution deconvolutiondepthwise weight
* drop arm deconvolution deconvolutiondepthwise weight
* arm neon assembly optimization for innerproduct pack4
2022-06-01 10:16:35 +08:00
tpoisonooo 6fd801b6d7 feat(src/layer): add vision_transformer benchmark (#3730)
* feat(src/layer): add vision_transformer benchmark and relative layer

* refactor(testutil.h): add para for RandomMat
2022-05-17 16:13:49 +08:00
nihui 308965b7e9 sanitize cooperative matrix option in tests 2022-04-20 15:22:59 +08:00
nihui dadc640c66 x86 avx512 optimization (#3581)
* unified relu avx512

* unifed clip avx512

* unaryop avx512

* sigmoid avx512

* binaryop avx512

* padding convolution avx512

* convolutiondepthwise avx512

* innerproduct avx512

* reshape avx512

* slice avx512

* hardsigmoid hardswish avx512

* swish avx512

* pooling avx512

* crop avx512

* convolution sgemm pack16

* convolution 3x3 winograd pack16

* interp avx512

* convolution sgemm pack1to16

* convolution sgemm pack16to8

* convolution sgemm pack8to16

* convolution sgemm pack16to4

* fix vulkan permute pack8

* fix vulkan convolution gemm pack8to1
2022-04-09 17:23:27 +08:00
nihui 559e5b23f9 vulkan tensorcore optimization (#3628)
* query and enable cooperative matrix

* fix build with old vulkan sdk

* implement cooperative matrix optimization

* add nvidia-t4 coverage

* adjust test option for more coverage
2022-03-30 19:05:17 +08:00
nihui 920aa79f04 drop x86 avx2 fp16 (#3568) 2022-02-16 22:45:57 +08:00
Yuzhong Yan 681141ff42 [YZ] Fix bug in unit test (#3556) 2022-02-11 14:47:37 +08:00
nihui 3a83704c38 binary4d, unary4d (#3443) 2021-12-28 23:13:44 +08:00
nihui 6941ec8fc9 arm neon optimization for general packed convolution (#3426) 2021-12-22 12:18:17 +08:00
nihui 999e640d43 dynamic convolution weight (#3408) 2021-12-10 22:38:22 +08:00
f10cc6dd93 initial data structure changes for 3dcnn, conv3d, pooling3d (#3378)
Co-authored-by: ElvisYu <elvisyuovo@gmail.com>
Co-authored-by: 余浩文 <m18107220188@163.com>
Co-authored-by: Zr2223 <67497651+Zr2223@users.noreply.github.com>
2021-12-02 16:50:55 +08:00
nihui 24fbb6e8cb honor thread setting on load and vulkan command, ci avx512 t4 (#3391) 2021-12-01 16:36:37 +08:00
nihui 0b664ec438 fix potential out of range read in test with int8 inputs (#3357) 2021-11-16 23:21:20 +08:00
Tijmen Verhulsdonckandnihui 4270b5c502 Fix broken codepaths with AVX only (#3254)
* Fix codepaths for fp16 weights when only AVX is enabled

* Disable opt overrides

* Update SDK url

* Update vulkan SDK download version

* Debugging risv pad

* apply code-format changes

* fix padding test

* fix mips slice test

* fix lrn test

* implement mish swish image shader, fix pooling adaptive image storage support, drop debug output

* update ci ubuntu 18.04

Co-authored-by: nihui <shuizhuyuanluo@126.com>
2021-10-04 11:07:53 +08:00
Tijmen Verhulsdonck eaa7e24db6 Added ability to switch AVX/AVX2 during runtime (#3076) 2021-07-14 20:28:15 +08:00
nihui 3a77b09c31 fix test failure 2021-06-17 23:51:17 +08:00
nihuini fef61c5296 fix arm build 2021-06-17 19:55:17 +08:00
nihuini 934a1a8e32 test flatten packing padding int8 2021-06-17 19:42:45 +08:00
nihui 17936e9f54 fix packing risc-v test, add cpu_riscv_vlenb() 2021-05-12 23:23:50 +08:00
nihui a61f03ec76 arm neon optimization for pixelshuffle scale 2 2021-04-24 12:45:17 +08:00
nihui 5fe75f19ef architecture changes for int8 packing (#2771)
* quantize and dequantize tests

* unify activation and usability function

* drop NCNN_REQUANT cmake option, test dequantize requantize pack8, fix webassembly build

* benchmark use requantize int8 model
2021-03-27 18:49:13 +08:00
nihui 21dc650eb3 check layer support (#2564) 2021-01-07 00:21:15 +08:00
tpoisonooo baf49574c4 innerproduct aarch64 use gemm (#2521)
* perf(innerproduct-arm): add aarch64 gemm

* fix(innerproduct): fix compilation errror

* fix(armv7-innerproduct): fix armv7 compilation error

* fix(innerproduct): fix gemm param

* fix(int8): update mock scales and fix runtime error

* fix(compilation): fix compilation error
2021-01-05 23:29:14 +08:00
nihui 54c0a13b9f build shared library (#2525)
* build shared lib and enable lto

* reserved for layer and option

* allocator pimpl

* datareader pimpl

* paramdict pimpl, disable copy assign for allocator and datareader

* modelbin pimpl

* net extractor pimpl

* gpu pimple

* disable copy assign vulkandevice, code format

* command pimpl, dummy image readonly

* pipeline pipelinecache pimpl, export platform class

* code format, export simple family

* update ci

* disable lto on android armv7, merge webassembly ci

* link libgcc, fix macos dylib version

* pipeline pimpl, gpu info pimpl

* destroy gpu info after vulkan device

* ignore msvc stl class warning

* fix ncnn_paramdict_get_float return type

* fix vktransfer upload fp16 without flatten, add command test
2021-01-01 22:55:10 +08:00
8f8f2de4d0 SSE2 optimization pack (#2123)
* SSE2: BatchNorm

* Fixed batch norm in AVX configuration

* Optimized register size switch

* Attempt to pass CI

* Attempt to pass CI

* Bias op

* Element wise ops

* Support packing on x86 by default

* Fixed macro range in bias

* Use aligned read for packed data

* Update testutil.h

* Update pooling_x86.cpp

* Support wasn SIMD

* Fix emscripten compiler flags

* fix build

* more ci fix

* concat x86 pack4

* flatten x86 pack4

* more x86 pack4

* ci pass

* fix

* enable sse2 mathfun

* enable --experimental-wasm-simd

Co-authored-by: nihui <shuizhuyuanluo@126.com>
Co-authored-by: nihuini <nihuini@tencent.com>
2020-11-16 12:43:09 +08:00
maxfy1992andyangfengmax a106baa3b8 add interp param align_corner (#2236)
* add interp param align_corner

add check support_vulkan after create_pipeline for tests

* code style

Co-authored-by: yangfengmax <yangfengmax@didichuxing.com>
2020-11-10 16:15:56 +08:00
Leo 5afd318b86 Support remove libstdc++ denpendency (#2030)
* [build] add toolchain file w/o stdcxx dependency

* [build] link m and gcc lib explicitly

* [ncnn] complete simple stl impl

* [ncnn] adapt for ncnn simplestl

* [test] adapt for ncnn simplestl

* [ncnn] fix missing algorithm and list when simplestl disabled

* [ncnn] fix guard for operator new and delete

* [style] fix the code style

* [build] fix build failed on darwin and emscripten

* [ci] do not import cxx to avoid operator conflict

* [ncnn] add temporary partial_sort impl using bubble sort

heap sort should be used for better perf.

* [ncnn] add std greater and less function

* [ncnn] fix placement new operator overload

* [ncnn] add operator delete with size info

* [build] disable exception, rtti, example and tools when simplestl on

* [build] add toolchain for arm simplestl

* [build] add toolchain for aarch64 simplestl

* [ncnn] move initializer to constructor

* [ncnn] use deteiled type instead of auto

* [ncnn] use plain lib name in target_link_libraries
2020-08-28 09:20:56 +08:00
nihuini d3f0b9f993 try smaller random values 2020-08-17 15:24:21 +08:00
nihuini 5d5a3d1434 conv1x1s1 conv1x1s2 conv3x3s1 winograd pack8 arm fp16sa 2020-08-04 20:05:41 +08:00
nihui aa1a9e90c5 interp shufflechannel arm fp16sa pack8 2020-07-31 00:42:02 +08:00
nihuini df5a7f32d4 enable arm82 fp16sa pack8 test 2020-07-30 18:56:13 +08:00
nihuini 47ae0c151a some shared arm bf16s fp16s implementation 2020-07-28 14:24:49 +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
nihuini 0d6cc01d55 innerproduct handle mish activation, fix naive C testing, fix #1930 2020-07-10 15:48:22 +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