Driver-Generated Wrapper for Callable Function Launch
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multi-threaded parallel processing systems, the distinction between callable and launchable functions requires separate versions, leading to replication of changes and the need for manual wrapper functions, which is inefficient and prone to compatibility issues.
Innovation Solution
A driver that recognizes callable functions at load time and generates a second function to translate arguments and launch the callable function, eliminating the need for both callable and launchable versions by creating a wrapper function dynamically.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If separate callable and launchable function versions are maintained, then compatibility with existing function calling conventions is preserved, but code duplication and maintenance complexity increase
Solution Approach 1:
The patent merges the separate callable and launchable function versions into a single unified function version. The driver automatically generates the necessary wrapper code at load time, eliminating the need for developers to maintain separate versions while preserving both calling convention compatibilities.
Solution Approach 2:
The driver performs preliminary action by automatically generating the launchable function wrapper code at load time before the program executes. This preliminary code generation handles the complexity of argument translation and convention conversion, so developers don't need to manually create or maintain separate function versions.
2Adaptability or versatility
If manual wrapper functions are created for each callable function, then launch capability is achieved, but development time and error susceptibility increase
Solution Approach 1:
The system implements self-service by having the driver automatically generate the wrapper functions without requiring developer intervention. The driver inspects the callable function at load time and autonomously creates the appropriate launchable wrapper, eliminating manual development time and reducing errors.
Solution Approach 2:
The driver acts as an intermediary between the callable function and the launch mechanism. It automatically generates the wrapper code that mediates the interaction, translating arguments and managing the calling convention conversion without requiring developers to write the intermediary code manually.
3Reliability
If argument translation is handled manually, then calling convention compatibility is achieved, but implementation complexity and potential for errors increase
Solution Approach 1:
The driver serves as an intermediary that automatically performs argument translation between different calling conventions. It inspects the callable function's signature and generates the appropriate translation logic, ensuring compatibility without requiring developers to manually handle the complex translation rules.
Solution Approach 2:
The patent replaces the manual mechanical process of writing argument translation code with an automated system. The driver uses runtime inspection and code generation to substitute the manual translation process, reducing implementation complexity and improving reliability through consistent automated translation.
Data Source
AI summary
A system and method are provided for launching a callable function. A processing system includes a host processor, a graphics processing unit, and a driver for launching a callable function. The driver is adapted to recognize at load time of a program that a first function within the program is a callable function. The driver is further adapted to generate a second function. The second function is adapted to receive arguments and translate the arguments from a calling convention for launching a function into a calling convention for calling a callable function. The second function is further adapted to call the first function using the translated arguments. The driver is also adapted to receive from the host processor or the GPU a procedure call representing a launch of the first function and, in response, launch the second function.


