Off-chip out of order memory allocation for a unified shader
First Claim
1. A method of allocating memory for processing threads in a multithreaded processor to execute a shader program, comprising:
- receiving a thread launch request for a first thread;
determining that the first thread requires a memory allocation to execute the shader program in the multithreaded processor;
obtaining an available memory offset specifying an allocation unit within a memory pool allocated for processing the threads, wherein a size of the allocation unit is based on a largest amount of memory needed by any thread to execute the shader program in the multithreaded processor; and
writing the available memory offset in an entry of a thread table to allocate the allocation unit within the memory pool to the first thread.
0 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods for dynamically allocating memory for thread processing may reduce memory requirements while maintaining thread processing parallelism. A memory pool is allocated to store data for processing multiple threads that does not need to be large enough to dedicate a fixed size portion of the memory pool to each thread that may be processed in parallel. Fixed size portions of the memory pool are dynamically allocated and deallocated to each processing thread. Different fixed size portions may be used for different types of threads to allow greater thread parallelism compared with a system that requires allocating a single fixed portion of the memory pool to each thread. The memory pool may be shared between all of the thread types or divided to provide separate memory pools dedicated to each particular thread type.
27 Citations
20 Claims
-
1. A method of allocating memory for processing threads in a multithreaded processor to execute a shader program, comprising:
-
receiving a thread launch request for a first thread; determining that the first thread requires a memory allocation to execute the shader program in the multithreaded processor; obtaining an available memory offset specifying an allocation unit within a memory pool allocated for processing the threads, wherein a size of the allocation unit is based on a largest amount of memory needed by any thread to execute the shader program in the multithreaded processor; and writing the available memory offset in an entry of a thread table to allocate the allocation unit within the memory pool to the first thread. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A system for allocating memory for multiple execution threads, comprising:
-
a thread table configured to store a memory offset for each one of the multiple execution threads; a multithreaded processing unit configured to process the multiple execution threads using the memory allocated to the multiple execution threads; and a memory allocation unit configured to allocate allocation units from a memory pool to the multiple execution threads and deallocate the allocation units as each one of the multiple execution threads completes execution of a shader program, wherein the memory allocation unit is further configured to deallocate allocation units in either the same or a different order than the allocation units are allocated. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification