IP Library Granted Patent US 12688020
Granted Patent B2
US 12688020 · App. 18/363,654 · Granted Jul 21, 2026

Caching of compiled shader programs in a cloud computing environment

Inventors: Paul Albert Lalonde (Victoria, CA); Franck Diard (Roquefort les pins, FR); Patrick James Neill (Sherwood, OR); Michael Oxford (San Jose, CA); Todd Michael Poynter (Georgetown, TX)
Assignee: NVIDIA Corporation
G06F8/44G06F8/60G06F8/71G06F16/2255G06T1/20G06T1/60H04L67/1095H04L67/34H04L67/568G06N20/00
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 12688020
App. No.
18/363,654
Granted
Jul 21, 2026
Kind
B2
Abstract

Apparatuses, systems, and techniques for caching of compiled shader programs in a cloud computing environment. An initial request for a compiled shader program for an application executed by a first client device is received. The initial request includes a first shader key generated based on first state data. If the compiled shader program is determined, based on the first shader key, to not be stored using a shader cache, the compiled shader program is received from the first client device and stored with the first shader key using the shader cache. A subsequent request for the compiled shader program is received for the application running at a second client device. The subsequent request includes a second shader key generated based on second state data. If the second shader key is determined to match the first shader key, the compiled shader program is transmitted to the second client device.

Claims (68)

1 . A method comprising:

evaluating, by one or more processing devices associated with an application hosting platform responsive to an initial request from a first client device for a compiled shader program associated with an application, one or more performance criteria associated with the application hosting platform and one or more entries of a shader cache hosted by the application hosting platform;

selecting, by the one or more processing devices, an operation from a plurality of operations to obtain the compiled shader program based on the evaluation, the plurality of operations comprising:

transmitting an instruction to the first client device, wherein, after receiving the instruction, the client device generates the compiled shader program and provides the generated compiled shader program to the application hosting platform, or

generating the compiled shader program;

performing, by the one or more processing devices, the operation to obtain the compiled shader program in accordance with the selection;

responsive to obtaining the compiled shader program, storing, by the application hosting platform, the compiled shader program and a first shader key using the shader cache, the first shader key corresponding to a representation of a first hardware state and a first software state of the first client device;

receiving, by the application hosting platform, a subsequent request for the compiled shader program for the application running at a second client device, the subsequent request including a second shader key comprising a hash value generated based on a second hardware state of the second client device and a second software state of the second client device;

determining, by the application hosting platform, whether a first overall state of the first client device matches a second overall state of the second client device based on the first shader key and the second shader key; and

responsive to determining that the first state of the first client device matches the second state of the second client device, transmitting, by the application hosting platform and to the second client device, a subsequent message comprising the compiled shader program.

2 . The method of claim 1 , wherein the representation of the first hardware state and the first software state comprises a hash value of the first shader key that is further generated based on a source code of the requested shader program.

3 . The method of claim 1 , wherein the first software state of the first client device comprises at least one of a driver state of the first client device or a source code for the compiled shader program.

4 . The method of claim 1 , wherein storing the compiled shader program and the first shader key using the shader cache comprises:

responsive to determining that the compiled shader program matches an additional compiled shader program stored at a temporary buffer for the shader cache, updating a counter associated with the additional compiled shader program in view of the compiled shader program;

determining that the updated counter associated with the additional compiled shader program exceeds a threshold value; and

adding at least one of the compiled shader program or the additional compiled shader program to the shader cache associated with the application.

5 . The method of claim 4 , further comprising:

updating an entry of a data structure associated with the shader cache to include a unique identifier associated with the first client device.

6 . The method of claim 4 , further comprising:

responsive to determining that the compiled shader program does not match an additional compiled shader program stored at the temporary buffer, adding the compiled shader program to the temporary buffer; and

initializing a counter associated with the compiled shader program at the temporary buffer.

7 . The method of claim 1 , wherein the application hosting platform comprises a plurality of nodes configured to include a plurality of portions of the shader cache associated with the application, and wherein the initial request for the compiled shader program is received by the one or more processing devices associated with a first node of the plurality of nodes.

8 . The method of claim 7 , further comprising:

determining that the compiled shader program of the initial request is not included at a first portion of the shader cache hosted by the first node of the plurality of nodes;

identifying a second node of the plurality of nodes that hosts a second portion of the shader cache which includes the compiled shader program of the initial request; and

forwarding the initial request to the identified second node.

9 . The method of claim 1 , further comprising:

responsive to determining that the requested compiled shader program is stored at the shader cache, transmitting the compiled shader program to the first client device.

