Method, a device, and a computer program product for determining a resource required for executing a code segment

US2020334083A1 · US · A1

Patent metadata
FieldValue
Publication numberUS-2020334083-A1
Application numberUS-201916540385-A
CountryUS
Kind codeA1
Filing dateAug 14, 2019
Priority dateApr 22, 2019
Publication dateOct 22, 2020
Grant date

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.

A method comprises: compiling the code segment with a compiler; and determining, based on an intermediate result of the compiling, a resource associated with a dedicated processing unit and for executing the code segment. As such, the resource required for executing a code segment may be determined quickly without actually executing the code segment and allocating or releasing the resource, which helps subsequent resource allocation and further brings about a better user experience.

First claim

Opening claim text (preview).

What is claimed is: 1 . A method for determining a resource required for executing a code segment, the method comprising: compiling the code segment with a compiler; and determining, based on an intermediate result of the compiling, a resource associated with a dedicated processing unit and for executing the code segment. 2 . The method according to claim 1 , wherein determining the resource comprises: determining whether the intermediate result indicates a resource to be allocated for execution of the code segment; and in response to determining that the intermediate result indicates the resource to be allocated, recording, in a resource record, information related to the resource to be allocated. 3 . The method according to claim 2 , further comprising: looking up, in the intermediate result, an instruction for allocating the resource to be allocated; and in response to finding the instruction, deleting the instruction from the intermediate result, or modifying the instruction in the intermediate result so as to avoid allocation of the resource to be allocated. 4 . The method according to claim 1 , wherein determining the resource comprises: determining whether the intermediate result indicates a resource to be released for executing the code segment; and in response to determining that the intermediate result indicates the resource to be released, removing information related to the resource to be released from the resource record. 5 . The method according to claim 4 , further comprising: looking up, in the intermediate result, an instruction for releasing the resource to be released; and in response to finding the instruction, deleting the instruction from the intermediate result, or modifying the instruction in the intermediate result so as to avoid release of the resource to be released. 6 . The method according to claim 1 , wherein determining the resource comprises: obtaining an amount of resource recorded in a resource record during the compiling; and determining, based on the recorded amount of resource, the resource required for executing the code segment. 7 . The method according to any of claim 1 , wherein the resource comprises at least one of a computing resource and a storage resource in a dedicated processing unit. 8 . A device for determining a resource required for executing a code segment, comprising: at least one processing unit; at least one memory, coupled to the at least one processing unit and storing instructions executed by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the device to perform acts, including: compiling the code segment with a compiler; and determining, based on an intermediate result of the compiling, a resource associated with a dedicated processing unit and for executing the code segment. 9 . The device according to claim 8 , wherein determining the resource comprises: determining whether the intermediate result indicates a resource to be allocated for execution of the code segment; and in response to determining that the intermediate result indicates the resource to be allocated, recording, in a resource record, information related to the resource to be allocated. 10 . The device according to claim 9 , wherein the acts further comprise: looking up, in the intermediate result, an instruction for allocating the resource to be allocated; and in response to finding the instruction, deleting the instruction from the intermediate result, or modifying the instruction in the intermediate result so as to avoid allocation of the resource to be allocated. 11 . The device according to claim 8 , wherein determining the resource comprises: determining whether the intermediate result indicates a resource to be released for executing the code segment; and in response to determining that the intermediate result indicates the resource to be released, removing information related to the resource to be released from the resource record. 12 . The device according to claim 11 , wherein the acts further comprise: looking up, in the intermediate result, an instruction for releasing the resource to be released; and in response to finding the instruction, deleting the instruction from the intermediate result, or modifying the instruction in the intermediate result so as to avoid release of the resource to be released. 13 . The device according to claim 8 , wherein determining the resource comprises: obtaining an amount of resource recorded in a resource record during the compiling; and determining, based on the recorded amount of resource, the resource required for executing the code segment. 14 . The device according to claim 8 , wherein the resource comprises at least one of a computing resource and a storage resource in a dedicated processing unit. 15 . A computer program product being tangibly stored on a non-transient computer readable medium and comprising machine executable instructions which, when being executed, causing a machine to perform steps of: compiling the code segment with a compiler; and determining, based on an intermediate result of the compiling, a resource associated with a dedicated processing unit and for executing the code segment. 16 . The computer program product according to claim 15 , wherein determining the resource comprises: determining whether the intermediate result indicates a resource to be allocated for execution of the code segment; and in response to determining that the intermediate result indicates the resource to be allocated, recording, in a resource record, information related to the resource to be allocated. 17 . The computer program product according to claim 16 , further comprising: looking up, in the intermediate result, an instruction for allocating the resource to be allocated; and in response to finding the instruction, deleting the instruction from the intermediate result, or modifying the instruction in the intermediate result so as to avoid allocation of the resource to be allocated. 18 . The computer program product according to claim 15 , wherein determining the resource comprises: determining whether the intermediate result indicates a resource to be released for executing the code segment; and in response to determining that the intermediate result indicates the resource to be released, removing information related to the resource to be released from the resource record. 19 . The computer program product according to claim 18 , further comprising: looking up, in the intermediate result, an instruction for releasing the resource to be released; and in response to finding the instruction, deleting the instruction from the intermediate result, or modifying the instruction in the intermediate result so as to avoid release of the resource to be released. 20 . The computer program product according to claim 15 , wherein determining the resource comprises: obtaining an amount of resource recorded in a resource record during the compiling; and determining, based on the recorded amount of resource, the resource required for executing the code segment.

Assignees

Inventors

Classifications

  • G06F8/41Primary

    Compilation · CPC title

  • the resource being a machine, e.g. CPUs, Servers, Terminals · CPC title

  • G06F8/45Primary

    Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions · CPC title

  • Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution · CPC title

  • G06F9/5011Primary

    the resources being hardware resources other than CPUs, Servers and Terminals · 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 US2020334083A1 cover?
A method comprises: compiling the code segment with a compiler; and determining, based on an intermediate result of the compiling, a resource associated with a dedicated processing unit and for executing the code segment. As such, the resource required for executing a code segment may be determined quickly without actually executing the code segment and allocating or releasing the resource, whi…
Who is the assignee on this patent?
Emc Ip Holding Co Llc
What technology area does this patent fall under?
Primary CPC classification G06F8/41. Mapped technology areas include Physics.
When was this patent published?
Publication date Thu Oct 22 2020 00:00:00 GMT+0000 (Coordinated Universal Time) (A1). 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).