30 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 6bc338e561 c-api / pyncnn expose more option setter getter (#6489) 2026-01-06 12:48:43 +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 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
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
nihui 0dbe5a7180 possible fix for issue 4735 (#4737) 2023-05-22 10:41:35 +08:00
Fangjun Kuang 1b83fe4f16 Support mat.numpy() in Python (#4356) 2022-11-18 15:47:02 +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
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
Cai Shanli 8cc8cd716a Add get input and output names (#2890) 2021-05-17 19:11:37 +08:00
Cai Shanli e9a61b3e64 fix python return value policy (#2756) 2021-03-16 21:46:53 +08:00
nihui 67e24e0703 use local pool allocator (#2736)
* use local pool allocator

* detach extract feat from local allocator

* fix test
2021-03-16 16:23:28 +08:00
Cai Shanli 64ef781a9c add test python vulkan (#2754)
* add test python vulkan

* add python vulkan ci on linux with 3.6 and 3.8

* fix ci vulkan icd
2021-03-15 23:00:33 +08:00
Cai Shanli f5b307689b fix net and extractor destroy order when use vulkan (#2732) 2021-03-13 20:54:06 +08:00
Cai Shanli 69eee9228a add pytest extractor (#2598) 2021-01-19 17:39:13 +08:00
Cai Shanli 2785398eca add pytest net (#2593)
* add pytest net

* fix typo error

* fix header year
2021-01-15 15:41:17 +08:00
Cai Shanli 30e949bd8b add pytest allocator (#2584) 2021-01-11 23:27:13 +08:00
Cai Shanli e246dba39b add pytest option (#2587) 2021-01-11 23:26:44 +08:00
Cai Shanli 6dc21825eb add python build ci on mac and windows (#2566)
add test mat, blob and paramdict
fix README.md build
print mat'data in python
2021-01-07 19:28:25 +08:00
Cai Shanli a5560340e0 add python build ci (#2550)
fix build python with lastest ncnn
2021-01-05 23:30:50 +08:00
Cai Shanli bf845a6fe3 add python (#2514)
* add python
* check elempack when convert ncnn.Mat to numpy.ndarray
fix build with NCNN_STRING=OFF
2020-12-30 10:40:27 +08:00