Commit Graph
17 Commits
Author SHA1 Message Date
nihui 903ec7c2c9 fix overwrite builtin layer destruction (#4732)
* fix overwrite builtin layer destruction

* make modelbin class copyable

* test++
2023-05-17 14:17:41 +08:00
nihui 4f414c1806 implement 4d memorydata (#4074)
* implement 4d memorydata

* fix ncnnoptimize memorydata 4d
2022-07-25 10:31:52 +08:00
nihui 1d0917c83b fix build with very old gcc (#4048)
* clear bom marker, avoid vector data function
2022-07-20 14:46:51 +08:00
nihui 5a35c2b11e load model memory by reference (#3179) 2021-08-18 19:08:20 +08:00
nihui 54c0a13b9f build shared library (#2525)
* build shared lib and enable lto

* reserved for layer and option

* allocator pimpl

* datareader pimpl

* paramdict pimpl, disable copy assign for allocator and datareader

* modelbin pimpl

* net extractor pimpl

* gpu pimple

* disable copy assign vulkandevice, code format

* command pimpl, dummy image readonly

* pipeline pipelinecache pimpl, export platform class

* code format, export simple family

* update ci

* disable lto on android armv7, merge webassembly ci

* link libgcc, fix macos dylib version

* pipeline pimpl, gpu info pimpl

* destroy gpu info after vulkan device

* ignore msvc stl class warning

* fix ncnn_paramdict_get_float return type

* fix vktransfer upload fp16 without flatten, add command test
2021-01-01 22:55:10 +08:00
nihui 3ef995ed1e format code style and setup restyled.io (#1840) 2020-06-13 22:17:51 +08:00
705dd36a31 simplestl is an alternative std vector string implementation (#1762)
* 去掉对stl的依赖

* 头文件名,push_back改正

* 去掉构造托管

* 好像是折腾

* data 的返回改为指针,非指针引用

* resize一处写错

* stdint

* 加入c_str

* 改文件名为小写

* NCNN_SIMPLESTL option

* simplestl default to OFF

* Update linux-x64-cpu-gcc.yml

* Update linux-x64-cpu-gcc.yml

* Update linux-x64-cpu-clang.yml

* drop functional header

* arm32 arm64 simplestl ci

* 修改一处内存泄漏, 去掉编译器警告

* resize时默认量的bug

Co-authored-by: nihuini <nihuini@tencent.com>
Co-authored-by: nihui <shuizhuyuanluo@126.com>
2020-05-15 10:42:44 +08:00
Naiyang Lin ceef2470a5 Add logger.h (#1753) 2020-05-12 19:33:21 +08:00
Sungmann Cho 8f4e8e000f Fix warnings on Visual Studio (#1428)
* Fix warning C4244 in src/layer/normalize.cpp

C4244: '=': conversion from 'double' to 'float', possible loss of data

* Fix warning C4244 in src/layer/requantize.cpp

C4244: 'initializing': conversion from 'double' to 'int', possible loss of data

* Fix warning C4244 in src/mat_pixel_resize.cpp

C4244: '=': conversion from 'double' to 'int', possible loss of data

* Fix warning C4244 in src/mat_pixel.cpp

C4244: '=': conversion from 'int' to 'float', possible loss of data

* Fix warning C4267 in src/modelbin.cpp

C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data

* Fix warning C4244 in src/layer/batchnorm.cpp

C4244: 'initializing': conversion from 'double' to 'float',
    possible loss of data

* Fix warning C4244 in src/layer/padding.cpp

C4244: 'argument': conversion from 'const float' to 'T', possible loss of data

* Fix warning C4244 in src/layer/priorbox.cpp

C4244: '=': conversion from 'double' to 'float',
    possible loss of data
C4244: 'initializing': conversion from 'double' to 'float',
    possible loss of data
2019-12-16 23:18:09 +08:00
Sungmann Cho 447b1369f5 Fix warnings on Visual Studio (#1422)
* Change DataReader::read()'s signature to fix warning C4267

This CL fixes lots of warning "C4267: 'initializing': conversion from
'size_t' to 'int'" in our codebase by matching DataReader::read()'s
signature to fread().

* Fix warnings C4244 and C4267 in tools/ncnnoptimize.cpp

C4244: 'initializing': conversion from 'double' to 'float',
    possible loss of data
C4267: 'initializing': conversion from 'size_t' to 'int',
    possible loss of data

* Fix warning C4244 in src\layer\selu.cpp

C4244: '=': conversion from 'double' to 'float', possible loss of data

* Fix warning C4244 in src\layer\cast.cpp

C4244: '=': conversion from 'double' to 'float', possible loss of data
C4244: 'return': conversion from 'float' to 'signed char', possible loss of data

* Fix warning C4244 in src\layer\psroipooling.cpp

C4244: 'initializing': conversion from 'double' to 'float',
    possible loss of data
C4244: 'initializing': conversion from 'double' to 'int',
    possible loss of data
2019-12-13 16:19:13 +08:00
nihuini 64333429bb data reader wrapper, fix #1325 2019-10-25 19:18:40 +08:00
Natsu 6d1944f2c3 CMake improvement (#1115)
* CMake improvement

* Fix bugs

* Fix typo

* Propagate vulkan dependency

* import vulkan

* add config files, now exported target cmake should be able to find packages

* Propagate no-rtti and no-exception

* Provide a option to control rtti and exception in mobile platform

* Make cmake clean

* Resolve conflicts

* Update CMake
PIE is propagated by INTERFACE_POSITION_INDEPENDENT_CODE

* Remove bad things
2019-07-19 10:55:32 +08:00
nihui a169cec363 core int8 inference, quantize and dequantize, net using flag, caffe2ncnn reads int8 scale table 2018-07-29 16:19:01 +08:00
nihui 6c4c810fda decouple modelbin of different input types, simplify timestamp function 2018-02-16 14:29:26 +08:00
nihuini ccbb94d835 fix build 2018-01-08 10:24:32 +08:00
nihui 2a62a98e1a allow constructing paramdict and modelbin from userside 2018-01-01 18:17:34 +08:00
nihui a181d25098 new model load api, fix #215 2017-12-30 19:55:12 +08:00