Compiler Kernel Optimization via Annotation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Modern compilers often generate sub-optimal binaries due to inflexible heuristics and coarse-grained control options, leading to performance failures in hardware utilization, especially in digital signal processing, where customized processors are used to speed up applications with shared characteristics.

Innovation Solution

The method involves extracting kernels from an application program, performance tuning them with tailored optimization strategies, and annotating the program to implement these strategies using a modular and configurable compiler framework, allowing fine-grained control over compiler behavior and optimization phases.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a compiler uses default optimization strategies for all code, then compilation is fast and simple, but performance is sub-optimal for specific hardware architectures and code patterns

Engineering Contradiction:
Improvebinary generation speedVSAvoidhardware performance utilization
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent segments the code into kernels and divides optimization strategies into separate, configurable modules. Each kernel can be independently analyzed and optimized with specific strategies tailored to its characteristics and the target hardware architecture, rather than applying a uniform default optimization to the entire program.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The optimization strategy is made dynamic and configurable through annotations in the source code. The system can adapt the optimization level and type for different kernels based on hardware characteristics and performance requirements, allowing the compiler to dynamically adjust behavior rather than using fixed default settings.

Inventive Principle:
Principle #15Dynamics

2Reliability

If compiler optimization is made more sophisticated and configurable, then hardware performance utilization improves, but device complexity increases

Engineering Contradiction:
Improvehardware performance utilizationVSAvoidcompiler configuration complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system enables users to control optimization behavior through simple annotations in the source code rather than requiring complex compiler configuration commands. The annotation mechanism allows users to specify optimization preferences directly where needed, making the sophisticated optimization system easier to use and less complex to configure.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent changes the interface parameters for optimization configuration from complex command-line options to simple source code annotations. This transforms the configuration mechanism into something more intuitive and less error-prone, reducing the perceived complexity while maintaining sophisticated optimization capabilities.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If compiler optimizations are made more aggressive to generate efficient code, then binary performance improves, but compilation time increases

Engineering Contradiction:
Improvebinary qualityVSAvoidcompilation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system applies partial optimization to only those kernels that require it, based on their annotations and characteristics. Rather than aggressively optimizing the entire program, the compiler selectively applies optimization strategies to specific kernels, achieving good binary quality for critical sections while maintaining faster compilation times for the overall program.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9081586B2Systems and methods for customizing optimization/transformation/ processing strategies
Publication Date: 2015.07.14 FUTUREWEI TECHNOLOGIES INC
  • US9081586B2 patent drawing
  • US9081586B2 patent drawing
  • US9081586B2 patent drawing

AI summary

A method for tailored compiler optimization is provided. The method includes extracting kernels from an application program, performance tuning the kernels to determine a tailored optimization strategy for each of the kernels, the tailored optimization strategy different than a default optimization strategy of a compiler for each of the kernels, and annotating the application program, using a computer, to identify the tailored optimization strategy determined for each of the kernels. In an embodiment, the method also includes the design and implementation for adjusting a compiler to customize optimization strategies for different kernels.