10 . The method of claim 1 , wherein at least one of the first client device or the second client device comprises a virtual machine instantiated using a cloud computing environment.

11 . The method of claim 1 , further comprising:

obtaining a source code for an additional shader program associated with the application;

generating a compiled version of the additional shader program; and

storing the compiled version of the additional shader program at the shader cache associated with the application.

12 . The method of claim 11 , wherein the source code for the additional shader program is obtained responsive to determining that at least one of the first hardware state or the second software state of one or more of the first client device or the second client device has been modified from a first version to a second version, and wherein the compiled version of the additional shader program is compatible with the second version of the at least one of the hardware state or the software state.

13 . The method of claim 1 , wherein the compiled shader program is generated by the application hosting platform responsive to a determination that one or more computing resource criteria associated with the application hosting platform are satisfied.

14 . A system comprising:

a memory device; and

one or more processing devices, communicatively coupled to the memory device, to:

evaluate, responsive to an initial request from a first client device for a compiled shader program associated with an application, one or more performance criteria associated with an application hosting platform and one or more entries of a shader cache hosted by the application hosting platform; select an operation from a plurality of operations to obtain the compiled shader program based on the evaluation, the plurality of operations comprising:

retrieving the compiled shader program from the shader cache,

transmitting an instruction to the first client device to generate the compiled shader program and provide the generated compiled shader program to the application hosting platform, or

generating the compiled shader program;

perform the operation to obtain the compiled shader program in accordance with the selection;

responsive to obtaining the compiled shader program, store the compiled shader program and a first shader key using the shader cache, the first shader key corresponding to a representation of a first hardware state and a first software state of the first client device;

receive a subsequent request for the compiled shader program for the application running at a second client device, the subsequent request including a second shader key comprising a hash value generated based on a second hardware state of the second client device and a second software state of the second client device;

determine whether a first overall state of the first client device matches a second overall state of the second client device based on the first shader key and the second shader key; and

responsive to determining that the first state of the first client device matches the second state of the second client device, transmit, to the second client device, a subsequent message comprising the compiled shader program.

15 . The system of claim 14 , wherein the representation of the first hardware state and the first software state comprises a hash value of the first shader key that is further generated based a source code of the requested shader program.

16 . The system of claim 14 , wherein the first software state of the first client device comprises at least one of a driver state of the first client device or a source code for the compiled shader program.

17 . The system of claim 14 , wherein to store the compiled shader program and the first shader key using the shader cache, the one or more processing devices are to:

responsive to determining that the compiled shader program matches an additional compiled shader program stored at a temporary buffer for the shader cache, update a counter associated with the additional compiled shader program in view of the compiled shader program;

determine that the updated counter associated with the additional compiled shader program exceeds a threshold value; and

add at least one of the compiled shader program or the additional compiled shader program to the shader cache associated with the application.

18 . The system of claim 17 , wherein the one or more processing devices are further to:

responsive to determining that the compiled shader program does not match an additional compiled shader program stored at the temporary buffer, add the compiled shader program to the temporary buffer; and

initialize a counter associated with the compiled shader program at the temporary buffer.

19 . The system of claim 14 , wherein the application is hosted by an application hosting platform comprising a plurality of nodes configured to include a plurality of portions of the shader cache associated with the application, and wherein the initial request for the compiled shader program is received by a first node of the plurality of nodes.

20 . A non-transitory computer-readable medium storing instructions thereon, wherein the instructions, when executed by a processing device, cause the processing device to:

evaluate, responsive to an initial request from a first client device for a compiled shader program associated with an application, one or more performance criteria associated with an application hosting platform and one or more entries of a shader cache hosted by the application hosting platform;

select an operation from a plurality of operations to obtain the compiled shader program based on the evaluation, the plurality of operations comprising:

retrieving the compiled shader program from the shader cache,

transmitting an instruction to the first client device to generate the compiled shader program and provide the generated compiled shader program to the application hosting platform, or

generating the compiled shader program;

perform the operation to obtain the compiled shader program in accordance with the selection;

responsive to obtaining the compiled shader program, store the compiled shader program and a first shader key using the shader cache, the first shader key corresponding to a representation of a first hardware state and a first software state of the first client device;

receive a subsequent request for the compiled shader program for the application running at a second client device, the subsequent request including a second shader key comprising a hash value generated based on a second hardware state of the second client device and a second software state of the second client device;

determine whether a first overall state of the first client device matches second state of the second client device based on the first shader key and the second shader key; and

responsive to determining that the first state of the first client device matches the second state of the second client device, transmit, to the second client device, a subsequent message comprising the compiled shader program.