IP Library › Granted Patent US 12,645,499
Granted Patent B2
US 12,645,499 · App. 17/718,008 · Granted Jun 2, 2026

Intelligent preemption system

Inventors: Edward Lee Kim-Koon (Venice, CA); Farid Zare Seisan (San Diego, CA)
Assignee: Snap Inc.
G06F9/5027
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,645,499
App. No.
17/718,008
Granted
Jun 2, 2026
Kind
B2
Abstract

Systems and methods herein describe an intelligent preemption system. The preemption system identifies a high priority task and a low priority task that are running on a processor, estimates a preemption save time and an execution time for the low priority task using a machine learning model trained to analyze historical preemption data, determines that the estimate preemption save time for the low priority task satisfies a first preemption condition and that the estimated execution time for the low priority task satisfies a second preemption condition, and in response to determining first preemption condition and second preemption condition are satisfied, scheduling a preemption event associated with the high priority task and the low priority task.

Claims (49)

1 . A method comprising:

identifying, by a graphics processing unit (GPU), a high priority task and a low priority task that are running on the GPU;

monitoring, by the GPU, performance metrics of the low priority task;

estimating, by the GPU, a preemption save time and an execution time for the low priority task using a machine learning model trained to analyze historical preemption data;

based on the monitored performance metrics, determining, by the GPU, that the estimated preemption save time for the low priority task satisfies a first preemption condition, the first preemption condition comprising the estimated preemption save time for the low priority task exceeds the estimated execution time less a time until the low priority task is interrupted exceeding;

determining, by the GPU, that the estimated execution time for the low priority task satisfies a second preemption condition;

in response to determining that the estimated preemption save time satisfies the first preemption condition and determining that the estimated execution time for the low priority task satisfies the second preemption condition, scheduling, by the GPU, a preemption event associated with the high priority task and the low priority task; and

executing, by the GPU, the preemption event to switch execution from the low priority task to the high priority task on the GPU at a specified time.

2 . The method of claim 1 , wherein the machine learning model is a recurrent neural network.

3 . The method of claim 1 , further comprising:

estimating an execution time for the high priority task using the machine learning model.

4 . The method of claim 1 , further comprising:

receiving the preemption save time and the execution time for the low priority task as input from a user of a client device.

5 . The method of claim 1 , wherein the second preemption condition comprises a time until a deadline exceeding the estimated execution time less the time until the low priority task is interrupted plus an estimated execution time of the high priority task.

6 . The method of claim 1 , wherein the preemption save time and execution time for the low priority task are estimated based on at least one of: GPU clock cycles, memory usage, or task progress state.

7 . The method of claim 6 , wherein the historical preemption data comprises an average amount of time that the high priority task uses the GPU.

8 . A system comprising:

a graphics processing unit (GPU); and

a memory storing instructions that, when executed by the GPU, cause the system to:

identify, by the GPU a high priority task and a low priority task that are running on the GPU,

monitor, by the GPU, performance metrics of the low priority task;

estimate, by the GPU, a preemption save time and an execution time for the low priority task using a machine learning model trained to analyze historical preemption data;

based on the monitored performance metrics, etermine, by the GPU, that the estimated preemption save time for the low priority task satisfies a first preemption condition, the first preemption condition comprising the estimated preemption save time for the low priority task exceeds the estimated execution time less a time until the low priority task is interrupted exceeding;

determine, by the GPU, that the estimated execution time for the low priority task satisfies a second preemption condition;

in response to determining that the estimated preemption save time satisfies the first preemption condition and determining that the estimated execution time for the low priority task satisfies the second preemption condition, schedule, by the GPU, a preemption event associated with the high priority task and the low priority task; and

execute, by the GPU, the preemption event to switch execution from the low priority task to the high priority task on the GPU at a specified time .

9 . The system of claim 8 , wherein the machine learning model is a recurrent neural network.

10 . The system of claim 8 , wherein the instructions further configure the system to:

