# US 2024/0182050 A1 · Method to Execute Functions on Hardware Accelerators in Heterogeneous Automotive Systems with Guaranteed Freedom from Interference

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0182050 A1
- Document ID: US20240182050A1
- Status: Published application
- Kind: A1
- Application number: 18/520,146
- Filed: 2023-11-27
- Published: 2024-06-06
- Earliest claimed: 2022-12-02
- Assignees: TTTech Auto AG
- Applicants: TTTech Auto AG
- Inventors: Arnau CASSADEVALL SAIZ; Ramon SERNA OLIVER
- Web page: https://patentgrep.com/patent/US20240182050A1

## CPC

- B60W 50/06: Improving the dynamic response of the control system, e.g. improving the speed of regulation or avoiding hunting or overshoot
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 9/5038: {considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration (scheduling strategies G06F9/4881 and subgroups)}
- G06F 9/5044: {considering hardware capabilities}
- G06F 9/522: {Barrier synchronisation}
- G06F 2209/509: Offload
- B60W: CONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method and computer system to execute functions in an automotive computer system, wherein a function comprises software components as well as computation kernels. The computer system comprises a hardware accelerator manager component, “HWA”. The HWA enqueues each kernel in one queue of an accelerator, which accelerator is compatible to the kernel, and sorts the kernels within their queues, wherein the HWA enqueues and sorts the kernels according to defined criteria. The HWA receives requests from running software components to execute specific kernels and triggers the execution of requested kernels on their accelerators. The requested kernels are executed on their accelerators taking into account the queues and their sorting order within their queues. The HWA has exclusive control of the accelerators and ensures that a kernel is only executing on its accelerator if no other kernel accelerator is executing simultaneously.

## Claims

### Claim 1

A method to execute automotive functions in a heterogeneous automotive computer system, wherein a function comprises software components as well as computation kernels, and wherein the computer system comprises at least one computation core and one or more hardware accelerator devices, the method comprising:
wherein each core is configured to execute software components,
wherein each accelerator is configured to execute kernels, each kernel is compatible with one or more accelerators, and a kernel can only be executed on a compatible accelerator, and wherein the software components are configured to request, when they are running on a core, the execution of one or more kernels,
wherein the computer system comprises a hardware accelerator manager component, “HWA”, wherein said HWA is configured to manage requests to execute kernels on the accelerators of said computer system,
wherein for each accelerator at least one queue is provided,
wherein the HWA enqueues each kernel in one queue of an accelerator, which accelerator is compatible to the kernel, and wherein the HWA sorts the kernels within their queues,
wherein the HWA enqueues and sorts the kernels according to defined criteria, and wherein the HWA receives, at runtime of the computer system, requests from running software components to execute specific kernels (“requested kernel”),
wherein the HWA triggers the execution of requested kernels on their accelerators,
wherein the requested kernels are executed on their accelerators taking into account the queues and their sorting order within their queues,
wherein the HWA has exclusive control of the accelerators, and wherein the HWA ensures that a kernel is only executing on its accelerator if no other kernel accelerator is executing simultaneously.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the HWA, after receiving a request to execute a kernel, launches said kernel to its accelerators before its execution.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the HWA launches kernels to its accelerators, before said kernels have been requested by a software component.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the HWA enqueues the requested kernels in a queue and sorts the kernels within its queue according to one or more defined criteria.

### Claim 5 (depends on 4)

The method according to claim 4, wherein said defined criteria comprise
a priority of each requested kernel,
the status of the accelerators, in particular if an accelerator is busy or idle,
which kernels are already assigned to an accelerator, and/or
the number of requests enqueued in the accelerator queue(s).

### Claim 6 (depends on 1)

