IP Library Granted Patent US 10,209,920
Granted Patent B2
US 10,209,920 · App. 15/141,776 · Granted Feb 19, 2019

Methods and apparatuses for generating machine code for driving an execution unit

Inventor: Tian Shen (Shanghai, CN)
Assignee: VIA ALLIANCE SEMICONDUCTOR CO., LTD.
G06F3/0653G06F3/0604G06F3/0638G06F3/0673G06F8/41G06F9/44G06F11/34
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 10,209,920
App. No.
15/141,776
Granted
Feb 19, 2019
Kind
B2
Abstract

A method for generating machine code for driving an execution unit is introduced to incorporate with at least the following steps: Data access instructions of a kernel, which are associated with the same memory surface, are collected. An address pattern associated with the data access instructions is analyzed to generate a global-id address. Machine code containing the global-id address is generated.

Claims (28)

1. A method for generating machine code for driving an execution unit, comprising:

collecting a plurality of data access instructions of a kernel, which are associated with the same memory surface;

analyzing an address pattern associated with the data access instructions to generate a global-id address;

generating machine code comprising the global-id address; and

determining that the memory surface is a type image and analyzing the address pattern associated with the data access instructions to generate the global-id address when the data access instructions are associated with sample instructions.

2. The method of claim 1 , wherein the operation of analyzing an address pattern associated with the data access instructions to generate a global-id address further comprises:

determining whether the address pattern is a 2D (two-dimensional) address based on a global-id; and

if so, generating a 2D global-id address.

3. The method of claim 2 , wherein the step for determining whether the address pattern is a 2D (two-dimensional) address based on a global-id further comprises:

determining whether the address pattern is the 2D address based on the global-id by analyzing definition instructions and address calculation instructions associated with the memory surface.

4. The method of claim 3 , wherein the operation of determining whether the address pattern is a 2D (two-dimensional) address based on a global-id further comprises:

determining that the address pattern is the 2D address based on the global-id when the address calculation instructions satisfies “A*W+B”,

wherein W indicates a constant of width, A and B indicate variables varied with the global-id.

5. The method of claim 3 , wherein the 2D global-id address comprises the global-id and a 2D offset.

6. The method of claim 1 , wherein the operation of analyzing an address pattern associated with the data access instructions to generate a global-id address further comprises:

determining whether the address pattern is a 1D, 2D or 3D address based on a global-id by analyzing definition instructions and address calculation instructions associated with the memory surface;

generating a 1D global-id address when the address pattern is the 1D address based on the global-id;

generating a 2D global-id address when the address pattern is the 2D address based on the global-id; and

generating a 3D global-id address when the address pattern is the 3D address based on the global-id.

7. The method of claim 1 , further comprising:

determining that the memory surface is a type buffer or UAV (Un-order Accessed View) and analyzing the address pattern associated with the data access instructions to generate the global-id address when data types of all variables of the data access instructions are the same.

8. The method of claim 1 , further comprising:

when a data type of a variable of any data access instruction is not supported by an EU (Execution Unit), modifying the data access instruction with a new one containing a variable with a data type supported by the EU.

9. The method of claim 8 , further comprising:

writing a type of the memory surface and a dimension of the global-id address in a surface description table, thereby enabling a driver when executing the machine code to set a register of the EU.

10. The method of claim 1 , wherein the global-id address identifies a designated work item of a grid in parallel computing.

11. The method of claim 1 , wherein the memory surface indicates data of a range of memory addresses.

12. The method of claim 1 , wherein the EU is an execute unit for a compute shader and/or a 3D graphics shader in pipeline.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 18, 2021
From: SHANGHAI ZHAOXIN SEMICONDUCTOR CO., LTD.
To: GLENFLY TECH CO., LTD.
Reel/Frame 058965/0042 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 28, 2016
From: SHEN, TIAN
To: VIA ALLIANCE SEMICONDUCTOR CO., LTD.
Reel/Frame 038415/0520 →
Priority Claims (1)
CN 2015 1 0836365 · Nov 26, 2015 · national
Continuity (1)
Related Publication 20170153849A1 · Jun 1, 2017