Commit Graph

431 Commits

Author SHA1 Message Date
nihui dda2e28bae skip fp16a gpu test (#6820) 2026-07-13 15:13:46 +08:00
nihui f74639deeb gemm block quantization infrastructure for llm decoder style (#6814)
* another mha oob read
2026-07-13 10:13:39 +08:00
nihui 13b6d5318c fix naive mha out-of-bound read (#6812) 2026-07-08 13:55:11 +08:00
nihui 127b414614 reshape support batch to/from dim (#6784) 2026-07-02 19:29:34 +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 9c62afb90c batch infrastructure (#6656)
* batch-aware record upload download
* cast and packing batch
2026-06-17 17:38:53 +08:00
nihui 61b3247dc6 add more oom test (#6759) 2026-05-30 14:59:33 +08:00
nihui 104edd7f78 mips/loongarch: remove dead code and optimize transpose pack (#6749)
* limit test nT, add gemm int8 nT test
2026-05-28 23:02:28 +08:00
nihui b76824882e refactor mips loongArch packing coding style (#6745) 2026-05-26 15:15:01 +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
Lune bedf9c6568 unaryop: extend sign, hyperbolic, expm1 and log1p support (#6675)
Add backend support for new UnaryOp operations across scalar, SIMD and Vulkan paths, including sign, sinh, cosh, asinh, acosh, atanh, expm1 and log1p.

Wire the new ops through onnx2ncnn and pnnx expression conversion, update generated Python emission, and add regression coverage for the new conversion paths.

Fix portability issues for expm1/log1p math declarations, NCNN_SIMPLEMATH builds, ONNX-enabled pnnx linking, and stabilize unary op tests across fp16, bf16 and torch exporter/version differences.

Co-authored-by: nihui <nihuini@tencent.com>
2026-05-21 16:19:58 +08:00
nihui 0f5c6ef2ce massive mips and loongarch optimization (#6662)
Co-authored-by: nihui <171016+nihui@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-19 08:19:35 +08:00
Justin Fung b9c6e636cf RVV1.0 Requantize Layer (#6695) 2026-05-18 16:27:15 +08:00
Justin Fung abfa9d2e6f RVV1.0 Dequantize Layer (#6658) 2026-05-18 15:38:30 +08:00
nihui f6b75ceeb8 add fp16s test, skip cpu test for fp16p (#6724) 2026-05-15 10:14:31 +08:00
nihui 5a4a483293 unroll 16 for convolution x86 bf16s avx512 (#6680) 2026-05-10 16:06:50 +08:00
nihui 10cee2a7bc Fix x86 bf16 GEMM packing on i386 (#6708)
Correct the i386 AVX512BF16 B-tile packing order so dpbf16 consumes k/k+1 pairs instead of adjacent columns. This fixes intermittent x86 32-bit bf16s GEMM failures on AVX512BF16 hosts without disabling AVX512 paths.

Also make the MultiHeadAttention int8 test inputs follow the same dynamic-quantization-safe randomization used by GEMM int8 tests, avoiding values near .5 rounding boundaries while keeping the tensors random and reproducible.
2026-05-09 13:22:23 +08:00
風的彷徨 a53d0d4b42 conv1d gemm with cm (#6587)
Co-authored-by: nihui <nihuini@tencent.com>
2026-05-09 11:48:42 +08:00
Junwha Hong 8da3df96cd Fix BOF in the last channel handling logic of SSE ShuffleChannel (#5735)
Signed-off-by: Junwha Hong <qbit@unist.ac.kr>
Co-authored-by: junwha <17183234+junwha@users.noreply.github.com>
Co-authored-by: nihui <nihuini@tencent.com>
2026-05-09 11:45:33 +08:00
nihui 8c18666821 feat(vulkan): persist pipeline cache (#6702)
Add single-file Vulkan pipeline cache save/load support with strict device, driver, shader, and payload validation. Cache compiled SPIR-V per shader hash alongside the driver pipeline cache blob, add focused cache tests, and document the current Vulkan pipeline cache architecture and usage.

Limit Vulkan layer test cache growth with a shared test-only pipeline cache window so repeated test_layer() calls can still exercise cache reuse.

Co-authored-by: futz12 <56149058+futz12@users.noreply.github.com>

Co-authored-by: CLV-Iclucia <89170890+CLV-Iclucia@users.noreply.github.com>
2026-05-09 09:37:06 +08:00
Lune d0d5063117 [OPT] x86: optimize PixelShuffle with SIMD block transpose (#6690) 2026-04-22 19:42:01 +08:00
Justin Fung 71b1a61f97 RVV 1.0 Quantize Layer (#6636) 2026-04-17 21:44:44 +08:00
ihb2032 086dda45c2 Add RVV implementation for threshold (#6676)
---------

Signed-off-by: ihb2032 <hebome@foxmail.com>
2026-04-14 15:39:54 +08:00
風的彷徨 51d4fcfcb2 Remove ability of cm for bf16s and add sdpa perf (decode & prefill) (#6632)
* add sdpa perf

* apply code-format changes

* unify datetype between nv & khr

* remove bf16p when use cm
2026-04-14 10:37:40 +08:00
nihui e694ecdb56 convolution x86 support bf16 storage (#6626) 2026-04-09 11:25:51 +08:00
ihb2032 18ac4ca83c Add RVV implementation for log (#6638)
* rvv: add log
* add test

Signed-off-by: ihb2032 <hebome@foxmail.com>
2026-04-06 12:15:48 +08:00
ihb2032 74f371181a Add RVV implementation for exp (#6637)
* rvv: add exp
* add test

Signed-off-by: ihb2032 <hebome@foxmail.com>
2026-04-06 12:15:34 +08:00
nihui 371bbad09b gemm x86 support out_elemtype, multiheadattention and sdpa x86 support bf16 storage, skip mha bf16 tests (#6623) 2026-03-31 15:29:45 +08:00
nihui 913badf2a0 x86 interp optimization (#6597) 2026-03-11 19:10:50 +08:00
nihui 5cb7641afa x86: add LayerNorm_x86 bf16s storage support with avx512bf16 dispatch (#6585) 2026-03-08 16:08:59 +08:00
風的彷徨 f698111525 fmod logaddexp floor_divide remainder support for binaryop (#6549) 2026-03-08 00:05:11 +08:00
nihui 081f2b86d9 vulkan deconvolution gemm unified elempack (#6572) 2026-03-02 20:53:51 +08:00
nihui 512c6ca8f4 perf infrastructure (#6570) 2026-03-02 15:45:20 +08:00
nihui f6e1c0cd49 x86 deconvolution packed unified elempack (#6568) 2026-02-28 22:30:58 +08:00
nihui b1a08ae9ed packed shape hint for vulkan layers (#6553) 2026-02-26 14:33:43 +08:00
nihui e5e09d5ee3 readonly mappedfile wrapper class, use_mapped_model_loading option (#6537)
* test mmap loading
2026-02-09 22:15:51 +08:00
nihui e665c48470 sdpa vulkan flash attention with cooperative matrix optimization (#6528)
* disable sm pad on old driver
2026-02-04 14:21:02 +08:00
nihui 21bfe858bc gemm vulkan bf16 cooperative matrix optimization (#6515)
* cannot alias shared memory for output with a and b
* opt bf16p on fp16s
2026-01-20 21:15:04 +08:00
nihui ce2c5659b9 sdpa vulkan (#6514)
* sdpa vulkan
* unroll 2x2
* local memory opt
2026-01-16 17:41:29 +08:00
nihui 419db5e04d net load api wchar_t version (#6491) 2026-01-06 15:33:26 +08:00
nihui 6bc338e561 c-api / pyncnn expose more option setter getter (#6489) 2026-01-06 12:48:43 +08:00
nihui e5639d308d discard pipeline cache for gpu shape hint tests, reduce gpu memory usage under tests (#6486) 2026-01-04 22:57:57 +08:00
nihui 6499fc0348 vulkan bf16 infrastructure (#6469)
* skip gpu bf16 winograd
* update doc
2026-01-04 19:34:50 +08:00
nihui c99cb27c42 unroll n-tile x16 for gemm x86 avx512 (#6434) 2025-12-02 15:54:12 +08:00
nihui 44b88e4f16 test gemm oom (#6429) 2025-11-28 19:09: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
風的彷徨 9d294b2162 spda x86 optimization (using gemm & softmax) (#6421) 2025-11-26 10:43:13 +08:00
nihui 559a8e8cb0 rotaryembed layer (#6407)
* add deepseek_v3 attention test
* fuse non interleaved rotary embed
* fuse t5 layernorm without gamma
* test qwen2 attention
* sdpa pattern ++
2025-11-19 17:28:08 +08:00
nihui 11fb99795b sdpa kvcache (#6405) 2025-11-18 11:05:27 +08:00
nihui d73c0d6fd8 pnnx ncnn convert tensor expand to tile, fix missing tile repeats (#6399) 2025-11-12 10:56:57 +08:00