Abstract:
In edge model deployment based on the tensor virtual machine (TVM) compilation stack, the default fixed block size mechanism struggles to accommodate the differential weight distributions across network layers, leading to a structural mismatch between sparse representation capability and hardware execution efficiency. To address this issue, we propose a compiler-oriented Dynamic adaptive block sparsity (DABS) strategy. Built upon a theoretical model of sparsity granularity and storage cost, this method rigorously derives the critical sparsity from the perspectives of information theory and underlying hardware constraints. By constructing a dynamic block selection algorithm, it formulates the sparsification process as a multi-objective optimization problem to adaptively search for the optimal block granularity. Simultaneously, a structural fallback mechanism is introduced to resolve alignment failures in highly sparse regions and effectively suppress index bloating. Experimental results demonstrate that DABS achieves average compression ratios of 1.681 and 1.993 on the Open Neural Network Exchange (ONNX) and TensorFlow Lite (TFLite) benchmarks, respectively. Compared with six mainstream schemes, DABS realizes an ultra-compact model size of 136 kB and a low inference latency of 33.3 ms while maintaining a high accuracy baseline of 89.8%, exhibiting significant Pareto optimality. Furthermore, in on-device evaluations using the Cortex-M55, this strategy demonstrates robust generalization capabilities across diverse architectures, including micro-networks, ResNet backBones, and BERT-tiny, achieving a maximum compression rate of 40.6%. Without the need for retraining, DABS improves the row continuity of sparse matrices by 59.8%. By substantially mitigating the cross-hierarchy I/O burden, it achieves non-linear inference acceleration on real silicon, effectively breaking through the memory wall bottleneck of edge devices and demonstrating immense engineering application value.