18 Commits

Author SHA1 Message Date
nihui 41f031e045 reduce redundant tests that do not contribute to coverage (#7042)
* adjust tests
* opt shader coverage op
* update gpu_coverage.cpp atomicor coalesce
2026-10-05 08:57:20 +08:00
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 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 eea3fc9b41 optimize vulkan global pooling (#5191)
Co-authored-by: nihui <nihui@users.noreply.github.com>
Co-authored-by: michaelcai <michaelcai@tencent.com>
2023-12-01 19:23:41 +08:00
nihui 4f135e07bf implement convolution1d and pooling1d (#3035)
* implement convolution1d and pooling1d

* add conv1d pool1d test

* fuse convolution1d activation

* update operator doc

* fix vulkan adpative pooling
2021-06-30 20:19:19 +08:00
nihui c1ce8ea84d add more test 2021-06-19 10:48:06 +08:00
Guoxia Wang 609f63c57e support PyTorch AdaptiveAvgPool2d and AdaptiveMaxPool2d (#2546)
* support pytorch adaptive pool
* support onnx2ncnn adaptive pool convert
* support ncnnoptimize adaptive pool param write

* fix adaptive pool out_shape order

* fix adaptive pool out_shape order, H and W can be either a int
add test case, set support_vulkan = false Pooling_vulkan::create_pipeline

* review adaptive pool

* fix typo

* add adaptive pool forward in pooling_x86.cpp pooling_arm.cpp
fix out_w, out_h id naming convention

* fix typo

* don't support packing, bf16, int8, image for adaptive pool

* Restyled by clang-format

* Restyled by astyle

* Restyled by clang-format

* Restyled by astyle

Co-authored-by: Restyled.io <commits@restyled.io>
2021-01-07 08:39:06 +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 fb4daa5c96 reshape packing with permute, fix #1909 2020-07-04 20:09:53 +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
nihui 15a4b2c878 test pad same mode 2020-05-25 21:38:56 +08:00
nihui 979dd5fd11 test does not need to provide data type options 2020-04-12 19:28:04 +08:00
nihui 839c4c4e34 smaller test size 2020-03-01 20:19:11 +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
nihui 34db884906 pooling test, the more naive avgpool_count_include_pad==0 path 2020-01-12 20:15:12 +08:00