/dports/misc/mnn/MNN-1.2.0/source/backend/cpu/compute/ |
H A D | SparseConvolutionTiledExecutor.cpp | 25 … int sparseBlockOC, const float* source, float* cache, int depth, in initWeight() argument 29 …function->MNNPackForSparseMatMul_B(dest, NNZMap, dataOffsetMap, sparseBlockOC, cache, outputCount,… in initWeight() 50 auto sparseBlockOC = sparseCommon->args()->LookupByKey("sparseBlockOC")->i(); in SparseConvolutionTiledExecutor() local 53 hP = sparseBlockOC; // should broadcast sparseBlockOC to other caller. in SparseConvolutionTiledExecutor() 64 …eset(Tensor::createDevice<unsigned int>({outputCount / sparseBlockOC + outputCount % sparseBlockOC… in SparseConvolutionTiledExecutor() 75 …float>(), mNNZMap->host<unsigned int>(), mDataOffsetMap->host<int>(), sparseBlockOC, originWeight,… in SparseConvolutionTiledExecutor()
|
H A D | SparseConvolutionTiledExecutor.hpp | 51 …void initWeight(float *dest, unsigned int *NNZMap, int *dataOffsetMap, int sparseBlockOC, const fl…
|
H A D | CommonOptFunction.cpp | 45 for(int j = 0; j < h; j += sparseBlockOC) { in MNNPackForSparseMatMul_B() 62 for (; i + sparseBlockOC <= h; i += sparseBlockOC) { in MNNPackForSparseMatMul_B() 65 if (!MNN::OpCommonUtils::checkAllZeros(source, l, sparseBlockOC, 1)) { in MNNPackForSparseMatMul_B() 66 for (int ioc = 0; ioc < sparseBlockOC; ioc++) { in MNNPackForSparseMatMul_B() 79 source += l * (sparseBlockOC - 1); in MNNPackForSparseMatMul_B() 582 const int sparseBlockOC = 4; in MNNPackedSparseMatMulEpx4() local 594 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4() 832 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4() 975 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4() 1073 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4() [all …]
|
H A D | CommonOptFunction.h | 101 …seMatMul_B(float* dest, unsigned int* NNZMap, int* dataOffsetMap, int sparseBlockOC, const float* … 161 …eMatMul_B)(float* dest, unsigned int* NNZMap, int* dataOffsetMap, int sparseBlockOC, const float* …
|
/dports/misc/mnn/MNN-1.2.0/source/core/ |
H A D | OpCommonUtils.cpp | 395 …NNZElement, size_t& weightBlockNumber, const float* data, size_t h, size_t l, int sparseBlockOC) { in statisticWeightSparsity() argument 400 for (; i + sparseBlockOC <= h; i += sparseBlockOC) { in statisticWeightSparsity() 402 nnzBlock += !checkAllZeros(data, l, sparseBlockOC, 1); in statisticWeightSparsity() 405 data += l * (sparseBlockOC - 1); in statisticWeightSparsity() 413 weightNNZElement = nnzBlock * sparseBlockOC + nnzTail; in statisticWeightSparsity() 418 …& weightBlockNumber, float* data, int oc, int reduceDimLength, float sparsity, int sparseBlockOC) { in fillRandValueAsSparsity() argument 427 int ocEven = (oc / sparseBlockOC) * sparseBlockOC; in fillRandValueAsSparsity() 430 for (; ioc < ocEven; ioc += sparseBlockOC) { in fillRandValueAsSparsity() 433 for (int iblock = 0; iblock < sparseBlockOC; iblock++) { in fillRandValueAsSparsity() 439 data += (sparseBlockOC - 1) * reduceDimLength; in fillRandValueAsSparsity() [all …]
|
H A D | OpCommonUtils.hpp | 42 …tNNZElement, size_t& weightBlockNumber, const float* data, size_t h, size_t l, int sparseBlockOC); 43 …t& weightBlockNumber, float* data, int oc, int reduceDimLength, float sparsity, int sparseBlockOC);
|
/dports/misc/mnn/MNN-1.2.0/test/op/ |
H A D | ConvolutionTest.cpp | 92 …, INTS pads = {0, 0}, MNN::SparseAlgo sparseAlgo = MNN::SparseAlgo_RANDOM, int sparseBlockOC = 1) { argument 134 arg1->i = sparseBlockOC; 174 …, bool relu6 = false, MNN::SparseAlgo sparseAlgo = MNN::SparseAlgo_RANDOM, int sparseBlockOC = 1) { argument 208 arg1->i = sparseBlockOC; 279 arg1->i = sparseBlockOC; 339 generateWeight(weightData, ic, oc, kh, kw, dilation, group, sparseBlockOC); in test() 395 {pad_w, pad_h}, sparseAlgo, sparseBlockOC); in test() 443 assert(sparseBlockOC); in generateWeight() 444 int ocEven = (group * (oc / group) / sparseBlockOC) * sparseBlockOC; in generateWeight() 449 for (; ioc < ocEven; ioc += sparseBlockOC) { in generateWeight() [all …]
|
/dports/misc/mnn/MNN-1.2.0/benchmark/ |
H A D | benchmark.cpp | 118 … int numberThread = 4, int precision = 2, float sparsity = 0.0f, int sparseBlockOC = 1) { in doBench() argument 120 revertor->initialize(sparsity, sparseBlockOC); in doBench() 376 int sparseBlockOC = 1; in main() local 403 sparseBlockOC = atoi(argv[8]); in main() 406 …on=" <<precision << "** sparsity=" <<sparsity << "** sparseBlockOC=" << sparseBlockOC << std::endl; in main() 415 …costs = doBench(m, loop, warmup, forward, false, numberThread, precision, sparsity, sparseBlockOC); in main()
|
/dports/misc/mnn/MNN-1.2.0/tools/cpp/ |
H A D | revertMNNModel.hpp | 20 void initialize(float sparsity = 0.0f, int sparseBlockOC = 1);
|
H A D | revertMNNModel.cpp | 59 void Revert::initialize(float spasity, int sparseBlockOC) { in initialize() argument
|
/dports/misc/mnn/MNN-1.2.0/source/backend/cpu/arm/ |
H A D | CommonOptFunctionNeon.cpp | 326 const int sparseBlockOC = 4; in MNNPackedSparseMatMulEpx4() local 340 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4() 522 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4() 643 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4() 725 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4() 794 for (; ih < (h & (~0x03)); ih += sparseBlockOC) { in MNNPackedSparseMatMulEpx4()
|
/dports/misc/mnn/MNN-1.2.0/tools/converter/source/common/ |
H A D | writeFb.cpp | 172 int sparseBlockOC = 1; in writeFb() local 180 sparseBlockOC = algo.prune_params().simd_oc_pruner_params().oc_blocks(0); in writeFb() 197 …ZElement, weightBlockNumber, param->weight.data(), biasSize, weightSize / biasSize, sparseBlockOC); in writeFb() 205 arg1->i = sparseBlockOC; in writeFb()
|