The method according to claim 1, wherein an accelerator to launch a kernel is selected as follows:
the HWA decides, at runtime, on which accelerator said requested kernel has to be launched, or
the HWA, at runtime, executes a search over accelerators, wherein said search may take into account criteria like
selecting an idle accelerator among the set of accelerators that are compatible with the kernel (e.g. an arbitrary idle GPU among all available GPUs in the system),
selecting the least energy consuming accelerator among the set of compatible accelerators,
selecting an accelerator among a set of accelerators that are compatible with the kernel, whereby using said accelerator may result in the lowest overall energy consumption for the entire computer system by selecting an accelerator which is already powered on instead of one which is in sleep mode,
wherein an accelerator is a priori defined, in particular at design time (“offline”), by a user, on which accelerator a requested kernel has to be launched.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the HWA monitors the execution of kernels, in particular with respect to a WCET of a kernel or a defined time-budget for the execution of a kernel, wherein the WCET or the defined time-budget may be included in a kernel descriptor, and/or adds a callback at the end of the kernels, wherein said callbacks can be configured to inform defined software components, or the HWA itself, about the termination of the execution of said kernels.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the HWA performs safety checks before launching a requested kernel on an accelerator, wherein said safety checks may include one or more of the following checks:
i. checking if a request was planned or not;
ii. checking if requests arrive with a higher or lower frequency than defined in the configuration;
iii. checking whether no other kernel, requested by the same or by a different software component, is executing before launching a new one;
iv. checking diagnosis registers, or other available metrics, from the hardware accelerators.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the HWA is a software process running on a user-space service, which software process is configured as a means for communication between the software components and the accelerators.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the HWA is integrated in the computer system in one of the following ways:
(1) HWA is continuously running on a dedicated (exclusive) host core with dedicated resources;
(2) HWA is being activated after a software component sends/triggers a kernel request;
(3) HWA is being activated periodically at defined intervals (e.g., managed and scheduled by a middleware, or according to statically assigned intervals).

### Claim 11 (depends on 1)

The method according to claim 1, wherein kernels, in particular all kernels, each comprise a synchronization point, which is implemented in the code of the kernel, in particular implemented as the first instruction in the kernel code, so that a kernel may already be launched before it is requested and executing until said synchronization point is reached, at which synchronization point the execution is halted, and wherein said kernel resumes execution when a condition for said synchronization point is fulfilled comprising the reception of a defined signal.

### Claim 12 (depends on 1)

The method according to claim 1, wherein kernel descriptors comprise one or more of the additional information:
parameters that can affect the timing scheduling, such as WCET of the kernels, average computation time, earliest execution time, or deadlines, and/or
parameters related to how the kernel will be executed on an accelerator, e.g. a number of work-threads of the accelerator, number of streams/queues of the accelerator,
wherein the launching of kernel requests is performed according to one or more of defined policies, taking said additional information into account, wherein said one or more of the following policies are:
Time-Triggered (TT) policy: each request defines a time for its dispatching, wherein the dispatch order and instant are defined offline;
Earliest Deadline First (EDF) policy: each request defines a deadline, wherein the dispatch order and instant are decided at runtime, whereby kernels with an earliest deadline are dispatched earlier;
Fixed-Priority (FP) policy: each request defines a static priority, wherein the dispatch order and instant are decided at runtime, whereby kernels with a higher priority are dispatched earlier;
First-In-First-Out (FIFO) policy: dispatch order is decided at runtime based on the arrival time of a request.

### Claim 13 (depends on 1)

The method according to claim 1, wherein when or after a kernel finishes execution, the HWA is informed by the kernel's accelerator by a completion notification, and wherein the HWA informs the SWC, which has requested said kernel, about the finalization of the execution of said kernel via a callback.

### Claim 14 (depends on 13)

The method according to claim 13, wherein the SWC reacts to the notification by any of the following actions:
1. requesting the HWA for a memory transfer, in particular a memory transfer related to the results of the kernel execution, or
2. requesting the HWA to launch a second kernel using as input the results of the first kernel, or
3. trigger the execution of a SWC, which execution requires the results of said kernel, or
4. mark, in a list of pending kernels, the execution of said kernel as completed, wherein the SWC realizes any of the above actions 1)-3) when all kernels of said list of pending kernels are marked as completed.

### Claim 15 (depends on 1)

A heterogeneous automotive computer system to execute automotive functions according to anyone of the claim 1.
