The continuous development of privacy-preserving technologies has increasingly enhanced data security, but it also poses challenges to program performance. This contradiction is particularly prominent in resource-constrained scenarios. Related algorithms often contain computational loops. Mapping the precision-tolerant parts of these loops to a low-precision form to obtain performance improvement is a way to alleviate this contradiction. Therefore, under the LLVM (Low-Level Virtual Machine) framework, this paper proposes an automatic mixed-precision code generation method for loop programs. First, the method preprocesses input data to eliminate type conversion operations in data flows. Subsequently, corresponding to the modified data formats, a type conversion optimization strategy is proposed for low-precision computations to accelerate execution speed. Finally, mixed-precision code sequences are generated through sampled analysis of input data combined with error thresholds. Experimental results demonstrate that, under acceptable error tolerance thresholds, the proposed method effectively improves computational speed and minimizes error accumulation. Using the computational speed of high-precision programs as the baseline, the mixed-precision implementation achieves an average 17% improvement in computing performance.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Research on Mixed-Precision Optimization Compilation Techniques for Loop Programs in Privacy-Preserving Computing

  • Fan Luo,
  • Yonghua Hu,
  • Huifu Zhang,
  • Yüxiang Gao,
  • Anxing Xie

摘要

The continuous development of privacy-preserving technologies has increasingly enhanced data security, but it also poses challenges to program performance. This contradiction is particularly prominent in resource-constrained scenarios. Related algorithms often contain computational loops. Mapping the precision-tolerant parts of these loops to a low-precision form to obtain performance improvement is a way to alleviate this contradiction. Therefore, under the LLVM (Low-Level Virtual Machine) framework, this paper proposes an automatic mixed-precision code generation method for loop programs. First, the method preprocesses input data to eliminate type conversion operations in data flows. Subsequently, corresponding to the modified data formats, a type conversion optimization strategy is proposed for low-precision computations to accelerate execution speed. Finally, mixed-precision code sequences are generated through sampled analysis of input data combined with error thresholds. Experimental results demonstrate that, under acceptable error tolerance thresholds, the proposed method effectively improves computational speed and minimizes error accumulation. Using the computational speed of high-precision programs as the baseline, the mixed-precision implementation achieves an average 17% improvement in computing performance.