Commit Graph

3871 Commits

Author SHA1 Message Date
dependabot[bot] 9d62ba3d14 Bump github/codeql-action from 4 to 4.37.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4 to 4.37.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v4...v4.37.4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.37.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-04 03:03:40 +00:00
dependabot[bot] a4d2ea1d44 Bump actions/setup-python from 6 to 7 (#6838)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6 to 7.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-22 14:13:06 +08:00
dependabot[bot] ad47010526 Bump actions/labeler from 6 to 7 (#6842)
Bumps [actions/labeler](https://github.com/actions/labeler) from 6 to 7.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-22 11:06:21 +08:00
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 bd5842174f pnnx reshape improve compatibility with old ncnn (#6806)
* onnx flatten to reshape
2026-07-06 19:23:00 +08:00
nihui 81e8cbffd0 pnnx ci update torch 2.12 (#6796) 2026-07-03 23:46:56 +08:00
nihui b10a8327fb pnnx ncnn legalize global pooling layout (#6795) 2026-07-03 16:21:59 +08:00
nihui 127b414614 reshape support batch to/from dim (#6784) 2026-07-02 19:29:34 +08:00
dependabot[bot] 244f30c8b9 Bump actions/cache from 5 to 6 (#6786)
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-25 10:18:33 +08:00
dependabot[bot] ea028c5398 Bump actions/checkout from 6 to 7 (#6785)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-22 10:33:09 +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 6044512670 fix old gcc build for missing _mm512_set_epi16 intrinsic (#6782) 2026-06-17 16:55:13 +08:00
nihui a5392dd8ad query VK_KHR_shader_subgroup_extended_types features, sanitize fp16 subgroup path (#6780) 2026-06-16 10:36:03 +08:00
nihui b16501a65e fix deconv vulkan out of range write (#6771) 2026-06-04 19:41:31 +08:00
Devin Lai c9827f6539 arm: add RotaryEmbed bf16 NEON support (#6768) 2026-06-03 20:12:17 +08:00
Devin Lai 882f319def arm: add RotaryEmbed NEON implementation (#6760) 2026-05-30 16:40:07 +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
Aleff 5a0288f255 Merge commit from fork
ParamDict::load_param validated the parsed id only against the upper
bound (id >= NCNN_MAX_PARAM_COUNT). A negative id in [-23299, -1] is not
treated as an array key and passed the check, then was used directly as
d->params[id], causing an out-of-bounds write before the params array.
Add a lower-bound check (id < 0) to both the text and binary loaders.
2026-05-28 19:52:27 +08:00
nihui e54f7b1f88 Add workflow_dispatch trigger to release workflow 20260526 2026-05-26 19:30:27 +08:00
nihui e8512c7555 update download links for 20260526 releases (#6747) 2026-05-26 19:28:40 +08:00
nihui 166f07f91d add hmos package (#6746) 2026-05-26 17:28:55 +08:00
nihui b76824882e refactor mips loongArch packing coding style (#6745) 2026-05-26 15:15:01 +08:00
nihui 6107760922 update pybind11 v3.0.4 and remove windows arm64 find python hack (#6744) 2026-05-26 12:27:08 +08:00
nihui d928f2a42a riscv: unified elempack optimization for im2col gemm and winograd convolution (#6740) 2026-05-25 16:29:06 +08:00
dependabot[bot] 2c8c261442 Bump pypa/cibuildwheel from 3.3.1 to 3.4.1 (#6634)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 3.3.1 to 3.4.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases)
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md)
- [Commits](https://github.com/pypa/cibuildwheel/compare/v3.3.1...v3.4.1)

---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
  dependency-version: 3.4.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-25 16:23:49 +08:00
dependabot[bot] 078e5fed71 Bump actions/github-script from 8 to 9 (#6663)
Bumps [actions/github-script](https://github.com/actions/github-script) from 8 to 9.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-25 16:23:38 +08:00
securekim cb137e07dc docs: add guide for AHB zero-copy input on Android (#6733)
* docs: add guide for AHB zero-copy input on Android

Address #5531 - the AHB import API (VkAndroidHardwareBufferImageAllocator,
ImportAndroidHardwareBufferPipeline) has no user-facing docs today and
existing users hit linker errors against the official prebuilt because
build-android.cmd targets -DANDROID_PLATFORM=android-21 which strips the
AHB symbols.

The new page covers build prerequisites (__ANDROID_API__ >= 26),
AImageReader_newWithUsage setup, the per-frame call sequence, per-AHB-
pointer pipeline caching (~5000x setup-cost reduction), and trouble-
shooting for #5531 / #5190.

* docs(ahb): add ex.input(VkMat) format-matching caveat + soften cache bound

Two findings from a follow-up spike on Adreno 830:

- ex.input(VkMat) does NOT auto-convert format. The previous draft's hint
  "// ex.input(\"data\", dst, cmd);" actually crashes if the network was
  loaded with use_fp16_storage / use_fp16_packed (common on Vulkan path) -
  NetPrivate::forward_layer recurses on itself looking for an implicit
  converter that doesn't exist, observed as a ~180-frame stack overflow at
  net.cpp:251. Add a dedicated caveat explaining the failure mode and the
  vkdev->convert_packing workaround, and weaken the snippet hint accordingly.

- AImageReader's AHB pool isn't strictly bounded by maxImages. Under steady
  state it stays at maxImages (3 -> 3 cache_n in 36 consecutive cycles), but
  surface/focus events can transiently push it higher (observed cache_n=7
  with maxImages=3 in one run). Soften the "<= maxImages entries" claim.

* docs(ahb): note cross-vendor validation (Adreno + Mali)

Same import path verified end-to-end on:
  - Adreno 830, Vulkan 1.3.284 (Galaxy S25 Ultra)
  - Mali-G925 Immortalis MC12, Vulkan 1.3.278 (Galaxy Tab S11)

Both report VK_ANDROID_external_memory_android_hardware_buffer spec
version 5 and surface AHARDWAREBUFFER_FORMAT_Y8Cb8Cr8_420 AHBs from the
camera HAL. Only auxiliary usage bits differ between vendors and are
not consumed by this path (Adreno: 0x20103, Mali: 0x20133).
2026-05-25 16:12:29 +08:00
nihui d5569c0369 update riscv ci toolchain and qemu (#6742) 2026-05-25 12:18:57 +08:00
nihui a66dad7390 consolidate updates to README.md (#6739) 2026-05-24 22:22:51 +08:00
噜小噜芋团 cc16734913 fix modelwriter optional weight serialization (#6726)
Co-authored-by: nihui <nihuini@tencent.com>
Co-authored-by: nihui <shuizhuyuanluo@126.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-22 18:36:55 +08:00
nihui 619ea8e0b2 change llm benchmark seqlen from 1024 to 256 (#6738) 2026-05-22 17:04:32 +08:00
YinHanke cda90e0e8a fix x86_64 arch detection when cross-compiling on macos arm64 (#6730) 2026-05-22 15:40:28 +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 5f41567534 Remove outdated msa.h workaround instructions (#6734)
Removed workaround instructions for msa.h header for gcc version < 8.5.
2026-05-21 19:47:44 +08:00
風的彷徨 866b73da7c support erf,elu,gelu,selu simd on arm (#6605)
* arm: refine activation simd helpers

Co-authored-by: nihui <nihuini@tencent.com>
2026-05-21 17:09:47 +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
4ek0 6aa4ca636e docs: fix minor grammar in README (#6732)
Change "considerate about" to "considerate of" for correct English usage.

Co-authored-by: 4ek0 <4ek0@users.noreply.github.com>
2026-05-21 10:20:40 +08:00
Yeuvoir 9db7174bc6 pnnx: fix Conv2d padding tuple normalization (#6694)
Normalize 4-element aten pad values from (left, right, top, bottom) to nn.Conv2d padding order (height, width) when fusing Conv2d modules.

Also add regression coverage for asymmetric ZeroPad2d + depthwise Conv2d to keep the output shape and ncnn pad params correct.
2026-05-21 10:17:58 +08:00
nihui 023dc1821a riscv optimize convolution packed (#6731) 2026-05-20 18:03:26 +08:00
nihui 07ecc257c4 vulkan: workaround llvmpipe atan2 zero case (#6729) 2026-05-19 22:50:42 +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
Layla 3724d10fc8 tools:Move Embed/MHA/RNN/LSTM/GRU weight scale generation to ncnn2table (#6688)
Co-authored-by: nihui <nihuini@tencent.com>
2026-05-18 19:38:07 +08:00
Edwardssss 4681f2e0b8 Optimize x86 fp16s innerproduct gemm to eliminate loop-carried stalls (#6682) 2026-05-18 18:48:09 +08:00
Justin Fung b9c6e636cf RVV1.0 Requantize Layer (#6695) 2026-05-18 16:27:15 +08:00
Edwardssss e01a01c3a0 opt innerproduct and convolutiondepthwise x86 int8 sse4.1 (#6687) 2026-05-18 15:59:14 +08:00
Justin Fung abfa9d2e6f RVV1.0 Dequantize Layer (#6658) 2026-05-18 15:38:30 +08:00