estimate an execution time for the high priority task using the machine learning model.

11 . The system of claim 8 , wherein the instructions further cause the system to:

receive the preemption save time and the execution time for the low priority task as input from a user of a client device.

12 . The system of claim 8 , wherein the second preemption condition comprises a time until a deadline exceeding the estimated execution time less the time until the low priority task is interrupted plus an estimated execution time of the high priority task.

13 . The system of claim 8 , wherein the preemption save time and execution time for the low priority task are estimated based on at least one of: GPU clock cycles, memory usage, or task progress state.

14 . The system of claim 13 , wherein the historical preemption data comprises an average amount of time that the high priority task uses the GPU.

15 . A non-transitory computer-readable storage medium, the computer-readable storage medium including instructions that when executed by a computer, cause the computer to:

identify, by a graphics processing unit (GPU), a high priority task and a low priority task that are running on the GPU;

monitor, by the GPU, performance metrics of the low priority task;

estimate, by the GPU, a preemption save time and an execution time for the low priority task using a machine learning model trained to analyze historical preemption data;

based on the monitored performance metrics, determine, by the GPU, that the estimated preemption save time for the low priority task satisfies a first preemption condition, the first preemption condition comprising the estimated preemption save time for the low priority task exceeds the estimated execution time less a time until the low priority task is interrupted exceeding;

determine, by the GPU, that the estimated execution time for the low priority task satisfies a second preemption condition;

in response to determining that the estimated preemption save time satisfies the first preemption condition and determining that the estimated execution time for the low priority task satisfies the second preemption condition, schedule, by the GPU, a preemption event associated with the high priority task and the low priority task; and

execute, by the GPU, the preemption event to switch execution from the low priority task to the high priority task on the GPU at a specified time.

16 . The computer-readable storage medium of claim 15 , wherein the machine learning model is a recurrent neural network.

17 . The computer-readable storage medium of claim 15 , wherein the instructions further cause the computer to:

estimate an execution time for the high priority task using the machine learning model.

18 . The computer-readable storage medium of claim 15 , wherein the instructions further cause the computer to:

receive the preemption save time and the execution time for the low priority task as input from a user of a client device.

19 . The computer-readable storage medium of claim 15 , wherein the second preemption condition comprises a time until a deadline exceeding the estimated execution time less the time until the low priority task is interrupted plus an estimated execution time of the high priority task.

20 . The computer-readable storage medium of claim 15 , wherein the preemption save time and execution time for the low priority task are estimated based on at least one of: GPU clock cycles, memory usage, or task progress state.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 19, 2024
From: LEE KIM-KOON, EDWARD; ZARE SEISAN, FARID
To: SNAP INC.
Reel/Frame 067768/0064 →
Continuity (1)
Related Publication 20230325243A1 · Oct 12, 2023
References Cited (13)
US 7451447B1 · Deshpande · 2008 [cited by examiner]
US 20140114717A1 · Davis · 2014 [cited by examiner]
US 20180373562A1 · Roberts · 2018 [cited by examiner]
US 20200272444A1 · Nilsen · 2020 [cited by applicant]
US 20210312241A1 · Kaufmann · 2021 [cited by examiner]
US 20220301095A1 · Dagani · 2022 [cited by examiner]
US 20230297416A1 · Covell · 2023 [cited by examiner]
EP 2581829 · 2013 [cited by applicant]
WO 2006016283 · 2006 [cited by applicant]
WO WO2023200636A1 · 2023 [cited by applicant]
“International Application Serial No. PCT US2023 017463, International Search Report mailed Jul. 4, 2023”, 3 pgs. [cited by applicant]
“International Application Serial No. PCT US2023 017463, Written Opinion mailed Jul. 4, 2023”, 7 pgs. [cited by applicant]
“International Application Serial No. PCT/US2023/017463, International Preliminary Report on Patentability mailed Oct. 24, 2024”, 9 pgs. [cited by applicant]