<p>The integration of Single Instruction, Multiple Data (SIMD) extensions has become crucial for enhancing computational performance. While loop-level and superword-level vectorization techniques have matured, function-level vectorization remains challenging. Existing OpenMP declare simd mechanisms require repetitive annotations at both function declarations and call sites–particularly cumbersome across separate compilation units–thus limiting their practical applicability. This paper presents Automatic Function-level Vectorization (AFV), a directive-based framework designed to simplify function-level vectorization within OpenMP. We propose managing function vectorization directives at the loop level rather than the function level, thereby extending the OpenMP API with AFV directives. Additionally, we introduce an optimization framework at the intermediate representation stage that automatically inserts vectorization directives into called functions, generating vectorized versions and enhancing loop vectorization that includes function calls. Importantly, this approach remains effective for function calls across compilation units. Experimental evaluation using benchmarks from Intel’s SPMD Program Compiler and SIMD libraries validates the framework’s superiority across four dimensions: in terms of performance, AFV achieves 1.65<InlineEquation ID="IEq1"> <EquationSource Format="TEX">\(\times \)</EquationSource> </InlineEquation> higher performance than OpenMP; in instruction optimization, it reduces instruction count by 12.38% compared to inlined vectorization; for development efficiency, AFV requires 57.86% fewer directives than OpenMP; and in compilation efficiency, it reduces compilation overhead by 39.84% compared to inline optimization methods. These results demonstrate AFV’s advantages in balancing performance optimization with programming productivity.</p>

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

Directive-based automatic function-level vectorization for simplified SIMD exploitation

  • Lili Liu,
  • Bo Zhao,
  • Yingying Li,
  • Ping Zhang,
  • Jinlong Xu,
  • Jinyang Yao

摘要

The integration of Single Instruction, Multiple Data (SIMD) extensions has become crucial for enhancing computational performance. While loop-level and superword-level vectorization techniques have matured, function-level vectorization remains challenging. Existing OpenMP declare simd mechanisms require repetitive annotations at both function declarations and call sites–particularly cumbersome across separate compilation units–thus limiting their practical applicability. This paper presents Automatic Function-level Vectorization (AFV), a directive-based framework designed to simplify function-level vectorization within OpenMP. We propose managing function vectorization directives at the loop level rather than the function level, thereby extending the OpenMP API with AFV directives. Additionally, we introduce an optimization framework at the intermediate representation stage that automatically inserts vectorization directives into called functions, generating vectorized versions and enhancing loop vectorization that includes function calls. Importantly, this approach remains effective for function calls across compilation units. Experimental evaluation using benchmarks from Intel’s SPMD Program Compiler and SIMD libraries validates the framework’s superiority across four dimensions: in terms of performance, AFV achieves 1.65 \(\times \) higher performance than OpenMP; in instruction optimization, it reduces instruction count by 12.38% compared to inlined vectorization; for development efficiency, AFV requires 57.86% fewer directives than OpenMP; and in compilation efficiency, it reduces compilation overhead by 39.84% compared to inline optimization methods. These results demonstrate AFV’s advantages in balancing performance optimization with programming productivity.