# US 2023/0409663 A1 · Approach for sensitivity analysis of arbitrary multi-physics simulations using automatic differentiation

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

- Number: US 2023/0409663 A1
- Document ID: US20230409663A1
- Status: Published application
- Kind: A1
- Application number: 18/212,116
- Filed: 2023-06-20
- Published: 2023-12-21
- Earliest claimed: 2022-06-21
- Assignees: Luminary Cloud, Inc.
- Applicants: Luminary Cloud, Inc.
- Inventors: Klaus Leppkes; Michael Thomas Mara; Juan José Alonso
- Web page: https://patentgrep.com/patent/US20230409663A1

## CPC

- G06F 8/451: {Code distribution (considering CPU load at run-time G06F9/505; load rebalancing G06F9/5083)}
- G06F 17/11: for solving equations {, e.g. nonlinear equations, general mathematical optimization problems (optimization specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06F 8/456: {Parallelism detection}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

An automatic differentiation (AD) technique and implementation processes multi-physics solver code entirely on graphics processing units (GPUs) to automatically differentiate one or more outputs of the code with respect to one or more inputs. The technique provides a “factory” framework that ingests arbitrarily complex solver code to produce a version of the code that is automatically differentiated (AD code) and mapped to the GPUs. The technique provides a derivative of the solver code output with respect to the inputs that enables analysis of the output of the computed solver code with initially provided inputs coherent with sensitivity analysis of that output as the inputs are changed. The adjoint information derived from solver code execution (AD code) computed by the AD technique may also be used to estimate one or more estimates of the numerical error in a solution to the physical simulation.

## Claims

### Claim 1

A non-transitory computer readable medium including program instructions for execution on hardware resources, the program instructions configured to:
ingest a physical simulation solver into an automatic differentiation (AD) framework running on the hardware resources provided by a data center;
generate a version of the physical simulation solver that is automatically differentiated (AD code);
organize the AD code for execution on specialized accelerator resources (accelerators) provided by the data center according to simulation and differentiation kernels configured for concurrent execution on pipeline architectures of the accelerators such that derivative information computed using the pipeline architecture is integrated between the simulation and differentiation kernels without input/output (I/O) operations outside the accelerator pipeline architecture to other of the hardware resources or to permanent storage; and
estimate one or more numerical errors in a solution to the physical simulation solver without the I/O operations using computed derivative information from the concurrent AD code execution to converge the solution to the physical simulation solver to below a user-specified threshold.

### Claim 2 (depends on 1)

The non-transitory computer readable medium of claim 1, wherein the estimated numerical error is combined with mesh refinement to accelerate solution convergence of the physical simulation solver to below the user-specified threshold.

### Claim 3 (depends on 1)

The non-transitory computer readable medium of claim 1, wherein the AD code execution computes the derivative information by switching between calculating adjoint information and tangent information in the solution to the physical simulation solver depending on a relative number of inputs versus outputs as requested by a user.

### Claim 4 (depends on 3)

The non-transitory computer readable medium of claim 3, wherein the adjoint information computation is partitioned into one or more of (i) a kernel for forwarding computed values to a next kernel or (ii) a kernel for reversing flow of computed values such that an adjoint of an input is an output and the adjoint of another output is another input.

### Claim 5 (depends on 4)

The non-transitory computer readable medium of claim 4, wherein the adjoint information computation is partitioned into one or more additional kernels that store intermediate information to support the kernel for reversing the flow of computed values.

### Claim 6 (depends on 3)

The non-transitory computer readable medium of claim 3, wherein the tangent information is used to compute a linearized solution and a linearized error correction to estimate the one or more numerical errors in the solution.

### Claim 7 (depends on 1)

The non-transitory computer readable medium of claim 1, wherein the organization of the AD code partitions primal and adjoint solvers for concurrent execution and spawns a number of threads to saturate a compute capability of the accelerators.

### Claim 8 (depends on 1)

The non-transitory computer readable medium of claim 1, wherein the estimated one or more numerical errors is calculated from an adjoint solution computed on a coarse mesh and interpolated on a finer coarser specified by the user for the physical simulation solver.

### Claim 9 (depends on 8)

The non-transitory computer readable medium of claim 8, wherein the estimated one or more numerical errors includes calculating a remaining error via one of (i) direct injection and approximation of solutions for the coarser mesh into the user specified mesh, or (ii) injecting the solutions for the coarser mesh and the computed adjoint into the user specified mesh and performing a partially converged solution.

### Claim 10 (depends on 1)

The non-transitory computer readable medium of claim 1, wherein the program instructions for execution on the hardware resources further includes program instructions to:
in response to the estimated numerical error being greater than the user-specified threshold, adaptively refine a current mesh of the physical simulation solver and continue execution of the physical simulation solver.

### Claim 11

A method for executing a physical simulation solver comprising:
ingesting the physical simulation solver at an automatic differentiation (AD) framework running on hardware resources provided by a data center;
generating a version of the physical simulation solver that is automatically differentiated (AD code);
organizing the AD code for execution on specialized accelerator resources (accelerators) provided by the data center according to simulation and differentiation kernels configured for concurrent execution on pipeline architectures of the accelerators such that derivative information computed using the pipeline architecture is integrated between the simulation and differentiation kernels without input/output (I/O) operations outside the pipeline accelerator architecture to other of the hardware resources or to permanent storage; and
estimating one or more numerical errors in a solution to the physical simulation solver without the I/O operations using computed derivative information from the concurrent AD code execution to converge the solution to the physical simulation solver to below a user-specified threshold.

### Claim 12 (depends on 11)

The method of claim 11, wherein the estimated numerical error is combined with mesh refinement to accelerate solution convergence of the physical simulation solver to below the user-specified threshold.

### Claim 13 (depends on 11)

The method of claim 11, wherein the AD code execution computes the derivative information by switching between calculating adjoint information and tangent information in the solution to the physical simulation solver depending on a relative number of inputs versus outputs as requested by a user.

### Claim 14 (depends on 13)

The method of claim 13, wherein the adjoint information computation is partitioned into one or more of (i) a kernel for forwarding computed values to a next kernel or (ii) a kernel for reversing flow of computed values such that an adjoint of an input is an output and the adjoint of another output is another input.

### Claim 15 (depends on 14)

The method of claim 14, wherein the adjoint information computation is partitioned into one or more additional kernels that store intermediate information to support the kernel for reversing the flow of computed values.

### Claim 16 (depends on 13)

The method of claim 13, wherein the tangent information is used to compute a linearized solution and a linearized error correction to estimate the one or more numerical errors in the solution.

### Claim 17 (depends on 11)

The method of claim 11, wherein the organization of the AD code partitions primal and adjoint solvers for concurrent execution and spawns a number of threads to saturate a compute capability of the accelerators.

### Claim 18 (depends on 11)

The method of claim 11, wherein the estimated one or more numerical errors is calculated from an adjoint solution computed on a coarse mesh and interpolated to a finer mesh specified by the user for the physical simulation solver.

### Claim 19 (depends on 18)

The method of claim 18, wherein the estimated one or more numerical errors includes calculating a remaining error via one of (i) direct injection and approximation of solutions for the coarser mesh into the user specified mesh, or (ii) injecting the solutions for the coarser mesh and the computed adjoint into the user specified mesh and performing a partially converged solution.

### Claim 20 (depends on 11)

The method of claim 11 further comprising:
in response to the estimated numerical error being greater than the user-specified threshold, adaptively refining a current mesh of the physical simulation solver and continuing execution of the physical simulation solver.
