Commit Graph

68 Commits

Author SHA1 Message Date
LI d8227bbe4f Fix Python custom layer factory lifetime (#7049)
* fix(python): scope custom layer factories to Net lifetime

Replace the process-global ten-slot callback table with stable per-Net userdata. Preserve registrations across clear() and destroy layers before releasing their factories.

Add real-binding regression coverage for repeated and simultaneous Nets, numeric and named registrations, reloads, callback lifetime, subclassing and interpreter shutdown.

Fixes #4560

* fix(python): release superseded custom layer callbacks

* fix(python): guard unencodable named custom layer slots
2026-10-12 15:27:04 +08:00
nihui 7f162381ab kvcache allocator (#6901)
* decode benchmark
* reject kvcache batch
* enable mha vulkan gemm out_elempack 1
2026-08-17 15:44:30 +08:00
nihui 127b414614 reshape support batch to/from dim (#6784) 2026-07-02 19:29:34 +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
Integral d72e9dd693 Add a CMake option to use system-provided pybind11 (#6516)
This option enables the use of the pybind11 package available in
the official repositories of Linux distributions.
2026-01-17 21:27:41 +08:00
nihui 3863a56032 no setup-python step with cibuildwheel jobs (#6510)
actions/setup-python overwrites several python env, that could pollute cibuildwheel env
2026-01-14 11:16:19 +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 f5d94bc82e update pybind 3.0.1, fix crash on python 3.14 (#6396) 2025-11-10 16:27:47 +08:00
nihui 63a7a8a590 optional layer support any packing (#6392)
* split gemm tests, enable gemm vulkan any packing
2025-11-07 14:23:53 +08:00
nihui 3ab4b58d1d optional layer support vulkan packing (#6389)
* pyncnn expose layer support vulkan packing
* doc layer support behavior
2025-11-05 16:27:23 +08:00
nihui a514cf5e9c drop deprecated ex.set_num_threads and ex.set_vulkan_compute api (#6307) 2025-09-09 19:07:43 +08:00
nihui b5bc05e2e8 drop vulkan shader pack8 (#6270) 2025-08-22 11:05:59 +08:00
nihui 171b9d1bba use spdx license header, copyright Tencent (#6152) 2025-07-08 11:01:29 +08:00
nihui 24a3b99f1f drop layer support_image_storage and option use_image_storage (#6126)
* fix pyncnn build
2025-06-16 11:23:41 +08:00
nihui b9f98f0d3a always allocate aligned size for 1d/2d mat and vkmat (#6104)
* fix sub mat cstep
* fix embed
* rnn/lstm/gru int8 test without rounding diversity
2025-06-10 15:43:03 +08:00
nihui 5a1544c27b ci release python add armv7l wheel, use native linux-aarch64 host, fix sdist build, build parallel by default, drop s390x and ppcle64 wheel (#6020) 2025-04-25 11:59:02 +08:00
nihui 109e473007 let cmake know the project is aware of new version and stop throwing warnings (#5848) 2025-04-02 14:58:10 +08:00
nihui bf13c30210 define device feature macros for glslang, discover VK_EXT_shader_atomic_float and VK_EXT_shader_atomic_float2 (#5949) 2025-03-28 10:50:11 +08:00
nihui 8211930a6f discover VK_KHR_shader_subgroup_rotate (#5948) 2025-03-26 15:50:11 +08:00
nihui 40f7b4e527 discover all subgroup features and VK_KHR_shader_subgroup_extended_types (#5946) 2025-03-26 14:08:58 +08:00
Shironana 3d224f2790 remove support for windows arm32 (#5811) 2024-12-03 11:05:30 +08:00
Joey Ballentine a0c9e7783d Add python binding for loading bin from memory (#5164) 2024-08-17 13:36:17 +08:00
nihui f2a34ee7ae update pybind11 to 2.12, support numpy 2 (#5525) 2024-06-21 08:41:40 +08:00
dsplvd 3d8b7f8177 Update yolov8.py (#5345)
results is empty when no objects are detected in frame so non iterable error fires. added itrable check on results
2024-02-24 11:53:06 +08:00
Joey Ballentine a7506008c8 Add more gpu-related python bindings (#5165) 2023-12-21 14:50:08 +08:00
JeremyRand 575098640c python: document CMAKE_TOOLCHAIN_FILE env var (#5229)
Co-authored-by: Jeremy Rand <jeremyrand@danwin1210.de>
2023-12-18 11:25:00 +08:00
nihui b4f26237cb in-house vulkan loader (#5130)
* vulkan-driver-loader.md
* static vulkan on apple
2023-11-09 16:58:23 +08:00
Zhenyu ZHAO a6decad15d Python ncnn with vulkan (#5020)
* add option for enabling vulkan in setup.py
* load winograd type options for pybind.
* enable the usage of humbletim/install-vulkan-sdk in ci
* vulkan-loader with release build
* python setup.py install --vulkan=on
* moltenVK for x86_64 macos
* remove universal2  temporarily
2023-10-23 10:50:15 +08:00
JeremyRand 77c4421fc2 load_param_mem pybind (#4924)
Co-authored-by: theflyingzamboni <theaerialzamboni@gmail.com>
2023-08-22 14:10:11 +08:00
nihui 0dbe5a7180 possible fix for issue 4735 (#4737) 2023-05-22 10:41:35 +08:00
triple Mu 18a37a270b Update model_zoo.py (#4495)
support yolov8s ncnn
2023-05-08 14:08:19 +08:00
kennybradley f79daf4071 I added yolov7 tiny to the model zoo since it already exists in the ncnn-assets (#4693) 2023-05-08 10:55:23 +08:00
wyushun 68de8a2128 fix output_indexes name (#4453) 2023-01-08 13:07:41 +08:00
Jiao Dian's Power Plant b07c5fc811 Remove unused imports in python (#4378) 2023-01-04 18:47:16 +08:00
nihui 6647396667 update release ci (#4359)
* update release ci

* find modern glslang

* parallel jobs on windows
2022-11-20 19:38:29 +08:00
Fangjun Kuang 1b83fe4f16 Support mat.numpy() in Python (#4356) 2022-11-18 15:47:02 +08:00
Guo Haria 67f52ba73c Update yolov5.py (#3656)
fix rect position bug.
2022-03-27 15:19:38 +08:00
nihui 920aa79f04 drop x86 avx2 fp16 (#3568) 2022-02-16 22:45:57 +08:00
nihui 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 f4f7fabe27 fix python wheel, parallel 3 for macos tasks (#3396) 2021-12-02 16:45:39 +08:00
Nixon Dutta e8a8e0a874 Corrected the path for python version installation (#3293) 2021-10-20 16:53:55 +08:00
Tijmen Verhulsdonck eaa7e24db6 Added ability to switch AVX/AVX2 during runtime (#3076) 2021-07-14 20:28:15 +08:00
li mengyang be054aacb0 some misspell (#3046)
* just a spell check

* some misspell
2021-07-03 14:47:35 +08:00
uniartisan a9ff73041b fix video load error in python examples[yolov4] (#3005) 2021-06-15 23:04:05 +08:00
Zhiqiang Wang ccc597740f Fixing TypeError assertions in test_extractor.py (#2968)
* Fixing TypeError assertions in pytest

* Add Compiled Python files to gitignore
2021-06-03 14:28:18 +08:00
Zhiqiang Wang be5a912052 Fixing Python classifiers and disable aarch64 (#2949)
* Fixing classifiers of Pypi for local compliler

* Disable aarch64 in building Python
2021-05-25 15:47:11 +08:00
Cai Shanli 8cc8cd716a Add get input and output names (#2890) 2021-05-17 19:11:37 +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
Cai Shanli e9a61b3e64 fix python return value policy (#2756) 2021-03-16 21:46:53 +08:00