ncnn is a high-performance neural network inference framework optimized for the mobile platform
1347 matches across 8 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | benchmark/benchncnn.cpp | 1 | // Copyright 2018 Tencent |
| LOW | benchmark/benchncnn_llm.cpp | 1 | // Copyright 2026 Tencent |
| LOW | benchmark/RankCards/Rcards.h | 1 | // Copyright 2017 Tencent |
| LOW | benchmark/RankCards/Rcards.h | 21 | #include <sys/stat.h> |
| LOW | benchmark/RankCards/main.cpp | 1 | // Copyright 2017 Tencent |
| LOW | tools/modelwriter.h | 1 | // Copyright 2019 Tencent |
| LOW | tools/modelwriter.h | 21 | #include "layer/batchnorm.h" |
| LOW | tools/modelwriter.h | 41 | #include "layer/deconvolutiondepthwise3d.h" |
| LOW | tools/modelwriter.h | 61 | #include "layer/hardswish.h" |
| LOW | tools/modelwriter.h | 81 | #include "layer/power.h" |
| LOW | tools/modelwriter.h | 101 | #include "layer/softmax.h" |
| LOW | tools/ncnnoptimize.cpp | 1 | // Copyright 2019 Tencent |
| LOW | tools/quantize/ncnn2int8.cpp | 1 | // Copyright 2019 BUG1989 |
| LOW | tools/quantize/npy.hpp | 21 | */ |
| LOW | tools/quantize/imreadwrite.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/quantize/imreadwrite.cpp | 81 | |
| LOW | tools/quantize/ncnn2table.cpp | 1 | // Copyright 2019 BUG1989 (https://github.com/BUG1989/) Long-term support. |
| LOW | tools/quantize/ncnn2table.cpp | 21 | #include "imreadwrite.h" |
| LOW | tools/onnx/onnx2ncnn.cpp | 1 | // Copyright 2017 Tencent |
| LOW | tools/mlir/tf_types.h | 21 | #include "mlir/IR/BuiltinTypes.h" // from @llvm-project |
| LOW | tools/mlir/tf_types.h | 341 | // - the types are statically equal |
| LOW | tools/mlir/tf_types.h | 361 | // If `ty` is a tensor type and its element type has subtypes, then returns a |
| LOW | tools/mlir/tf_dialect.h | 1 | // Copyright 2020 Tencent |
| LOW | tools/mlir/tf_dialect.cpp | 1 | // Copyright 2020 Tencent |
| LOW | tools/mlir/tf_dialect.cpp | 21 | #include <mlir/IR/Value.h> |
| LOW | tools/mlir/tf_dialect.cpp | 61 | #define GET_OP_LIST |
| LOW | tools/mlir/mlir2ncnn.cpp | 1 | // Copyright 2020 Tencent |
| LOW | tools/mlir/tf_attributes.h | 61 | |
| LOW | tools/caffe/caffe2ncnn.cpp | 1 | // Copyright 2017 Tencent |
| LOW | tools/pnnx/src/utils.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/pass_level3.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/ir.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/pass_level2.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/ir.h | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/pass_level1.cpp | 381 | // auto fun_type = function_constant->output()->type()->expect<torch::jit::FunctionType>(); |
| LOW | tools/pnnx/src/storezip.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/pass_level5.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/pass_level5.cpp | 21 | #include "pass_level5/eval_expression.h" |
| LOW | tools/pnnx/src/pass_level5.cpp | 41 | #include "pass_level5/fuse_silu.h" |
| LOW | tools/pnnx/src/load_tnn.cpp | 1 | // Copyright 2025 Tencent |
| LOW | tools/pnnx/src/load_onnx.cpp | 1 | // Copyright 2024 Tencent |
| LOW | tools/pnnx/src/model_stat.cpp | 1 | // Copyright 2026 Tencent |
| LOW | tools/pnnx/src/load_torchscript.cpp | 1 | // Copyright 2024 Tencent |
| LOW | tools/pnnx/src/pass_ncnn.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/pass_ncnn.cpp | 21 | #include "pass_ncnn/convert_Tensor_slice.h" |
| LOW | tools/pnnx/src/pass_ncnn.cpp | 41 | #include "pass_ncnn/fuse_transpose_matmul.h" |
| LOW | tools/pnnx/src/save_ncnn.cpp | 301 | // if (oprand->params.find("__batch_index") == oprand->params.end()) |
| LOW | tools/pnnx/src/main.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/main.cpp | 21 | #include "pass_level5.h" |
| LOW | tools/pnnx/src/pass_level1/nn_quantized_Linear.cpp | 41 | // for (const auto& n : graph->nodes()) |
| LOW | tools/pnnx/src/pass_level1/nn_quantized_Linear.cpp | 101 | graph.dump(); |
| LOW | tools/pnnx/src/pass_level1/nn_quantized_DeQuantize.cpp | 21 | // void write(Operator* op, const TorchGraphProxy& graph, const TorchModuleProxy& mod) const |
| LOW | tools/pnnx/src/pass_level1/nn_quantized_Conv2d.cpp | 41 | // if (n->kind() == c10::prim::GetAttr && n->s(torch::jit::attr::name) == "_packed_params") |
| LOW | tools/pnnx/src/pass_level1/nn_quantized_Conv2d.cpp | 121 | |
| LOW | tools/pnnx/src/pass_level0/shape_inference.cpp | 1 | // Copyright 2021 Tencent |
| LOW | tools/pnnx/src/pass_onnx/shape_inference.cpp | 481 | // ort_status = ort_api->SetIntraOpNumThreads(ort_session_opt, 4); |
| LOW | tools/pnnx/src/pass_onnx/canonicalize.cpp | 321 | node->set_output(k, function_input_output_remap[output]); |
| LOW | …nx/src/pass_ncnn/fuse_convert_shufflechannel_slice.cpp | 1 | // Copyright 2022 Tencent |
| LOW | tools/pnnx/src/pass_level2/functionize.cpp | 21 | |
| LOW | tools/pnnx/src/pass_level5/eval_expression.cpp | 1 | // Copyright 2021 Tencent |
| 608 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/pnnx/python/setup.py | 5 | |
| LOW | tools/pnnx/python/setup.py | 10 | |
| LOW | tools/pnnx/python/tests/test_naiveinput_export.py | 4 | |
| LOW | tools/pnnx/python/tests/test_naiveinput_export.py | 10 | |
| LOW | tools/pnnx/python/tests/test_naiveinput_convert.py | 4 | |
| LOW | tools/pnnx/python/tests/test_naiveinput_convert.py | 10 | |
| LOW | tools/pnnx/python/tests/test_convert.py | 4 | |
| LOW | tools/pnnx/python/tests/test_convert.py | 10 | |
| LOW | tools/pnnx/python/tests/test_dynamicinput_export.py | 4 | |
| LOW | tools/pnnx/python/tests/test_dynamicinput_export.py | 10 | |
| LOW | tools/pnnx/python/tests/test_dynamicinput_convert.py | 4 | |
| LOW | tools/pnnx/python/tests/test_dynamicinput_convert.py | 10 | |
| LOW | tools/pnnx/python/tests/test_export.py | 4 | |
| LOW | tools/pnnx/python/tests/test_export.py | 10 | |
| LOW | tools/pnnx/python/pnnx/__init__.py | 17 | |
| LOW | tools/pnnx/python/pnnx/__init__.py | 18 | |
| LOW | tools/pnnx/python/pnnx/utils/__init__.py | 4 | |
| LOW | tools/pnnx/python/pnnx/utils/__init__.py | 5 | |
| LOW | tools/pnnx/python/pnnx/utils/export.py | 5 | |
| LOW | tools/pnnx/tests/test_nn_LSTM.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_matmul.py | 6 | |
| LOW | tools/pnnx/tests/test_transformers_electra_attention.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_PixelShuffle.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_gather.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_zeros_like.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_LPPool1d.py | 6 | |
| LOW | tools/pnnx/tests/test_pnnx_fuse_multiheadattention.py | 10 | |
| LOW | tools/pnnx/tests/test_pnnx_fuse_multiheadattention.py | 10 | |
| LOW | tools/pnnx/tests/test_torch_imag.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_index_select.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_Softmax.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_rsqrt.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_ConvTranspose1d.py | 6 | |
| LOW | tools/pnnx/tests/test_transformers_albert_attention.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_min.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_fft_ihfft.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_UpsamplingBilinear2d.py | 6 | |
| LOW | tools/pnnx/tests/test_Tensor_new_empty.py | 6 | |
| LOW | tools/pnnx/tests/test_transformers_qwen3_attention.py | 6 | |
| LOW | tools/pnnx/tests/test_pnnx_eliminate_noop_math.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_LPPool2d.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_ConvTranspose3d.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_stft.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_LocalResponseNorm.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_full.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_bitwise_right_shift.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_Hardsigmoid.py | 6 | |
| LOW | tools/pnnx/tests/test_Tensor_to.py | 6 | |
| LOW | tools/pnnx/tests/test_Tensor_reshape.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_mean.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_ConvTranspose2d.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_istft.py | 6 | |
| LOW | tools/pnnx/tests/test_Tensor_new_full.py | 6 | |
| LOW | tools/pnnx/tests/test_Tensor_unflatten.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_zeros.py | 6 | |
| LOW | tools/pnnx/tests/test_Tensor_expand.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_fft_ifftn.py | 6 | |
| LOW | …ols/pnnx/tests/test_transformers_flaubert_attention.py | 6 | |
| LOW | tools/pnnx/tests/test_nn_AlphaDropout.py | 6 | |
| LOW | tools/pnnx/tests/test_torch_tensor_split.py | 6 | |
| 581 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | python/ncnn/model_zoo/peleenetssd.py | 0 | #method 2, use ncnn.mat->numpy.array to get the result, no memory copy too out = np.array(mat_out) for i in range(len(ou |
| HIGH | python/ncnn/model_zoo/yolov2.py | 0 | #method 2, use ncnn.mat->numpy.array to get the result, no memory copy too out = np.array(mat_out) for i in range(len(ou |
| HIGH | python/ncnn/model_zoo/squeezenetssd.py | 0 | #method 2, use ncnn.mat->numpy.array to get the result, no memory copy too out = np.array(mat_out) for i in range(len(ou |
| HIGH | python/ncnn/model_zoo/mobilenetv2ssdlite.py | 0 | #method 2, use ncnn.mat->numpy.array to get the result, no memory copy too out = np.array(mat_out) for i in range(len(ou |
| HIGH | python/ncnn/model_zoo/mobilenetssd.py | 0 | #method 2, use ncnn.mat->numpy.array to get the result, no memory copy too out = np.array(mat_out) for i in range(len(ou |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/pnnx/python/pnnx/utils/convert.py | 10 | |
| LOW | python/examples/peleenetssd.py | 10 | |
| LOW | python/ncnn/utils/download.py | 38 | |
| LOW | python/ncnn/model_zoo/yolov7.py | 23 | |
| LOW | python/ncnn/model_zoo/yolov7.py | 59 | |
| LOW | python/ncnn/model_zoo/yolov7.py | 191 | |
| LOW | python/ncnn/model_zoo/retinaface.py | 190 | |
| LOW | python/ncnn/model_zoo/yolact.py | 186 | |
| LOW | python/ncnn/model_zoo/yolov8.py | 214 | |
| LOW | python/ncnn/model_zoo/simplepose.py | 38 | |
| LOW | python/ncnn/model_zoo/model_store.py | 92 | |
| LOW | python/ncnn/model_zoo/yolov5.py | 263 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | src/layer/loongarch/loongarch_usability.h | 886 | // Step 1: 32-bit word interleave |
| LOW | src/layer/loongarch/loongarch_usability.h | 900 | // Step 2: 64-bit doubleword interleave |
| LOW | src/layer/loongarch/loongarch_usability.h | 914 | // Step 3: cross-lane 128-bit permute |
| LOW | src/layer/loongarch/loongarch_usability.h | 966 | // Step 1: lane-wise word interleave |
| LOW | src/layer/loongarch/loongarch_usability.h | 972 | // Step 2: lane-wise doubleword interleave |
| LOW | src/layer/loongarch/loongarch_usability.h | 978 | // Step 3: cross-lane 128-bit permute |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/pnnx/README.md | 345 | def load_pnnx_bin_as_parameter(self, archive, key, shape, dtype): |
| LOW | tools/pnnx/tests/test_pnnx_fuse_multiheadattention.py | 348 | def reshape_heads_to_batch_dim(self, tensor, merge_head_and_batch=True): |
| LOW | tools/pnnx/tests/test_pnnx_fuse_multiheadattention.py | 357 | def reshape_batch_dim_to_heads(self, tensor, unmerge_head_and_batch=True): |
| LOW | tools/pnnx/src/ir.cpp | 1773 | fprintf(pyfp, " def load_pnnx_bin_as_parameter(self, archive, key, shape, dtype, requires_grad=True):\n"); |
| LOW | python/tests/test_vulkan_allocator.py | 63 | def test_vk_staging_allocator(): |
| LOW | python/tests/test_vulkan_allocator.py | 90 | def test_vk_weight_staging_allocator(): |
| LOW | python/tests/test_allocator.py | 19 | def test_unlocked_pool_allocator(): |
| LOW | python/tests/test_mat.py | 724 | def test_from_pixels_roi_resize(): |
| LOW | python/tests/test_mat.py | 748 | def test_substract_mean_normalize(): |
| LOW | python/examples/peleenetssd.py | 10 | def draw_detection_objects_seg(image, class_names, objects, mat_map): |
| LOW | docs/developer-guide/kvcache.md | 96 | def add_kv_cache_to_ncnn_param(filename): |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | setup.py | 161 | # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level |
| LOW | tools/pnnx/python/setup.py | 105 | # Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/pnnx/python/pnnx/__init__.py | 23 | except Exception: |
| MEDIUM | docs/developer-guide/kvcache.md | 105 | print(f"Error: The file '{filename}' was not found.") |