IP Library Granted Patent US 12,386,600
Granted Patent B2
US 12,386,600 · App. 18/216,969 · Granted Aug 12, 2025

Compiler transform optimization for non-local functions

Inventor: Keno Fischer (Cambridge, MA)
Assignee: JuliaHub, Inc.
G06F8/443G06F8/447G06F8/51
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,386,600
App. No.
18/216,969
Granted
Aug 12, 2025
Kind
B2
Abstract

Systems and methods for using compiler transforms to transform a non-local function into a local function are disclosed. The systems and methods perform a dynamic inter-procedural analysis before performing reverse-mode automatic differentiation. The dynamic inter-procedural analysis is performed to determine a maximum set of computer program information. A non-local to local transformation is applied to the determined maximum set of computer program information, and each original instruction is mapped to an optic that is represented as an opaque closure in the transformed local function.

Claims (30)

1. A method for performing a compiler transform on code that represents a computer program written in an existing programming language, the method comprising:

receiving, by a graphical user interface, the code from a user that represents the computer program written in the existing programming language, wherein the code includes a plurality of original instructions;

optimizing, by a compiler, the compiler transform on the code that represents the computer program by performing a dynamic inter-procedural analysis of the computer program to determine a maximum set of computer program information that can be determined from the computer program during execution of the computer program;

applying, by the compiler, a non-local to local transformation on the determined maximum set of computer program information to generate a transformed local function;

mapping, by the compiler, each of one or more original instructions of the plurality of original instructions to an optic having a composition property that allows the optic to be combined with another optic;

implementing, by the compiler, a representation of the optic as an opaque closure in the transformed local function; and

generating, by the compiler, a transformed computer program that represents the transformed local function, wherein the transformed computer program is executed to generate a derivative of the computer program.

2. The method of claim 1 , wherein the mapping includes treating a primal function as the optic.

3. The method of claim 1 , wherein the code that represents the computer program defines a mathematical model of a function.

4. The method of claim 1 , wherein the dynamic inter-procedural analysis of the computer program is performed through lattice-based data-flow analysis.

5. The method of claim 1 , wherein the computer program is evaluated on an abstract symbolic domain.

6. The method of claim 1 , wherein the method is applied to a physics-informed neural network or a physics-informed generative adversarial network.

7. The method of claim 1 , wherein the non-local to local transformation includes interleaving a transformation step and an optimization step.

8. The method of claim 7 , wherein the non-local to local transformation is delayed until at least one optimization step has been performed, and wherein, after the at least one optimization step has been performed, the transformed computer program is generated for an n th -order transformation.

9. The method of claim 1 , wherein the non-local to local transformation includes creating a data structure for an n th -order residual such that the non-local to local transformation can be optimized.

10. A system for performing a compiler transform on code that represents a computer program written in an existing programming language, the system comprising:

a computer having a processor that executes a compiler and a graphical user interface, wherein the graphical user interface is adapted to receive the code from a user that represents the computer program written in the existing programming language, wherein the code includes a plurality of original instructions, and wherein the processor is adapted to cause the compiler to:

optimize the compiler transform on the code that represents the computer program by performing a dynamic inter-procedural analysis of the computer program to determine a maximum set of computer program information that can be determined from the computer program during execution of the computer program;

apply a non-local to local transformation on the determined maximum set of computer program information to generate a transformed local function;

map each of one or more original instructions of the plurality of original instructions to an optic having a composition property that allows the optic to be combined with another optic;

implement a representation of the optic as an opaque closure in the transformed local function; and

generate a transformed computer program that represents the transformed local function, wherein the transformed computer program is executed to generate a derivative of the computer program.

11. The system of claim 10 , wherein the mapping includes treating a primal function as the optic.

12. The system of claim 10 , wherein the code that represents the computer program defines a mathematical model of a function.

13. The system of claim 10 , wherein the dynamic inter-procedural analysis of the computer program is performed through lattice-based data-flow analysis.

14. The system of claim 10 , wherein the computer program is evaluated on an abstract symbolic domain.

15. The system of claim 10 , wherein the method is applied to a physics-informed neural network or a physics-informed generative adversarial network.

16. The system of claim 10 , wherein the non-local to local transformation includes interleaving a transformation step and an optimization step.

17. The system of claim 16 , wherein the non-local to local transformation is delayed until at least one optimization step has been performed, and wherein, after the at least one optimization step has been performed, the transformed computer program is generated for an n th -order transformation.

18. The system of claim 10 , wherein the non-local to local transformation includes creating a data structure for an n th -order residual such that the non-local to local transformation can be optimized.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 30, 2023
From: FISCHER, KENO
To: JULIA COMPUTING, INC.
Reel/Frame 064129/0789 →
CHANGE OF NAME Recorded Jun 30, 2023
From: JULIA COMPUTING, INC.
To: JULIAHUB, INC.
Reel/Frame 064190/0629 →
Continuity (3)
Continuation PCTUS2022011245 · Jan 5, 2022
Provisional Application 63133949 · Jan 5, 2021
Related Publication 20230342124A1 · Oct 26, 2023
References Cited (13)
US 20080263525A1 · Berg et al. · 2008 [cited by applicant]
US 20090077543A1 · Siskind et al. · 2009 [cited by applicant]
US 20180113685A1 · Gschwind · 2018 [cited by examiner]
US 20180113689A1 · Gschwind · 2018 [cited by examiner]
US 20180113691A1 · Gschwind · 2018 [cited by examiner]
US 20180113693A1 · Gschwind · 2018 [cited by examiner]
US 20180113694A1 · Gschwind · 2018 [cited by examiner]
US 20180113697A1 · Gschwind · 2018 [cited by examiner]
US 20180329699A1 · Gschwind · 2018 [cited by examiner]
US 20190096035A1 · Li et al. · 2019 [cited by applicant]
WO 2020214075A1 · 2020 [cited by applicant]
WIPO, International Preliminary Report on Patentability for corresponding PCT Patent Application No. PCT/US22/11245, dated Jul. 4, 2023, 8 pages. [cited by applicant]
ISA/US; International Search Report and Written Opinion for International Patent Application No. PCT/US22/11245 dated Mar. 30, 2022, 9 pages. [cited by applicant]