Unified Intermediate Representation for Secure Heterogeneous Compilation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current frameworks for heterogeneous computing platforms require developers to ship source code for shaders and kernels, which can expose sensitive information, and lack a unified approach to compile code for various CPU and GPU architectures, necessitating embedded compilers on end-user devices.
Innovation Solution
A system that compiles source code into a unified intermediate representation (IR), allowing for decoupling from the execution environment, enabling distribution and compilation on end-user devices, where the IR is converted into executable binaries for specific hardware, with kernels and shaders retrieved at runtime for execution on GPUs or CPUs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If source code is shipped for shaders and kernels, then developers can execute code on various GPUs, but sensitive information is exposed
Solution Approach 1:
The patent introduces an intermediate representation (IR) as a mediator between the source code and the target GPU code. The source code is compiled to IR format, which is then distributed instead of the original source code. This IR serves as an intermediary that preserves the necessary computational information while hiding the sensitive source code, thus resolving the contradiction between code portability and source code protection.
2Adaptability or versatility
If embedded compilers are provided on end-user devices, then code can be compiled for specific hardware, but device complexity increases
Solution Approach 1:
The patent applies preliminary action by pre-compiling source code to intermediate representation before distribution. The heavy compilation work is performed in advance on the developer's system, and only the lightweight IR needs to be processed on the end-user device. This reduces the complexity of the embedded compiler on end-user devices while maintaining hardware-specific compilation capability.
3Productivity
If source code is distributed, then code can be executed on different architectures, but security is compromised
Solution Approach 1:
The patent uses copying by creating an intermediate representation copy of the source code for distribution. Instead of distributing the original source code, a transformed copy in IR format is provided. This copy contains all necessary execution information but cannot be easily reverse-engineered to reveal the original source code, thus maintaining security while enabling cross-architecture execution.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
A system decouples the source code language from the eventual execution environment by compiling the source code language into a unified intermediate representation that conforms to a language model allowing both parallel graphical operations and parallel general-purpose computational operations. The intermediate representation may then be distributed to end-user computers, where an embedded compiler can compile the intermediate representation into an executable binary targeted for the CPUs and GPUs available in that end-user device. The intermediate representation is sufficient to define both graphics and non-graphics compute kernels and shaders. At install-time or later, the intermediate representation file may be compiled for the specific target hardware of the given end-user computing system. The CPU or other host device in the given computing system may compile the intermediate representation file to generate an instruction set architecture binary for the hardware target, such as a GPU, within the system.