28 Commits

Author SHA1 Message Date
nihui 9f9d4ec815 reduce gpu test cases (#7017) 2026-10-01 23:33:05 +08:00
nihui 5ea98309e3 layer param hardening (#7003)
* harden layer parameter validation

Original patches and author identities:
https://github.com/Tencent/ncnn/pull/6912 (beilzx)
https://github.com/Tencent/ncnn/pull/6919 (FluxMind-O)
https://github.com/Tencent/ncnn/pull/6928 (lxcxjxhx)
https://github.com/Tencent/ncnn/pull/6948 (ktz03)
https://github.com/Tencent/ncnn/pull/6950 (ktz03)
https://github.com/Tencent/ncnn/pull/6971 (LI)
https://github.com/Tencent/ncnn/pull/6974 (LI)
https://github.com/Tencent/ncnn/pull/6977 (LI)

Co-authored-by: beilzx <2069360659@qq.com>
Co-authored-by: FluxMind-O <3283918317@qq.com>
Co-authored-by: lxcxjxhx <lxcxjxhx@users.noreply.github.com>
Co-authored-by: ktz03 <2484593937@qq.com>
Co-authored-by: LI <2484593937@qq.com>
2026-09-15 19:18:46 +08:00
nihui 5e66f094bf avoid test failure on fp16 denormal flush to zero (#6891) 2026-08-05 20:05:07 +08:00
nihui f6f734f44d vulkan int8 kernels (#6751)
* vulkan: add int8 kernels for core layers
Implement Vulkan int8 paths for convolution, convolutiondepthwise, innerproduct, and gemm with scalar fallback and integer dot product shader branches. Add goal.md and enable existing int8 unit tests for Vulkan coverage.
* enable int8 gpu benchmark
2026-06-17 17:39:49 +08:00
nihui 706c4d1964 support 4d mat in more operators (#6737)
Add 4d Mat handling across generic and optimized backends, extend operator tests, and document supported input and output Mat dimensions.
2026-05-22 15:31:01 +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 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 f893d2440d innerproduct allow 1 height gemm (#4730) 2023-05-17 10:44:26 +08:00
nihui dd86cebab8 armv8.6 ci and coverage (#4025)
* asimdfhm in fc
* move neon bf16 conversion function to arm_usability header
* fix cmake option
* fix build with newer gcc
* arm84 coverage
* arm asimdfhm optimization for innerproduct gemm fp16s
2022-07-14 14:27:47 +08:00
nihui 440bfdd2cc x86 f16c optimization for innerproduct (#3944) 2022-06-23 19:00:33 +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
zhiliu6 814f89ef1a Fuse HardSwish activation into Convolution and InnerProduct (#3233)
* add general fused activation
* add NCNN_FORCE_INLINE option
2021-10-11 15:55:43 +08:00
nihui 7e1aaa5828 cmake option NCNN_INT8 (#2839) 2021-04-14 12:49:35 +08:00
nihui a48bf43ef7 test conv/fc int8 with activation 2021-03-27 20:06:18 +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
nihuini f437bcdd4c enable fp16s and int8s on newer adreno/mali, actually enable int8 tests 2021-01-28 16:31:29 +08:00
nihui 74451897cb handle gemm in innerproduct (#2607) 2021-01-18 22:34:47 +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 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
nihuini 0d6cc01d55 innerproduct handle mish activation, fix naive C testing, fix #1930 2020-07-10 15:48:22 +08:00
Tijmen Verhulsdonck 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
nihui 3ef995ed1e format code style and setup restyled.io (#1840) 2020-06-13 22:17:51 +08:00
nihuini b2d9325c0d test activation fusion 2020-04-23 14:52:22 +08:00
nihui 979dd5fd11 test does not need to provide data type options 2020-04-12 19:28:04 +08:00
nihuini 85d5e5d3e4 fix innerproduct vulkan pack8 and arm neon, disable packing_layout for int8 test 2020-04-05 17:50:07 +08:00
nihui 0f7e7bca02 shader shape specialization constant and basic local group size partition (#1523)
* use Mat class for Shape description

* shape specialization constant in compute shader

* wip

* wip

* test forward_inplace, add binaryop unaryop sigmoid test

* fix arm unaryop test

* fix arm binaryop test

* make shape hint optional, cast int8 to fp32, add cast test

* wip

* follow the good and old local size setting for conv1x1

* the optimal local size rewrite

* fix build on msvc

* add permute shader for all packing layout, add permute test

* concat and slice patial shape constant, slice test

* fix slice test

* interp test

* add lrn test, test packing layout implicitly

* add eltwise test

* add normalize test

* add instancenorm test

* reorg shape constant

* simple local group size partition

* add shape constant param
2020-02-17 15:45:29 +08:00
nihuini 5fbd56b12f add innerproduct test 2020-01-07 19:32:34 +08:00