Iterative indirect command buffers
AssigneeAdvanced Micro Devices, Inc.
InventorsAnirudh Rajendra Acharya, Ruijin Wu, Alexander Fuad Ashkar, Harry J. Wise
Life of this patent
Estimating the term…
Abstract
A technique for executing commands for an accelerated processing device is provided. The technique includes obtaining an iteration number and predication data from metadata for an iterative indirect command buffer; for each iteration indicated by the iteration number, performing commands of the iterative indirect command buffer as specified by the predication data; and ending processing of the iterative indirect command buffer in response to processing a number of iterations equal to the iteration number.
Claims18
A method for executing commands for an accelerated processing device (APD), the method comprising:
- executing commands in a primary command buffer;
- asynchronously loading commands into an indirect command buffer;
- in response to an indirection command in the primary command buffer pointing to the indirect command buffer, beginning execution of the indirect command buffer;
- in response to the indirect command buffer including an iterative flag indicating that iteration should occur, executing commands in the indirect command buffer in an iterative manner, the executing including:
- obtaining an iteration number and predication data from metadata for the indirect command buffer;
- for each iteration indicated by the iteration number, performing the commands in the indirect command buffer as specified by the predication data;
- and
- ending processing of the commands in the indirect command buffer and returning execution to the primary command buffer in response to processing a number of iterations equal to the iteration number.
A command processor comprising:
- a processor;
- a memory interface configured to fetch commands from a primary command buffer;
- and
- a memory interface configured to fetch commands and metadata from an indirect command buffer configured to asynchronously store commands,
- wherein the processor is configured to:
- execute commands in the primary buffer;
- in response to an indirection command in the primary command buffer pointing to the indirect command buffer, beginning execution of the indirect command buffer;
- in response to the indirect command buffer including an iterative flag indicating that iteration should occur, execute commands in the indirect command buffer in an iterative manner, the executing including:
- obtain an iteration number and predication data from the metadata for the indirect command buffer;
- for each iteration indicated by the iteration number, perform commands in the indirect command buffer as specified by the predication data;
- and
- end processing of the commands in the indirect command buffer and return execution to the primary command buffer in response to processing a number of iterations equal to the iteration number.
An accelerated processing device comprising:
- a compute unit;
- and
- a command processor comprising:
- a processor;
- a memory interface configured to fetch commands from a primary command buffer;
- and
- a memory interface configured to fetch commands and metadata from an indirect command buffer configured to asynchronously store commands, wherein the commands include one or more commands for execution on the compute unit,
- wherein the processor is configured to:
- execute commands in the primary buffer;
- in response to an indirection command in the primary command buffer pointing to the indirect command buffer, beginning execution of the indirect command buffer;
- in response to the indirect command buffer including an iterative flag indicating that iteration should occur, executing commands in the indirect command buffer in an iterative manner, the executing including:
- obtain an iteration number and predication data from the metadata for the indirect command buffer;
- for each iteration indicated by the iteration number, perform commands in the indirect command buffer as specified by the predication data;
- and
- end processing of the commands in the indirect command buffer and return execution to the primary command buffer in response to processing a number of iterations equal to the iteration number.
Dependencies are inferred from the claim text.