Cooperative thread array granularity context switch during trap handling

US9804885B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9804885-B2
Application numberUS-201615271171-A
CountryUS
Kind codeB2
Filing dateSep 20, 2016
Priority dateDec 27, 2012
Publication dateOct 31, 2017
Grant dateOct 31, 2017

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Techniques are provided for restoring threads within a processing core. The techniques include, for a first thread group included in a plurality of thread groups, executing a context restore routine to restore from a memory a first portion of a context associated with the first thread group, determining whether the first thread group completed an assigned function, and, if the first thread group completed the assigned function, then exiting the context restore routine, or if the first thread group did not complete the assigned function, then executing one or more operations associated with a trap handler routine.

First claim

Opening claim text (preview).

What is claimed is: 1. A method for restoring threads within a processing core, the method comprising: for a first thread group included in a plurality of thread groups, executing a context restore routine to restore from a memory a first portion of a context associated with the first thread group; determining whether the first thread group completed an assigned function; and if the first thread group completed the assigned function, then exiting the context restore routine, or if the first thread group did not complete the assigned function, then executing one or more operations associated with a trap handler routine. 2. The method of claim 1 , further comprising: locating a first entry associated with the first thread group in a data structure that includes trap information; and updating an identifier within the first entry to identify the current operation as a context restore operation. 3. The method of claim 1 , wherein executing one or more operations associated with a trap handler routine comprises: determining that a context restore operation is in process, and restoring from the memory a second portion of the context associated with the first thread group. 4. The method of claim 3 , wherein determining that a context restore operation is in process comprises: retrieving an entry associated with the first thread group from a data structure that includes trap information; and determining that the entry associated with the first thread group identifies the current operation as a context restore operation. 5. The method of claim 3 , wherein restoring the second portion of the context associated with the first thread group comprises; copying data associated with state information associated with the processing core from the memory to a register; and executing an instruction to transfer the contents of the register to a hardware unit configured to maintain the operating status. 6. The method of claim 5 , wherein the state information includes at least one of a state of one or more execution barriers, a pointer to a call/return stack, and metadata associated with the call/return stack. 7. The method of claim 3 , wherein the second portion of the context includes context that is common to at least two thread groups included in the plurality of thread groups. 8. The method of claim 7 , wherein the first portion of the context includes context specific to the first thread group. 9. The method of claim 1 , further comprising clearing a plurality of memory lock indicators to remove permission from a thread group to atomically access a resource that is shared among at least two thread groups included in the plurality of thread groups. 10. The method of claim 1 , further comprising: executing an instruction to exit the trap handler routine; and causing a thread program to resume executing where the thread program was executing prior to the context restore operation. 11. A non-transitory computer readable storage medium comprising instructions that cause a processor to restore threads within a processing core, by performing the steps of: for a first thread group included in a plurality of thread groups, executing a context restore routine to restore from a memory a first portion of a context associated with the first thread group; determining whether the first thread group completed an assigned function; and if the first thread group completed the assigned function, then exiting the context restore routine, or if the first thread group did not complete the assigned function, then executing one or more operations associated with a trap handler routine. 12. The non-transitory computer readable storage medium of claim 11 , further comprising the steps of: locating a first entry associated with the first thread group in a data structure that includes trap information; and updating an identifier within the first entry to identify the current operation as a context restore operation. 13. The non-transitory computer readable storage medium of claim 11 , wherein executing one or more operations associated with a trap handler routine comprises: determining that a context restore operation is in process, and restoring from the memory a second portion of the context associated with the first thread group. 14. The non-transitory computer readable storage medium of claim 13 , wherein determining that a context restore operation is in process comprises: retrieving an entry associated with the first thread group from a data structure that includes trap information; and determining that the entry associated with the first thread group identifies the current operation as a context restore operation. 15. The non-transitory computer readable storage medium of claim 13 , wherein restoring the second portion of the context associated with the first thread group comprises: copying data associated with state information associated with the processing core from the memory to a register; and executing an instruction to transfer the contents of the register to a hardware unit configured to maintain the operating status. 16. The non-transitory computer readable storage medium of claim 15 , wherein the state information includes at least one of a state of one or more execution barriers, a pointer to a call/return stack, and metadata associated with the call/return stack. 17. The non-transitory computer readable storage medium of claim 13 , wherein the second portion of the context includes context that is common to at least two thread groups included in the plurality of thread groups. 18. The non-transitory computer readable storage medium of claim 17 , wherein the first portion of the context includes context specific to the first thread group. 19. The non-transitory computer readable storage medium of claim 11 , further comprising clearing a plurality of memory lock indicators to remove permission from a thread group to atomically access a resource that is shared among at least two thread groups included in the plurality of thread groups. 20. The non-transitory computer readable storage medium of claim 11 , further comprising the steps of: executing an instruction to exit the trap handler routine; and causing a thread program to resume executing where the thread program was executing prior to the context restore operation. 21. A computer system comprising: a memory that stores instructions and data related to a trap handling routine; a processor that executes the instructions to restore threads within a processing core by performing the steps of: for each thread group included in a plurality of thread groups, executing a context restore routine to restore from a memory a first portion of a ontext associated with the thread group; for each thread group included in the plurality of thread groups, determining whether the thread group completed an assigned function; and if the thread group completed an assigned function, then exiting the context restore routine, or if the thread group did not complete the assigned function, then executing one or more operations associated with a trap handler routine.

Assignees

Inventors

Classifications

  • Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence) · CPC title

  • G06F9/461Primary

    Saving or restoring of program or task context · CPC title

  • by interrupt, e.g. masked · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9804885B2 cover?
Techniques are provided for restoring threads within a processing core. The techniques include, for a first thread group included in a plurality of thread groups, executing a context restore routine to restore from a memory a first portion of a context associated with the first thread group, determining whether the first thread group completed an assigned function, and, if the first thread grou…
Who is the assignee on this patent?
Nvidia Corp
What technology area does this patent fall under?
Primary CPC classification G06F9/461. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Oct 31 2017 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).