Method and system for efficiently partitioning memory

By introducing common boundaries in physical memory and using mapping technology of strided memory space and partitioned memory space, the problem of resource isolation and waste when multiple clients share the processor is solved, and efficient address mapping and resource isolation are achieved.

CN112445713BActive Publication Date: 2024-09-03NVIDIA CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010192464.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-08-15
Filing Date
2020-03-18
Publication Date
2024-09-03
Estimated Expiration
2040-03-18

AI Technical Summary

Technical Problem

It is difficult for existing technologies to effectively ensure resource access isolation and reduce memory waste without limiting the number of memory devices, especially when multiple clients share the processor, and especially when the addressable memory space is not an integer multiple.

Method used

The mapping technology of strided memory space and partitioned memory space is adopted to ensure resource isolation of each memory space by introducing common boundaries in physical memory, and address mapping is optimized through swapping or hashing functions to reduce waste.

Benefits of technology

It ensures resource isolation without limiting the number of memory devices, minimizes memory waste, and improves the efficiency and flexibility of address mapping.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112445713B_ABST
    Figure CN112445713B_ABST
Patent Text Reader

Abstract

The present invention discloses a technology for effectively partitioning memory, and specifically discloses a technology for allocating a global memory space defined in a physical memory device to one or more stride memory spaces (SMS) and one or more partition memory spaces (PMS). In one embodiment, SMS is mapped to all devices, and PMS is mapped to a subset of devices to ensure resource isolation between separate PMSs. Usually, memory space is allocated in unit sizes. When most of the locations mapped to SMS are consistent with an integer number of unit sizes, a common boundary can be formed between SMS and one or more PMSs in each device. Such a boundary can advantageously minimize the area of ​​the location that is not available for allocation in the global memory space. In one embodiment, when the stride allocation is not an integer number of unit sizes, the remainder is mapped to the location of one or more PMSs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to address mapping, and more particularly to address mapping for resource access isolation. Background Art

[0002] Software applications store data in one or more addressable memory spaces assigned to the application. Typically, the data is stored in physical memory associated with a processor. Mapping the addressable memory space to a linear physical storage location requires a conversion operation. The conversion operation can be simplified by limiting the unit size of the physical memory allocated to the addressable memory space. The larger the unit size, the easier the conversion operation is, while also ensuring that the separate addressable memory spaces are mutually exclusive. However, when the addressable memory space is not an integer multiple of the unit size, a larger unit size is more wasteful. Traditionally, the number of memory devices (in the width dimension) determines the minimum unit size and is typically limited to a power of 2 to simplify conversion operations. Limiting the number of memory devices limits the number of possible price and / or performance options for the system. For example, a single processor may be shared by multiple clients (e.g., applications or users). The memory address space for allocation to multiple clients must be partitioned so that each client operates independently without affecting the workload of other clients. Therefore, there is a need for a mapping technique that uses efficient translation operations to ensure exclusive addressable memory space without limiting the number of memory devices while minimizing waste.Therefore, there is a need to address these and / or other problems associated with the prior art. Summary of the invention

[0003] Memory spaces are allocated, each of which can be designated as either strided or partitioned memory spaces. Strided memory spaces are mapped across all physical memory devices. Partitioned memory spaces are mapped to a portion of a physical memory device to ensure resource isolation between separate partitioned memory spaces. Memory is allocated in unit sizes. When the strided allocation is not an integer number of unit sizes, an amount of strided memory spaces are mapped to locations across physical memory devices, and the remainder (reminder) is mapped to locations of one or more partitioned memory spaces. Because the locations mapped to most of the strided memory space coincide with an integer number of unit sizes, there is a common boundary between the strided memory space and one or more partitioned memory spaces in each physical memory device. The common boundary ensures that buffers that are not available for locations allocated to any memory space can be minimized.

[0004] A method and system for mapping an address to a location in physical memory is disclosed. An address for accessing an address space is received, the address space being mapped to a location in physical memory associated with a processor, wherein the address space is divided into a first portion corresponding to a strided memory space and a second portion corresponding to at least one partitioned memory space. The address is determined to be within the first portion, wherein most of the first portion is mapped to a first subset of locations in physical memory that are aligned at a first common boundary across devices included in the physical memory, a reminder of the first portion is mapped to a second subset of locations in physical memory that are aligned at a second common boundary, and the second portion is mapped to a third subset of locations in physical memory that are between the first common boundary and the second common boundary. When the address is within the most of the first portion, a first location address in the first subset is calculated, and when the address is within the reminder of the first portion, a second location address in the second subset is calculated. BRIEF DESCRIPTION OF THE DRAWINGS

[0005] Figure 1A Shown are strided memory spaces and partitioned memory spaces mapped to locations in local physical memory according to one embodiment.

[0006] Figure 1B The conversion of a linear address to a location address according to one embodiment is shown.

[0007] Figure 1C Another conversion of linear addresses to location addresses according to one embodiment is shown.

[0008] Figure 1D A majority of the stride storage locations and the remainder of the stride storage locations are shown according to one embodiment.

[0009] Figure 1E Shown are strided memory spaces and partitioned memory spaces mapped to locations at common boundaries according to one embodiment.

[0010] Figure 1F Shown are strided memory spaces and partitioned memory spaces mapped to locations in local physical memory comprising 12 devices and aligned at common boundaries according to one embodiment.

[0011] Figure 1G Shown are strided memory spaces and partitioned memory spaces mapped to locations in local physical memory aligned at common boundaries according to one embodiment.

[0012] Figure 1HShown are strided memory spaces and partitioned memory spaces mapped to locations in local physical memory aligned at common boundaries according to one embodiment.

[0013] Fig. 1I A block diagram of a processor and local memory is shown according to one embodiment.

[0014] Figure 2A is a conceptual diagram illustrating various resource allocations for partitions according to one embodiment.

[0015] Figure 2B A block diagram of an address mapping unit according to one embodiment is shown.

[0016] Figure 2C A flow chart of a method for calculating location addresses of strided memory space and partitioned memory space according to one embodiment is shown.

[0017] Figure 3 A parallel processing unit according to one embodiment is shown.

[0018] Figure 4A According to an embodiment Figure 3 A general-purpose processing cluster within a parallel processing unit.

[0019] Figure 4B According to an embodiment Figure 3 The memory partitioning unit of the parallel processing unit.

[0020] Figure 5A According to an embodiment Figure 4A Streaming multiprocessor.

[0021] Figure 5B According to one embodiment, the use Figure 3 Conceptual diagram of the processing system implemented by the PPU.

[0022] Figure 5C Exemplary systems are shown in which the various architecture and / or functionality of various previous embodiments may be implemented. DETAILED DESCRIPTION

[0023] A single processor, such as a graphics processing unit (GPU), can be shared by multiple clients (e.g., applications or users). The memory address space associated with the GPU is divided into a common system region, referred to as a strided memory space, and multiple client regions, referred to as partitioned memory spaces. The hardware resources and memory space in the GPU should be allocated so that each client can operate independently without affecting the workload of other clients. Instead of striding horizontally across all memory resources, which include memory devices that contain memory address spaces, memory resources are grouped for allocation to individual clients in a vertical or sliced ​​manner. As a result, a client accesses only its assigned memory cells and hardware resources.

[0024] Unequal memory allocations to clients, and the number of physical memory devices that may not be equal to a power of 2, may create address mapping challenges. For example, when D = 2 i and i is an integer, the number of devices D is a power of 2. In one embodiment, the stride memory space and each partition address space require different address mappings. The unequal memory consumption between the stride memory space and the partition memory space makes it difficult to calculate the address mapping boundary and it is unequal, so that the address between the two different memory spaces is different due to different physical memory devices (such as DRAM) assigned to the two different memory spaces. In one embodiment, hash randomized addressing leads to more boundary unpredictability.

[0025] Partitioning or grouping memory resources into sub-regions provides access isolation for strided memory spaces and different partitioned memory spaces. A technique for mapping addresses in a strided memory space and at least one partitioned memory space to a local physical memory associated with a processor is described. The strided memory space is distributed across all physical memory devices included in the local physical memory associated with the processor. The size of the strided memory space is software specified and is not restricted to a common or clean boundary.

[0026] The blank or common boundary ensures that each memory device provides an equal amount of strided memory space and that addresses of the strided memory space are not mapped outside the strided memory space. For example, considering a swizzle (or hash) of a local physical memory address, the strided memory space in each memory device may consume N memory pages. In the context described below, the common boundary occurs at the same location address in each physical memory device so that a single location address is common in all physical memory devices. Importantly, the common boundary should ensure that address aliasing does not occur so that when the swizzle (switch) or hash function specified for the strided memory space is applied to the address during mapping, the local physical memory address corresponds to a memory location in the strided memory space and is not in the partitioned memory space. Similarly, the common boundary should ensure that when the swizzle or hash function specified for the partitioned memory space is applied to the address during mapping, the local physical memory address corresponds to a memory location within the partitioned memory space and is not in the strided memory space or another partitioned memory space.

[0027] Figure 1A Shown are strided memory spaces and partitioned memory spaces according to one embodiment, mapped to locations in local physical memory 100. Partitioned memory locations 115A and 115B and strided memory locations 110 are each shown as addressable locations consumed across (physical memory) devices included in local physical memory 100. A particular location in physical memory 100 is within a range of local memory addresses.

[0028] The strided memory space is mapped to strided memory locations 110 ranging from zero to an allocation boundary 103. The strided memory locations 110 are allocated for storing the strided memory space. A quantity comprising a majority of the strided memory space is mapped to strided memory locations 110 ranging from zero to a common boundary 101. The remainder of strided memory space comprises locations ranging from the common boundary 101 to the allocation boundary 103.

[0029] For simpler mapping calculations, it is desirable that strided memory locations 110 mapped to the strided memory space are aligned to a common (flat) boundary, such as common boundary 101. The common boundary is associated with the same location address in each device. For example, when each DRAM device includes 256MB of addressable memory locations (which corresponds to an addressable space of 4-byte addressable locations 0x0000 0000 to 0x03D09000), then when the unit size of physical memory in each memory device is equal to 16MB, common boundary 101 can be equal to 0x 003D0900.

[0030] like Figure 1AAs shown, the locations in physical memory 100 mapped to the stride memory space are usually not aligned at the common boundary. In addition, between the common boundary 101 and the allocation boundary 103, the same number of locations are not consumed in each device for the stride memory space. The common boundary (such as common boundary 101) comes from the allocation of physical memory 100, which consumes physical memory of multiples of the unit size. When an equal number of locations are allocated for the stride memory space in each device, a common boundary will be generated.

[0031] One or more locations from common boundary 101 to allocation boundary 103 may be unused and unavailable for allocation to partition memory space or stride memory space. The unused locations are necessary to maintain common boundary 101 and ensure that stride memory space addresses are not mapped to partition memory space and vice versa. The unused locations and / or buffers may be needed when location address bit swapping or hashing is used to map stride memory space or partition memory space addresses to locations in physical memory 100, or when the number of devices is not a power of two, such as in conjunction with Figure 1B and Figure 1C as described.

[0032] The first partition memory space is allocated partition memory locations 115A located between allocation boundary 103 and a maximum value. The second partition memory space is allocated partition memory locations 115B located between allocation boundary 103 and a maximum value. The partition memory spaces can be used for multiple contexts simultaneously, where each context can be associated with a different client. Importantly, each partition memory space is isolated such that only the context to which the partition memory location is allocated can access the partition memory location. Thus, in contrast to strided memory spaces, each partition memory space maps to a memory location in a separate portion of the device, rather than to a memory location on all devices. For example, if Figure 1A As shown, partition memory location 115A is allocated in the first half of the devices (the first, second, and third devices), and partition memory location 115B is allocated in the second half of the devices (the remaining three devices). In contrast, stride memory location 110 is allocated across all devices.

[0033] Each partitioned memory space corresponds to specific performance and memory resources. A partitioned memory space is not only limited by memory resources, such as devices or caches within a processor, but also by performance resources, such as processing units, interfaces, crossbar connections, etc. In the context of the following description, the performance resources and memory resources corresponding to a partitioned memory space are referred to as resources.

[0034] In physical memory 100, the partition memory space is mapped to a location adjacent to and after the location mapped to the stride memory space, wherein an allocation boundary 103 separates the stride memory location 110 from the partition memory locations 115A and 115B. A format may be specified for each memory space (stride memory space or partition memory space). The format may specify a swap operation or hash function applied to local memory addresses during a mapping operation.

[0035] Due to the swapping of address bits or the hashing of location addresses, the specific locations in the local memory 100 to which the memory space is mapped are not necessarily linearly continuous. The swapping rearranges the bits of the location address to allocate linear addresses across the memory space. For example, two of the location address bits can be swapped to allocate data across different banks of DRAM. When all location addresses are swapped according to the same rule, all location addresses will be allocated to the memory space. The hashing modifies the bits of the location address according to the rule to distribute the data across a certain range of location addresses (such as memory space). For example, for the position from 0 to the common boundary 101 in each device, all positions in the range from 0 to the common boundary 101 are allocated and mapped to the local memory address of the memory space. On the contrary, for the position from the common boundary 101 to the allocation boundary 103 in each device, only some positions are mapped to the local memory address of the memory space. Specifically, unused (unavailable) positions can be included in the position between the boundaries 101 and 103.

[0036] Figure 1B The conversion of linearly consecutive local memory addresses to location addresses according to one embodiment is shown. The linearly consecutive local memory addresses between boundaries 101 and 102 are used, and the linearly consecutive local memory addresses between boundaries 102 and 103 are not used. The linearly consecutive local memory addresses between common boundary 101 and boundary 102 are converted to non-contiguous location addresses between common boundary 101 and allocation boundary 103 by hashing or swapping.

[0037] Figure 1C Another conversion of linearly consecutive addresses to location addresses according to one embodiment is shown. Linearly consecutive local memory addresses between common boundary 101 and boundary 122 are converted to non-contiguous location addresses between common boundary 101 and allocation boundary 103 by hashing or swapping. Figure 1A The location of the stride memory location 110 between the mid-boundaries 101 and 103 may be as follows Figure 1B or Figure 1C Shown is non-continuous. Figure 1A The location of the stride memory location 110 between the boundaries 101 and 103 may be determined in the same manner as Figure 1B and Figure 1C The different modes shown are non-continuous.

[0038] Typically, the format of the stride memory space causes addresses to be mapped to locations in a linear order to be reordered into a different order. For example, when the format specified for the stride memory space changes, addresses can be mapped to unused locations or even mapped to locations in partition memory locations 115A and / or 115B. Therefore, allocation boundaries 103 should be defined to ensure that for the format specified for the stride memory space, no address in the stride memory space is mapped to a partition memory location 115A or 115B. In addition, when the number of memory devices is not a power of 2, specific location addresses are not necessarily linearly continuous.

[0039] When the number of memory devices is not a power of 2, a common boundary is not necessarily formed at a physical location address that is a power of 2. Similarly, when the number of memory resources (such as caches within a processor) is not a power of 2, a common boundary is not necessarily formed at a physical location address that is a power of 2. In one embodiment, a memory management unit (MMU) manages pages at power-of-2 physical location addresses, each of which corresponds to a page (or multiple pages, depending on the distance between the partition memory space allocation boundary and the nearest common boundary). In order to ensure a common boundary between the stride memory location 110 and the partition memory locations 115A and 115B, the page needs to be blacklisted so that the address mapping hash function works and ensures isolation (i.e., preventing aliasing into different address spaces). A boundary is a common boundary when it coincides with an integer multiple of the MMU page and an integer multiple of the number of memory devices D.

[0040] For example, when the format specified for the strided memory space may result in some addresses being mapped to locations outside of allocation boundary 103, a buffer ( Figure 1A ). The buffer is aligned at the nearest common boundary (or containing the nearest common boundary) that defines the stride memory location 110, and the nearest common boundary is the starting point of the partition memory space. In one embodiment, the location in the buffer is blacklisted and cannot be used to be allocated to the stride memory space or the partition memory space. Obviously, the buffer is a waste because it contains memory resources that cannot be allocated. When the address in the stride memory space is not mapped to the unused location, it is also a waste to have the unused location across the memory location 110. Compared with aligning the partition memory location to the common boundary, the solution of allocating the unused location to the partition memory space makes the address mapping calculation overly complicated. Instead of allocating the unused location, the unused location between the common boundary 101 and the allocation boundary 103 can be borrowed from the partition memory locations 115A and 115B, as further described herein, thereby offsetting the boundary between the stride memory space and the partition memory space from the allocation boundary 103 to the common boundary 101.

[0041] In one embodiment, to facilitate fast address translation or mapping (when using virtual machines and hypervisors), virtual MMU pages may be large (typically tens of MB), and the common boundary granularity or resolution is correspondingly large. Therefore, the blacklist mechanism (at the vMMU page level) will result in a large loss of memory resource capacity due to the larger blacklist area. In one embodiment, in order to avoid blacklisting any page, the address mapping can apply a technique to generate a cut off at the "nearest common boundary" of the partition memory space. Track the address location at the start and end of each stride memory space and partition memory space. When the address location at the end of the stride memory space and the address location at the start of the partition memory space are not on the same boundary, a small portion (the remainder) of the address mapped to the location in the stride memory space is mapped to the location in each partition memory space. Specifically, the remainder of the address beyond the "nearest common boundary" is within the stride memory space. For example, if Figure 1A As shown, common boundary 101 is the nearest common boundary within the stride memory space. The remapping causes the stride memory space to end at the nearest common boundary, and the start of the partition memory space is offset downward to the nearest common boundary. The stride memory space and each offset partition memory space start and end at the common boundary, and there is no need to blacklist memory pages.

[0042] Figure 1D 1 and 12. A number of (most of) strided memory locations 105 and a remainder of the strided memory locations 112 are shown according to one embodiment. Within physical memory 100, the strided memory space may be mapped to a first subset of locations aligned at a common boundary 101 and a second subset of locations, the remainder of the strided memory locations 112, which are not evenly distributed across devices. For the first subset, the strided memory locations 105 are evenly distributed across devices. In one embodiment, the second subset includes locations ( Figure 1D The partition memory space is mapped to a position starting from the nearest common boundary (i.e., common boundary 101). In addition, the second subset is mapped according to the format specified for the position allocated to the partition memory space. The remainder 112 of the stride memory position is distributed between the partition memory spaces, and each part of the remainder is mapped according to the format specified for the partition memory space allocated to the part.

[0043] Now, more illustrative information about various optional architectures and features that can be used to implement the aforementioned framework will be described according to the needs of the user. It should be particularly noted that the following information is described for illustrative purposes and should not be interpreted as limiting in any way. Any of the following features can be selectively combined with other features described or do not exclude other features.

[0044] Figure 1E A strided memory space and a partitioned memory space are shown, mapped to locations in local physical memory 120 aligned at common boundaries, according to one embodiment. Figure 1E The left side shows the Figure 1A The local physical memory 100 is a local physical memory 100, wherein the stride memory space is allocated address locations starting from 0 (common boundary) to ballocated (ending at the allocated boundary 103). The address locations starting from ballocated to the maximum value are available for the partition memory space. The first partition memory space is allocated partition memory locations 115A, starting from ballocated to (maximum value - ballocated) / 2, and ending at the allocated boundary 123. The second partition memory space is allocated partition memory locations 115B, starting from (maximum value - ballocated) / 2 to the maximum value, and ending at the maximum value (common boundary). When ballocated is not at the common boundary in the local physical memory 100, the remainder 112 of the stride memory locations are instead mapped into the partition memory space, as shown in the local physical memory 120.

[0045] An amount (e.g., a majority) of strided memory space is mapped to a majority 105 of strided memory locations, including a first subset of locations ranging from zero to common boundary 101. The number of locations in the majority 105 of strided memory locations are within a range of location addresses (e.g., 0 to Bcommon) aligned between two common boundaries (0 and common boundary 101). Taking into account the format specified for the memory space and the number of devices contained in local physical memory 120, the amount of strided memory space between 0 and Bcommon is completely mapped into the first subset of locations. In other words, addresses of the strided memory space within the majority 105 of strided memory locations (the first subset of locations) are not mapped to locations outside of 0 to Bcommon.

[0046] The remainder 112 of the strided memory space between Bcommon and Ballocated is mapped to the remainder of locations 111A and 111B, including a second subset of locations within the locations allocated to the first and second partitioned memory spaces. The remainder 112 of the strided memory locations is mapped to locations between boundary 106 and common boundary 107 and between boundary 108 and the maximum value. In other words, the remainder 112 of the strided memory space is mapped to locations that are offset from the range of locations from Bcommon and Ballocated, thereby maintaining the common boundary 101 between the majority 105 of the strided memory locations and the partitioned memory locations 125A.

[0047] The partition memory space is mapped to partition memory locations 125A and 125B between the first common boundary 101 at Bcommon and the second common boundary 107 at Bcommon+FirstPartitionSize+Reminder / 2, where FirstPartitionSize is the size of the partition memory location 125A and Reminder is the size of the remainder 112 of the stride memory locations. The remainder locations 111A are aligned at the second common boundary 107, and the remainder locations 111B are aligned at the maximum value. Because Bcommon is at the first common boundary 101 and the maximum value is also a common boundary, (maximum value - Bcommon) / 2 is the location of the second common boundary 107. The second partition memory space is mapped to the partition memory location 125B aligned at the second common boundary 107.

[0048] The first partition memory space is allocated positions starting from the common boundary 101 and ending at the common boundary 107. The second memory space is allocated positions starting from the common boundary 107 and ending at the maximum value. Note that if necessary, the allocation provided to the partition memory space is increased to accommodate the remaining portion 112 of the stride memory location. The number of locations F required for the remaining portion of the stride memory space is distributed within the partition memory location. For two partition memory spaces with the same resources, the allocated partition memory locations are each increased by F / 2. In other words, the remaining portion 112 of the stride memory space is divided by the number of partition memory spaces, so that the remaining portion 112 of the stride memory space is proportionally distributed between the partition storage units 125A and 125B. The allocation of the partition memory location 125A will change from the allocation boundary 103 to the boundary 123 to the allocation of half of the devices, that is, from the common boundary 101 to the common boundary 107.

[0049] The remainder 112 of the strided memory space that is mapped to the remainder locations 111A and 111B is mapped according to the format (e.g., swapped, hashed) specified for the partitioned memory locations 125A and 125B, respectively. Conversely, the majority 105 of the strided memory locations is mapped according to the format specified for the strided memory space. Similarly, Figure 1A The stride memory locations 110 of the partition memory space are mapped according to the format specified for the stride memory space. Conceptually, the remainder 112 of the stride memory space is mapped as if the remainder is in the partition memory space. When memory is allocated for the partition memory locations 125A and 125B, the size of the allocation is determined to include space for the remainder 112 of the stride memory space. In one embodiment, the memory allocated for the partition memory locations 125A and 125B is also sized to start and end at a common boundary. Therefore, the partition memory locations 125A and 125B include available locations that can be mapped to the second stride memory space. In particular, the available locations can be mapped to the remainder of the second stride memory space.

[0050] The common or flat boundary is determined based on the unit size of the allocated memory, which in turn is based on the number of devices. For example, for a total of 12 devices (D=12), the common boundary will be located on any 3x 64KB pages. When the memory management unit is configured to operate on memory partitions with boundaries that are powers of 2, and when D=12, z=D*2 i , where i is an integer. When the allocation boundary 103 is a power of 2, the allocation boundary 103 is not necessarily common across all D devices (i.e., the boundary is not flat). At the end of the strided memory allocation, the common boundary 101 between the majority of the strided memory locations and the partitioned memory locations is determined as the nearest common boundary immediately below the allocation boundary 103.

[0051] Figure 1F 1 shows a strided memory space and a partitioned memory space according to one embodiment, which are mapped to locations in local physical memory 120 including 12 devices and aligned at common boundaries. The nearest common boundary 101 is the upper boundary of most of the strided memory locations 105, for Figure 1F In the example shown, the nearest common boundary is at 3*n*64KB, where integer n=Bcommon / (3*64KB). The rest of the strided memory space that would be mapped outside of the common boundary 101 is instead mapped to the remaining locations 111A and 111B. The partitioned memory locations start at location Bcommon instead of Ballocated, and the partitioned memory spaces are mapped to locations that end at the common boundaries 106 and 108, respectively.

[0052] The location address in the first six of the 12 devices at common boundary 101 is equal to the location address in the remaining six devices at common boundary 107 because the high bits of the mapped address determine the partition memory space. Similarly, for each device, common boundary 107 at the end of the location assigned to the first partition memory space has the same location address as the maximum value at the end of the location assigned to the second partition memory space. The remaining locations 111A and 111B are distributed across the entire device and are located within the partition memory locations. The remainder of the strided memory space mapped to location 111A is mapped according to the format specified for the partition memory location 125A, and the remainder of the strided memory space mapped to location 111B is mapped according to the format specified for the partition memory location 125B.

[0053] Figure 1G Shown is a stride memory space and a partition memory space according to one embodiment, which are mapped to locations in local physical memory 135 aligned at a common boundary. An amount (most) of the stride memory space is mapped to a majority 105 of the stride memory locations, including a first subset of locations ranging from zero to a common boundary 101. The remainder of the stride memory space is mapped to remaining locations 111A and 111B, including a second subset of locations mapped to memory locations within the partition memory space. The amount of memory allocated to the partition memory space 140B is less than the amount of memory allocated to the partition memory space 140A, so more locations are available for allocation within the partition memory space 140B. However, a common boundary 107 is provided between the locations allocated to the first and second partition memory spaces, and the remaining locations 111A and 111B are equally distributed between the partition memory locations 140A and 140B.

[0054] Figure 1HShown is a stride memory space and a partition memory space according to an embodiment, which is mapped to a location in a local physical memory 145 aligned at a common boundary. A number of stride memory spaces are mapped to a majority 105 of stride memory locations, which include a first subset of locations ranging from zero to a common boundary 101. The remainder of the stride memory space is mapped to the remaining locations 151A, 151B, 151C, and 150D, which are second subsets of locations within the locations of the partition memory spaces that are respectively mapped to locations 150A, 150B, 150C, and 150D. The partition memory spaces mapped to partition memory locations 150B, 150C, and 150D are each one-third of the resources that are allocated to the partition memory space that is mapped to partition memory location 150A. However, between the location allocated to the first partition memory space and the second partition memory space that is mapped to partition memory location 150B, a common boundary 117 in the local physical memory 145 is provided. A common boundary 116 is provided between locations allocated to the second and third partition memory spaces mapped to partition memory locations 150B and 150C. A common boundary 119 is provided between locations allocated to the third and fourth partition memory spaces mapped to partition memory locations 150C and 150D.

[0055] In one embodiment, the second strided memory space is also mapped to locations in local physical memory 145. A majority 155 of the strided memory locations are mapped to location addresses ranging from a common boundary at common boundary 118 to another common boundary at a maximum value according to a format specified for the second strided memory space. The remainder of the second strided memory space is mapped to at least a portion of the available locations in locations 151A, 151B, 151C, and 151D. The remainder of the second strided memory space is allocated proportionally across partitioned memory locations 151A, 151B, 151C, and 151D and is mapped according to the format specified for partitioned memory locations 151A, 151B, 151C, and 151D, respectively. Common boundary 118 is at location Tcommon, and the remainder of the second strided memory space M = Tcommon –

[0056] Tallocated. Bcommon+FirstPartitionSize+(F+M) / 2=(Tcommon–Bcommon) / 2.

[0057] Fig. 1IA block diagram of a processor and local memory according to one embodiment is shown. The processor includes two micro-GPUs, uGPU0 and uGPU1, each of which includes half of the processing resources of the processor. The local memory associated with the processor includes D physical memory devices 165. When the processor is partitioned into two or more separate smaller processors for access by different clients, the resources including the physical memory devices 165 will be partitioned. The first half (six) of the physical memory devices 165 coupled to uGPU0 can correspond to memory partition locations 115A or 125A, and the second half of the physical memory devices 165 coupled to uGPU1 can correspond to memory partition locations 115B or 125B.

[0058] The performance resources within the processor are also partitioned into two or more separate smaller processors. The resources may include a Level 2 cache (L2) resource 170 and a processing resource 160. Figure 1G As shown, in one embodiment, two processing resources 160 access three L2 resources 170. For example, processing resources 160-0 and 160-1 access three L2 resources 170-0, 170-4, and 170-8. Each L2 resource 170 is coupled to two of the physical memory devices 165.

[0059] A partitioned memory space is isolated, and clients associated with that partitioned memory space can only access resources assigned to that partition. In contrast, a strided memory space is not isolated to specific resources.

[0060] Figure 2A 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253 and 254 can be changed in resource capacity (e.g., 1, 1 / 2, 1 / 4, 3 / 4, 1 / 8, 3 / 8, 5 / 8, 7 / 8 of resources).

[0061] Resource 240 can access all resources. When only one partition memory space is used, resource 240 can be allocated to stride memory space or a single partition. A format can be specified, including applying a swap or hash operation during the address mapping operation to generate a location address. In contrast, when resources are allocated to multiple partitions, these resources are dedicated to each partition. A format can be specified for each partition. Each partition is associated with an identifier that defines one of resources 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253 and 254, which is used to determine the format of the partition.

[0062] Resources 241 and 242 may be assigned to two equally sized partitioned memory spaces associated with two different clients. The client assigned to resource 241 may perform operations exclusively using the processing resources of uGPU0 and the local physical memory mapped to resource 241. Similarly, the client assigned to resource 242 may perform operations exclusively using the processing resources of uGPU1 and the local physical memory mapped to resource 242. A first format may be specified for resource 241, and a second format may be specified for resource 242. For example, the lowest two bits of the physical address may be swapped for the memory resource corresponding to resource 242, and the second and third lowest bits of the physical address may be swapped for the memory resource corresponding to resource 242. In one embodiment, the high bits of the physical address are used to generate a Galois sequence, which is used to swap the low bits of the physical address.

[0063] Three resources, namely, resources 241, 245, and 246, may be allocated to three partitioned memory spaces associated with three different clients, wherein the resources corresponding to resources 245 and 246 are half of the partitioned resources corresponding to resource 241, respectively. Similarly, the resources may be partitioned into three resources, namely, resources 242, 243, and 244, wherein the partitioned resources corresponding to resources 243 and 244 are half of the partitioned resources corresponding to resource 242, respectively. The client allocated to resource 245 may perform operations exclusively using processing resources 160-2 and 160-3 within uGPU1 and processing resources in L2 resources 170-2, 170-6, and 170-10, and local physical memory mapped to resource 245. Similarly, the client allocated to resource 246 may perform operations exclusively using processing resources 160-4 and 160-5 in uGPU1 and processing resources in L2 resources 170-3, 170-7, and 170-11, and local physical memory mapped to resource 246. A first format may be specified for resource 241 , a second format may be specified for resource 245 , and a third format may be specified for resource 246 .

[0064] Four resources, namely resources 243, 244, 245 and 246, may be allocated to four partition memory spaces associated with four different clients, wherein the partition resources corresponding to resources 243, 244, 245 and 246 are equal. Eight resources, namely resources 247, 248, 249, 250, 251, 252, 253 and 254, may be allocated to eight partition memory spaces associated with eight different clients, wherein the partition resources corresponding to resources 247, 248, 249, 250, 251, 252, 253 and 254 are equal. Five resources, namely resources 241, 251, 252, 253 and 254, may be allocated to five partition memory spaces associated with five different clients, wherein the partition resources corresponding to resources 251, 252, 253 and 254 are one quarter of the partition resources corresponding to resource 241. Six resources, namely resources 243 , 244 , 251 , 252 , 253 and 254 , may be allocated to six partitioned memory spaces associated with six different clients, wherein the partitioned resources corresponding to resources 251 , 252 , 253 and 254 are half of the partitioned resources corresponding to each of resources 243 and 244 .

[0065] Figure 2B A block diagram of an address mapping unit 255 according to one embodiment is shown. The address mapping unit 255 includes a virtual to physical address translation unit 260, a resource identification unit 265, and a physical address mapping unit 270. A client or software application interface to memory is through a virtual address space that appears to be continuous. Each client's separate virtual address space is client-specific. The virtual to physical address translation unit 260 converts each virtual address into a physical address. In one embodiment, the virtual memory (VM) page allocation boundaries between strides do not coincide with the common (flattened) boundaries between strides and partitioned memory locations. Although different clients can access the same virtual address, the physical address space of each client is mutually exclusive. In one embodiment, the physical address range spans the physical memory device 165 corresponding to the resource 240. Resource identification unit 265 receives the physical address and determines in which of resources 240 , 241 , 242 , 243 , 244 , 245 , 246 , 247 , 248 , 249 , 250 , 251 , 252 , 253 , and 254 the physical address is.

[0066] In one embodiment, each resource 240 to 254 is defined by a different physical address range, and the physical address received from the virtual to physical address translation unit 260 is compared with the resource address range. In one embodiment, the physical address range of resources 240 to 254 is greater than the amount of memory provided by device 165. For example, resources 245 and 251 are defined by different linear address ranges, even if resource 245 corresponds to the same device 165 as the combination of resources 251 and 252. Resource 245 is assigned to one partition, or resources 251 and 252 are assigned to two partitions. Because resources 245 and 251 overlap in their resource usage, only one resource can be assigned at a time.

[0067] Resource identification unit 265 outputs the identifier to physical address mapping unit 270. The identifier defines the format and address mapping for the partitioned or strided address space associated with the virtual address (and physical address). In one embodiment, the identifier determines the base address of the memory location of the partitioned or strided address space.

[0068] The physical address mapping unit 270 converts or maps the physical address to a location address based on the identifier. In one embodiment, the physical address mapping unit 270 forces one or more address bits to binary one or zero to ensure that the unique partition assigned to the resource defined by the identifier can access the location address of the partition. For example, a first physical address assigned to a first partition of resource 251 and a second physical address assigned to a second partition of resource 252 can be mapped to the same location address. However, the location address for the first partition is used to access one or more first devices 165, which is separate from one or more second devices 165 accessed by the second partition using the same location address.

[0069] Although the address mapping unit 255 is described in the context of a processing unit, one or more of the virtual to physical address translation unit 260, the identification unit 265, and the physical address mapping unit 270 may be implemented as a program, a custom circuit, or a combination of custom circuits and programs. In addition, one of ordinary skill in the art will appreciate that any system that performs the operations of the address mapping unit 255 is within the scope and spirit of the embodiments of the present disclosure. In one embodiment, the operations of one or more of the physical address translation unit 260, the resource identification unit 265, and the physical address mapping unit 270 are implemented in Figure 3 and Figure 4B The memory partition unit 380 or Figure 4A 490 as shown.

[0070] Figure 2C FIG. 2 is a flow chart of a method 200 for calculating strides and location addresses of a partitioned memory space according to one embodiment. Figure 1C , Figure 1D and Figure 1E As shown, method 200 may be used to calculate location addresses of a strided memory space that are mapped to a majority 105 of strided memory locations and a remainder 111 of strided memory locations.

[0071] At step 205, an address for accessing an address space is received, the address space being mapped to a location in a physical memory associated with the processor. In one embodiment, the address is a physical address converted from a virtual address by a virtual-to-physical address translation unit 260. In one embodiment, the address space is divided into a first portion corresponding to a strided memory space and a second portion corresponding to at least one partitioned memory space.

[0072] In step 210, the region identification unit 265 determines whether the address is within the strided memory space (first portion). In one embodiment, the region identification unit 265 determines whether the address is within the strided memory space. In step 210, if the region identification unit 265 determines that the address is within the strided memory space, then the address is not within the partitioned memory space. In one embodiment, a majority of the first portion is mapped to a first subset of locations in physical memory that are aligned at a first common boundary across devices 165 included in physical memory. In one embodiment, the remainder of the first portion is mapped to a second subset of locations in physical memory that are aligned at a second common boundary and distributed across devices 165 included in physical memory.

[0073] In one embodiment, the first subset of locations includes an equal number from each device 165. In one embodiment, a majority of the first portion of the address space is mapped to a majority of strided memory locations 105 that are aligned to a common boundary at x. In one embodiment, the remainder of the first portion of the address space is mapped to memory locations 111 that are aligned to a second common boundary at z. In one embodiment, the second subset of locations includes a different number from at least two of the devices 165.

[0074] At step 220, the resource identification unit 265 determines whether the address is within the remainder of the first portion (the second subset). At step 220, if the region identification unit 265 determines that the address is not within the remainder of the first portion, then at step 225, a first location address is calculated in the first subset of locations in physical memory that is aligned at a first common boundary across the devices 165 included in the physical memory.

[0075] At step 220, if resource identification unit 265 determines that the address is within the remainder of the first portion, then at step 230, a second location address is calculated in a second subset of locations in physical memory that is aligned on a second common boundary across devices 165 included in physical memory.

[0076] At step 210, if the resource identification unit 265 determines that the address is not within the strided memory space, then the address is within the second portion (partition memory space). The second portion of the address space is mapped to a third subset of locations in physical memory that are between the first common boundary and the second common boundary across the devices 165. In one embodiment, the second portion of the address space corresponds to a partition memory space mapped to one of the partition memory locations 125A or 125B between the first common boundary at x and the second common boundary at z. In one embodiment, the resource identification unit 265 determines whether the address is within the second portion of the address space. At step 215, the address is mapped to a partition memory space in a third subset of locations in physical memory that are between the first common boundary and the second common boundary across the devices 165 included in the physical memory.

[0077] In one embodiment, for at least one partitioned memory space, the second subset of locations is proportionally distributed among the third subset of locations. In one embodiment, the remainder of the first portion is mapped to the second subset of locations according to a format specified for the second portion.

[0078] Although method 200 is described in the context of a processor, method 200 may also be performed by a program, custom circuitry, or a combination of custom circuitry and program. For example, method 200 may be performed by a GPU or CPU or any logic device or processor that can access a strided memory space and a partitioned memory space that maps to locations in local memory. In addition, one of ordinary skill in the art will appreciate that any system that performs method 200 is within the scope and spirit of the embodiments of the present disclosure.

[0079] Dividing the stride memory space into an aligned portion and a remainder reduces the size of a buffer area (e.g., a blacklist location) of memory that cannot be used for storage in the stride memory space or partition memory space by providing a common boundary across memory devices 165. In addition to allocating memory resources to each partition memory space, processing resources, such as processing resources 160 and / or L2 resources 170, may also be allocated. In practice, the processor may be subdivided into smaller processors that are each assigned to different partition memory spaces, and the different partition memory spaces are assigned to specific clients. The resources in each smaller processor are isolated so that the second client cannot access the resources of the first client. In particular, the second client cannot access the mapping of addresses of the memory resources allocated to the first client to location addresses, so the memory resources of each client are isolated.

[0080] Parallel processing architecture

[0081] Figure 3A parallel processing unit (PPU) 300 is shown according to one embodiment. In one embodiment, the PPU 300 is a multi-threaded processor implemented on one or more integrated circuit devices. The PPU 300 is a latency-hiding architecture designed for processing many threads in parallel. A thread (i.e., an execution thread) is an instance of an instruction set configured to be executed by the PPU 300. In one embodiment, the PPU 300 is a graphics processing unit (GPU) configured to implement a graphics rendering pipeline for processing three-dimensional (3D) graphics data to generate two-dimensional (2D) image data for display on a display device (such as a liquid crystal display (LCD) device). In other embodiments, the PPU 300 can be used to perform general-purpose calculations. Although an exemplary parallel processor is provided herein for illustrative purposes, it should be specifically noted that the processor is described only for illustrative purposes and any processor can be used to supplement and / or replace the processor.

[0082] One or more PPUs 300 can be configured to accelerate thousands of high-performance computing (HPC), data center, and machine learning applications. PPU 300 can be configured to accelerate numerous deep learning systems and applications, including autonomous vehicle platforms, deep learning, high-precision speech, image, and text recognition systems, intelligent video analysis, molecular simulation, drug development, disease diagnosis, weather forecasting, big data analysis, astronomy, molecular dynamics simulation, financial modeling, robotics, factory automation, real-time language translation, online search optimization, and personalized user recommendations, among others.

[0083] like Figure 3 As shown, the PPU 300 includes an input / output (I / O) unit 305, a front-end unit 315, a scheduler unit 320, a work distribution unit 325, a hub 330, a crossbar switch (Xbar) 370, one or more general processing clusters (GPCs) 350, and one or more partition units 380. The PPU 300 can be connected to a host processor or other PPUs 300 via one or more high-speed NVLink 310 interconnects. The PPU 300 can be connected to a host processor or other peripheral devices via an interconnect 302. The PPU 300 can also be connected to a local memory 304 including multiple memory devices. In one embodiment, the local memory can include multiple dynamic random access memory (DRAM) devices. The DRAM device can be configured as a high-bandwidth memory (HBM) subsystem, in which multiple DRAM dies are stacked within each device.

[0084] The NVLink 310 interconnect enables the system to scale and include one or more PPUs 300 in conjunction with one or more CPUs, supporting cache coherency between the PPU 300 and the CPU, and CPU mastering. Data and / or commands may be sent by the NVLink 310 through the hub 330 to or from other units of the PPU 300, such as one or more copy engines, video encoders, video decoders, power management units, etc. (not explicitly shown). Figure 5B NVLink 310 is described in more detail.

[0085] I / O unit 305 is configured to send and receive communications (e.g., commands, data, etc.) from a host processor (not shown) via interconnect 302. I / O unit 305 may communicate with the host processor directly via interconnect 302, or through one or more intermediate devices (such as a memory bridge). In one embodiment, I / O unit 305 may communicate with one or more other processors (e.g., one or more PPUs 300) via interconnect 302. In one embodiment, I / O unit 305 implements a peripheral component interconnect express (PCIe) interface for communicating over a PCIe bus, and interconnect 302 is a PCIe bus. In alternative embodiments, I / O unit 305 may implement other types of known interfaces for communicating with external devices.

[0086] The I / O unit 305 decodes packets received via the interconnect 302. In one embodiment, the packets represent commands configured to cause the PPU 300 to perform various operations. The I / O unit 305 sends the decoded commands to various other units of the PPU 300 as specified by the commands. For example, some commands may be sent to the front end unit 315. Other commands may be sent to the hub 330 or other units of the PPU 300, such as one or more copy engines, video encoders, video decoders, power management units, etc. (not explicitly shown). In other words, the I / O unit 305 is configured to route communications between and among the various logical units of the PPU 300.

[0087] In one embodiment, a program executed by a host processor encodes a command stream in a buffer that provides a workload to the PPU 300 for processing. The workload may include many instructions and data to be processed by those instructions. A buffer is an area in memory that is accessible (e.g., read / write) by both the host processor and the PPU 300. For example, the I / O unit 305 may be configured to access a buffer in system memory connected to the interconnect 302 via a memory request transmitted through the interconnect 302. In one embodiment, the host processor writes a command stream to the buffer and then sends a pointer to the start of the command stream to the PPU 300. The front end unit 315 receives a pointer to one or more command streams. The front end unit 315 manages one or more streams, reads commands from the streams, and forwards the commands to the various units of the PPU 300.

[0088] The front end unit 315 is coupled to a scheduler unit 320, which configures the various GPCs 350 to process the tasks defined by one or more streams. The scheduler unit 320 is configured to track state information related to the various tasks managed by the scheduler unit 320. The state may indicate which GPC 350 the task is assigned to, whether the task is active or inactive, a priority associated with the task, etc. The scheduler unit 320 manages the execution of multiple tasks on one or more GPCs 350.

[0089] Scheduler unit 320 is coupled to work distribution unit 325, which is configured to dispatch tasks for execution on GPC 350. Work distribution unit 325 may keep track of a number of scheduled tasks received from scheduler unit 320. In one embodiment, work distribution unit 325 manages a pending task pool and an active task pool for each GPC 350. The pending task pool may include a number of time slots (e.g., 32 time slots) containing tasks assigned to be processed by a particular GPC 350. The active task pool may include a number of time slots (e.g., 4 time slots) for tasks that are being actively processed by GPC 350. When a GPC 350 completes execution of a task, the task is evicted from the active task pool of GPC 350, and one of the other tasks from the pending task pool is selected and scheduled for execution on GPC 350. If an active task on a GPC 350 has become idle, such as while waiting for a data dependency to be resolved, then the active task may be evicted from the GPC 350 and returned to the pending task pool, while another task in the pending task pool is selected and scheduled for execution on the GPC 350 .

[0090] Work distribution unit 325 communicates with one or more GPCs 350 via XBar (crossbar) 370. XBar 370 is an interconnect network that couples many units of PPU 300 to other units of PPU 300. For example, XBar 370 can be configured to couple work distribution unit 325 to a particular GPC 350. Although not explicitly shown, one or more other units of PPU 300 can also be connected to XBar 370 via hub 330.

[0091] Tasks are managed by a scheduler unit 320 and dispatched to GPCs 350 by a work distribution unit 325. GPCs 350 are configured to process tasks and generate results. Results can be consumed by other tasks within the GPC 350, routed to different GPCs 350 via XBar 370, or stored in memory 304. Results can be written to memory 304 via a memory partition unit 380, which implements a memory interface for reading data from and writing data to memory 304. Results can be sent to another PPU 300 or CPU via NVLink 310. In one embodiment, a PPU 300 includes a number U of memory partition units 380, which is equal to the number of independent and distinct memory devices coupled to the memory 304 of the PPU 300. This will be described below in conjunction with Figure 4B The memory partition unit 380 is described in more detail.

[0092] In one embodiment, the host processor executes a driver kernel that implements an application programming interface (API) that enables one or more applications to be executed on the host processor to schedule operations for execution on the PPU 300. In one embodiment, multiple computing applications are executed simultaneously by the PPU 300, and the PPU 300 provides isolation, quality of service (QoS), and independent address spaces for multiple computing applications. The application can generate instructions (e.g., API calls) that cause the driver kernel to generate one or more tasks to be executed by the PPU 300. The driver kernel outputs the tasks to one or more streams being processed by the PPU 300. Each task can include one or more related groups of threads, referred to herein as warps. In one embodiment, a warp includes 32 related threads that can execute in parallel. Collaborating threads can refer to multiple threads that include instructions to perform tasks and can exchange data through shared memory. In combination Figure 5A Describes threads and cooperative threads in more detail.

[0093] Figure 4A According to an embodiment Figure 3 PPU 300 GPC 350. Figure 4AAs shown, each GPC 350 includes multiple hardware units for processing tasks. In one embodiment, each GPC 350 includes a pipeline manager 410, a pre-raster operation unit (PROP) 415, a raster engine 425, a work distribution crossbar switch (WDX) 480, a memory management unit (MMU) 490, and one or more data processing clusters (DPCs) 420. It should be understood that Figure 4A The GPC 350 may include instead Figure 4A Other hardware units or units other than those shown in Figure 4A Other hardware units than those shown in .

[0094] In one embodiment, the operation of the GPC 350 is controlled by a pipeline manager 410. The pipeline manager 410 manages the configuration of one or more DPCs 420 for processing tasks assigned to the GPC 350. In one embodiment, the pipeline manager 410 may configure at least one of the one or more DPCs 420 to implement at least a portion of a graphics rendering pipeline. For example, a DPC 420 may be configured to execute a vertex shading program on a programmable streaming multiprocessor (SM) 440. The pipeline manager 410 may also be configured to route packets received from the work distribution unit 325 to appropriate logic units in the GPC 350. For example, some packets may be routed to fixed-function hardware units in the PROP 415 and / or the raster engine 425, while other packets may be routed to the DPC 420 for processing by the primitive engine 435 or the SM 440. In one embodiment, the pipeline manager 410 may configure at least one of the one or more DPCs 420 to implement a neural network model and / or a computational pipeline.

[0095] PROP unit 415 is configured to route data generated by raster engine 425 and DPC 420 to a raster operations (ROP) unit, in conjunction with Figure 4B The PROP unit 415 may also be configured to perform optimization of color blending, organize pixel data, perform address translation, etc.

[0096] The raster engine 425 includes several fixed-function hardware units configured to perform various raster operations. In one embodiment, the raster engine 425 includes a setup engine, a coarse raster engine, a culling engine, a clipping engine, a fine raster engine, and a tile aggregation engine. The setup engine receives the transformed vertices and generates plane equations associated with the geometric primitives defined by the vertices. The plane equations are sent to the coarse raster engine to generate coverage information for the primitives (e.g., x, y coverage masks for tiles). The output of the coarse raster engine is sent to the culling engine, where fragments associated with primitives that fail the z-test are culled, and unculled fragments are sent to the clipping engine, where fragments outside the viewing cone are clipped. Those fragments that remain after clipping and culling can be passed to the fine raster engine to generate attributes of pixel fragments based on the plane equations generated by the setup engine. The output of the raster engine 425 includes, for example, fragments to be processed by a fragment shader implemented in the DPC 420.

[0097] Each DPC 420 included in the GPC 350 includes an M pipeline controller (MPC) 430, a primitive engine 435, and one or more SMs 440. The MPC 430 controls the operation of the DPC 420, routing packets received from the pipeline manager 410 to appropriate units in the DPC 420. For example, packets associated with vertices may be routed to the primitive engine 435, which is configured to fetch vertex attributes associated with the vertices from the memory 304. Conversely, packets associated with shading programs may be sent to the SM 440.

[0098] SM 440 includes a programmable stream processor configured to process tasks represented by multiple threads. Each SM440 is multithreaded and is configured to execute multiple threads (e.g., 32 threads) from a specific thread group simultaneously. In one embodiment, SM 440 implements a SIMD (single instruction, multiple data) architecture, wherein each thread in a thread group (e.g., warp) is configured to process different data sets based on the same instruction set. All threads in a thread group execute the same instruction. In another embodiment, SM 440 implements a SIMT (single instruction, multiple thread) architecture, wherein each thread in a thread group is configured to process different data sets based on the same instruction set, but wherein each thread in a thread group is allowed to diverge during execution. In one embodiment, a program counter, a call stack, and an execution state are maintained for each thread bundle, and when threads within a thread bundle diverge, concurrency between serial executions in the thread bundle and the thread bundle is made possible. In another embodiment, a program counter, a call stack, and an execution state are maintained for each individual thread, thereby achieving equal concurrency between all threads within and between thread bundles. When execution state is maintained for each individual thread, threads executing the same instructions can be converged and executed in parallel for maximum efficiency. Figure 5A Describe SM440 in more detail.

[0099] MMU 490 provides an interface between GPC 350 and memory partition unit 380. MMU 490 can provide virtual address to physical address translation, memory protection, and arbitration of memory requests. In one embodiment, MMU 490 provides one or more translation lookaside buffers (TLBs) for performing translations from virtual addresses to physical addresses in memory 304.

[0100] Figure 4B According to an embodiment Figure 3 The memory partition unit 380 of the PPU 300. Figure 4B As shown, the memory partition unit 380 includes a raster operation (ROP) unit 450, a level 2 (L2) cache 460, and a memory interface 470. The memory interface 470 is coupled to the memory 304. The memory interface 470 may implement a 32, 64, 128, 1024 bit data bus, etc., for high-speed data transfer. In one embodiment, the PPU 300 incorporates U memory interfaces 470, one for each pair of memory partition units 380, wherein each pair of memory partition units 380 is connected to a corresponding memory device of the memory 304. For example, the PPU 300 may be connected to up to Y memory devices 304, such as a high bandwidth memory stack or a graphics double data rate version 5 synchronous dynamic random access memory or other types of persistent memory.

[0101] In one embodiment, memory interface 470 implements an HBMx memory interface, and Y is equal to half of U. In one embodiment, memory 304 supports single error correction double error detection (SECDED) error correction code (ECC) to protect data. For computing applications that are sensitive to data corruption, ECC provides higher reliability. In large cluster computing environments, PPU 300 processes very large data sets and / or long-running applications, reliability is particularly important.

[0102] In one embodiment, the PPU 300 implements a multi-level memory hierarchy. In one embodiment, the memory partition unit 380 supports unified memory to provide a single unified virtual address space for the CPU and PPU 300 memory, enabling data sharing between virtual memory systems. In one embodiment, the frequency of PPU 300 accesses to memory located on other processors is tracked to ensure that memory pages are moved to the physical memory of the PPU 300 that accesses the page more frequently. In one embodiment, the NVLink 310 supports address translation services that allow the PPU 300 to directly access the CPU's page tables and provide full access to the CPU's memory by the PPU 300.

[0103] In one embodiment, the copy engine transfers data between multiple PPUs 300 or between a PPU 300 and a CPU. The copy engine can generate a page fault for an address that is not mapped to a page table. The memory partition unit 380 can then service the page fault, map the address into a page table, and then the copy engine can perform the transfer. In conventional systems, fixed memory (e.g., non-pageable) is operated for multiple copy engines between multiple processors, which significantly reduces the available memory. Due to hardware paging faults, addresses can be passed to the copy engine without worrying about whether the memory page is resident, and the copy process is transparent.

[0104] Data from memory 304 or other system memory may be retrieved by memory partition unit 380 and stored in L2 cache 460, which is located on-chip and shared between various GPCs 350. As shown, each memory partition unit 380 includes a portion of L2 cache 460 associated with a corresponding memory device 304. Lower level caches may then be implemented in multiple units within a GPC 350. For example, each SM 440 may implement a level 1 (L1) cache. An L1 cache is a dedicated memory dedicated to a particular SM 440. Data from L2 cache 460 may be retrieved and stored in each L1 cache for processing in a functional unit of the SM 440. L2 cache 460 is coupled to a memory interface 470 and an XBar 370.

[0105] The ROP unit 450 performs graphics raster operations related to pixel color such as color compression, pixel blending, etc. The ROP unit 450 also implements depth testing in conjunction with the raster engine 425, receiving the depth of a sample position associated with a pixel fragment from the culling engine of the raster engine 425. The depth of the sample position associated with the fragment is tested relative to the corresponding depth in the depth buffer. If the fragment passes the depth test for the sample position, the ROP unit 450 updates the depth buffer and sends the result of the depth test to the raster engine 425. It will be understood that the number of memory partition units 380 can be different than the number of GPCs 350, and thus each ROP unit 450 can be coupled to each GPC 350. The ROP unit 450 tracks packets received from different GPCs 350 and determines to which GPC 350 the results generated by the ROP unit 450 are routed via the Xbar 370. Although in Figure 4B In the embodiment shown, ROP unit 450 is included within memory partition unit 380, but in other embodiments, ROP unit 450 may be external to memory partition unit 380. For example, ROP unit 450 may reside in GPC 350 or another unit.

[0106] Figure 5A According to an embodiment Figure 4A The streaming multiprocessor 440. Figure 5A As shown, SM 440 includes an instruction cache 505, one or more scheduler units 510, a register file 520, one or more processing cores 550, one or more special function units (SFU) 552, one or more load / store units (LSU) 554, an interconnection network 580, and a shared memory / L1 cache 570.

[0107] As described above, the work distribution unit 325 schedules tasks to be executed on the GPC 350 of the PPU 300. Tasks are assigned to specific DPCs 420 within the GPC 350, and if the task is associated with a shader program, the task may be assigned to the SM 440. The scheduler unit 510 receives tasks from the work distribution unit 325 and manages the scheduling of instructions assigned to one or more thread blocks assigned to the SM 440. The scheduler unit 510 schedules the thread blocks to execute as warps of parallel threads, where each thread block is assigned at least one warp. In one embodiment, each warp executes 32 threads. The scheduler unit 510 can manage a plurality of different thread blocks, assign warps to different thread blocks, and then dispatch instructions from a plurality of different cooperative groups to various functional units (i.e., core 550, SFU 552, and LSU 554) during each clock cycle.

[0108] Cooperative Groups is a programming model for organizing groups of communicating threads that allows developers to express the granularity at which threads are communicating, enabling the expression of richer and more efficient decompositions of parallelism. The cooperative launch API supports synchronization between thread blocks to execute parallel algorithms. Conventional programming models provide a single simple structure for synchronizing cooperative threads: a barrier across all threads of a thread block (e.g., the syncthreads() function). However, programmers often want to define thread groups at a granularity smaller than the thread block granularity and synchronize within the defined group, enabling higher performance, design flexibility, and software reuse in the form of a collective group-wide function interface.

[0109] Cooperative Groups enables programmers to explicitly define thread groups at sub-block (e.g., as small as a single thread) and multi-block granularity and perform collective operations such as synchronization on threads in a cooperative group. The programming model supports clean composition across software boundaries so that libraries and utility functions can safely synchronize in their local environment without making assumptions about convergence. Cooperative Groups primitives enable new patterns of cooperative parallelism, including producer-consumer parallelism, opportunistic parallelism, and global synchronization across the entire grid of thread blocks.

[0110] The dispatch unit 515 is configured to transmit instructions to one or more functional units. In this embodiment, the scheduler unit 510 includes two dispatch units 515, which enables two different instructions from the same thread warp to be scheduled during each clock cycle. In alternative embodiments, each scheduler unit 510 may include a single dispatch unit 515 or additional dispatch units 515.

[0111] Each SM 440 includes a register file 520 that provides a set of registers for the functional units of the SM 440. In one embodiment, the register file 520 is divided between each functional unit so that each functional unit is assigned a dedicated portion of the register file 520. In another embodiment, the register file 520 is divided between different warps executed by the SM 440. The register file 520 provides temporary storage for operands connected to the data paths of the functional units.

[0112] Each SM 440 includes L processing cores 550. In one embodiment, SM 440 includes a large number (e.g., 128, etc.) of different processing cores 550. Each core 550 may include a fully pipelined, single-precision, double-precision, and / or mixed-precision processing unit, including a floating-point arithmetic logic unit and an integer arithmetic logic unit. In one embodiment, the floating-point arithmetic logic unit implements the IEEE 754-2008 standard for floating-point operations. In one embodiment, core 550 includes 64 single-precision (32-bit) floating-point cores, 64 integer cores, 32 double-precision (64-bit) floating-point cores, and 8 tensor cores.

[0113] The tensor cores are configured to perform matrix operations, and in one embodiment, one or more tensor cores are included in core 550. Specifically, the tensor cores are configured to perform deep learning matrix operations, such as convolution operations for neural network training and inference. In one embodiment, each tensor core operates on a 4×4 matrix and performs a matrix multiplication and accumulation operation D=

[0114] A×B+C, where A, B, C, and D are 4×4 matrices.

[0115] In one embodiment, the matrix multiplication inputs A and B are 16-bit floating point matrices, while the accumulation matrices C and D can be 16-bit floating point or 32-bit floating point matrices. The tensor cores operate on 16-bit floating point input data as well as 32-bit floating point accumulations. The 16-bit floating point multiplication requires 64 operations, producing a full-precision product, which is then accumulated using 32-bit floating point additions with other intermediate products of the 4×4×4 matrix multiplication. In practice, tensor cores are used to perform larger two-dimensional or higher dimensional matrix operations built from these smaller elements. APIs (such as the CUDA9 C++ API) expose specialized matrix loads, matrix multiplications and accumulations, and matrix storage operations to efficiently use tensor cores from CUDA-C++ programs. At the CUDA level, the warp-level interface assumes that the 16×16 size matrix spans all 32 threads of the warp.

[0116] Each SM 440 also includes M SFUs 552 that perform special functions (e.g., attribute evaluation, reciprocal square root, etc.). In one embodiment, the SFUs 552 may include a tree traversal unit configured to traverse a hierarchical tree data structure. In one embodiment, the SFUs 552 may include a texture unit configured to perform texture map filtering operations. In one embodiment, the texture unit is configured to load a texture map (e.g., a 2D array of texture pixels) from memory 304 and sample the texture map to produce sampled texture values ​​for use in a shader program executed by the SM 440. In one embodiment, the texture map is stored in shared memory / L1 cache 470. The texture unit implements texture operations, such as filtering operations using mip maps (i.e., texture maps of different levels of detail). In one embodiment, each SM 440 includes two texture units.

[0117] Each SM 440 also includes N LSUs 554 that implement load and store operations between the shared memory / L1 cache 570 and the register file 520. Each SM 440 includes an interconnect network 580 that connects each functional unit to the register file 520 and connects the LSUs 554 to the register file 520 and the shared memory / L1 cache 570. In one embodiment, the interconnect network 580 is a crossbar switch that can be configured to connect any functional unit to any register in the register file 520 and to connect the LSUs 554 to memory locations in the register file and the shared memory / L1 cache 570.

[0118] The shared memory / L1 cache 570 is an on-chip memory array that allows data storage and communication between the SM 440 and the primitive engine 435 and between threads in the SM 440. In one embodiment, the shared memory / L1 cache 570 includes 128KB of storage capacity and is in the path from the SM 440 to the memory partition unit 380. The shared memory / L1 cache 570 can be used to cache reads and writes. One or more of the shared memory / L1 cache 570, the L2 cache 460, and the memory 304 is a backing store.

[0119] Combining data cache and shared memory functionality into a single memory block provides the best overall performance for both types of memory accesses. This capacity can be used by programs as a cache that does not use shared memory. For example, if the shared memory is configured to use half of the capacity, texture and load / store operations can use the remaining capacity. Integration within shared memory / L1 cache 570 enables shared memory / L1 cache 570 to function as a high throughput pipeline for streaming data, while providing high bandwidth and low latency access to frequently reused data.

[0120] When configured for general parallel computing, a simpler configuration can be used compared to graphics processing. Specifically, Figure 3 The fixed function graphics processing unit is shown bypassed, creating a simpler programming model. In a general purpose parallel computing configuration, the work distribution unit 325 assigns and distributes thread blocks directly to the DPC 420. The threads in the block execute the same program, use unique thread IDs in computations to ensure that each thread produces unique results, use SM 440 to execute the program and perform computations, use shared memory / L1 cache 570 to communicate between threads, and use LSU 554 to read and write global memory through shared memory / L1 cache 570 and memory partition unit 380. When configured for general purpose parallel computing, SM 440 can also write commands that scheduler unit 320 can use to start new work on DPC 420.

[0121] The PPU 300 may be included in a desktop computer, a laptop computer, a tablet computer, a server, a supercomputer, a smartphone (e.g., wireless, handheld device), a personal digital assistant (PDA), a digital camera, a vehicle, a head-mounted display, a handheld electronic device, etc. In one embodiment, the PPU 300 is included on a single semiconductor substrate. In another embodiment, the PPU 300 is included on a system on a chip (SoC) along with one or more other devices (such as an additional PPU 300, a memory 304, a reduced instruction set computer (RISC) CPU, a memory management unit (MMU), a digital-to-analog converter (DAC), etc.).

[0122] In one embodiment, PPU 300 may be included on a graphics card that includes one or more memory devices 304. The graphics card may be configured to interface with a PCIe slot on a motherboard of a desktop computer. In yet another embodiment, PPU 300 may be an integrated graphics processing unit (iGPU) or parallel processor included in a chipset of a motherboard.

[0123] Exemplary Computing System

[0124] Systems with multiple GPUs and CPUs are used in a variety of industries as developers expose and exploit more parallelism in applications such as artificial intelligence computing. High-performance GPU-accelerated systems with tens to thousands of computing nodes are deployed in data centers, research institutions, and supercomputers to solve larger problems. As the number of processing devices within high-performance systems increases, communication and data transmission mechanisms need to scale to support this increased bandwidth.

[0125] Figure 5B According to one embodiment, the use Figure 3300. The exemplary system 565 may be configured to implement Figure 1D The method 140 shown and / or Figure 1E The method 160 is shown. The processing system 500 includes a CPU 530, a switch 510, and each of the plurality of PPUs 300 and a corresponding memory 304. The NVLink 310 provides a high-speed communication link between each PPU 300. Figure 5B A specific number of NVLink 310 and interconnect 302 connections are shown in FIG, but the number of connections connected to each PPU 300 and CPU 530 may vary. Switch 510 interfaces between interconnect 302 and CPU 530. PPU 300, memory 304, and NVLink 310 may be located on a single semiconductor platform to form a parallel processing module 525. In one embodiment, switch 510 supports two or more protocols that interface between various different connections and / or links.

[0126] In another embodiment (not shown), NVLink 310 provides one or more high-speed communication links between each PPU 300 and CPU 530, and switch 510 interfaces between interconnect 302 and each PPU 300. PPU 300, memory 304, and interconnect 302 may be located on a single semiconductor platform to form a parallel processing module 525. In yet another embodiment (not shown), interconnect 302 provides one or more communication links between each PPU 300 and CPU 530, and switch 510 interfaces between each PPU 300 using NVLink 310 to provide one or more high-speed communication links between PPUs 300. In another embodiment (not shown), NVLink 310 provides one or more high-speed communication links between PPU 300 and CPU 530 through switch 510. In yet another embodiment (not shown), interconnect 302 provides one or more communication links directly between each PPU 300. One or more NVLink 310 high-speed communication links may be implemented as a physical NVLink interconnect or as an on-chip or on-die interconnect using the same protocol as NVLink 310.

[0127] In the context of this specification, a single semiconductor platform may refer to a unique single semiconductor-based integrated circuit manufactured on a bare die or chip. It should be noted that the term single semiconductor platform may also refer to a multi-chip module with increased connectivity that simulates on-chip operations and is substantially improved by utilizing conventional bus implementations. Of course, various circuits or devices may also be placed separately or in various combinations of semiconductor platforms, depending on the needs of the user. Optionally, the parallel processing module 525 may be implemented as a circuit board substrate, and each of the PPU 300 and / or memory 304 may be a packaged device. In one embodiment, the CPU 530, switch 510, and parallel processing module 525 are located on a single semiconductor platform.

[0128] In one embodiment, the signaling rate of each NVLink 310 is 20 to 25 Gbit / s, and each PPU 300 includes six NVLink 310 interfaces (e.g., Figure 5B Each NVLink 310 provides a data transfer rate of 25 Gbit / s in each direction, with six links providing 300 Gbit / s. When the CPU 530 also includes one or more NVLink 310 interfaces, the NVLink 310 can be used exclusively for, for example, Figure 5B PPU to PPU communication as shown, or some combination of PPU to PPU and PPU to CPU.

[0129] In one embodiment, NVLink 310 allows direct load / store / atomic access from CPU 530 to memory 304 of each PPU 300. In one embodiment, NVLink 310 supports coherency operations, allowing data read from memory 304 to be stored in the cache hierarchy of CPU 530, reducing cache access latency of CPU 530. In one embodiment, NVLink 310 includes support for address translation services (ATS), allowing PPU 300 to directly access page tables within CPU 530. One or more NVLinks 310 can also be configured to operate in a low power mode.

[0130] Figure 5C An exemplary system 565 is shown in which various architectures and / or functions of various previous embodiments may be implemented. The exemplary system 565 may be configured to implement Figure 1D The method 140 shown and / or Figure 1E Method 160 is shown.

[0131] As shown, a system 565 is provided that includes at least one central processing unit 530 connected to a communication bus 575. The communication bus 575 can be implemented using any suitable protocol, such as PCI (Peripheral Component Interconnect), PCI-Express, AGP (Accelerated Graphics Port), HyperTransport, or any other bus or one or more point-to-point communication protocols. The system 565 also includes a main memory 540. Control logic (software) and data are stored in the main memory 540, which can take the form of a random access memory (RAM).

[0132] The system 565 also includes an input device 560, a parallel processing system 525, and a display device 545, such as a conventional CRT (cathode ray tube), LCD (liquid crystal display), LED (light emitting diode), plasma display, etc. User input can be received from the input device 560 (e.g., keyboard, mouse, touch pad, microphone, etc.). Each of the aforementioned modules and / or devices can even be located on a single semiconductor platform to form the system 565. Optionally, the modules can also be placed separately or in various combinations of semiconductor platforms according to the needs of the user.

[0133] Furthermore, system 565 may be coupled to a network (e.g., a telecommunications network, a local area network (LAN), a wireless network, a wide area network (WAN) such as the Internet, a peer-to-peer network, a cable network, etc.) through network interface 535 for communication purposes.

[0134] The system 565 may also include auxiliary storage (not shown). The auxiliary storage 610 includes, for example, a hard disk drive and / or a removable storage drive, representative of a floppy disk drive, a tape drive, an optical disk drive, a digital versatile disk (DVD) drive, a recording device, a universal serial bus (USB) flash memory. The removable storage drive reads from and / or writes to a removable storage unit in a well-known manner.

[0135] Computer programs or computer control logic algorithms may be stored in the main memory 540 and / or the secondary storage. These computer programs, when executed, enable the system 565 to perform various functions. The memory 540, storage, and / or any other storage are possible examples of computer-readable media.

[0136] The architecture and / or functionality of the various prior figures may be implemented in the context of a general purpose computer system, a circuit board system, a game console system dedicated to entertainment purposes, a dedicated system, and / or any other desired system. For example, system 565 may take the form of a desktop computer, a laptop computer, a tablet computer, a server, a supercomputer, a smartphone (e.g., a wireless, handheld device), a personal digital assistant (PDA), a digital camera, a vehicle, a head mounted display, a handheld electronic device, a mobile telephone device, a television, a workstation, a game console, an embedded system, and / or any other type of logic.

[0137] Although various embodiments have been described above, it should be understood that they are presented by way of example only and not limitation. Thus, the breadth and scope of a preferred embodiment should not be limited by any of the above-described exemplary embodiments, but should be limited only in accordance with the following claims and their equivalents.

[0138] Machine Learning

[0139] Deep Neural Networks (DNNs) developed on processors such as the PPU 300 have been used in a variety of use cases: from self-driving cars to faster drug development, from automatic image captioning in online image databases to intelligent real-time language translation in video chat applications. Deep learning is a technology that models the neural learning process of the human brain, constantly learning, constantly getting smarter, and delivering more accurate results faster over time. A child is initially taught by an adult to correctly identify and classify various shapes, and eventually is able to recognize shapes without any coaching. Similarly, deep learning or neural learning systems need to be trained in object recognition and classification in order to become smarter and more efficient in recognizing basic objects, occluded objects, etc. while also assigning context to objects.

[0140] At the simplest level, neurons in the human brain look at the various inputs they receive, assign importance levels to each of these inputs, and pass outputs to other neurons for processing. An artificial neuron, or perceptron, is the most basic model of a neural network. In one example, a perceptron can receive one or more inputs that represent various features of an object that the perceptron is being trained to recognize and classify, and each of these features is given a certain weight based on the importance of that feature when defining the shape of the object.

[0141] Deep neural network (DNN) models include multiple layers of many connected nodes (e.g., perceptrons, Boltzmann machines, radial basis functions, convolutional layers, etc.), which can be trained with large amounts of input data to solve complex problems quickly and accurately. In one example, the first layer of a DNN model breaks down an input image of a car into its parts and looks for basic patterns (such as lines and angles). The second layer assembles lines to look for higher-level patterns, such as wheels, windshields, and mirrors. The next layer identifies the type of vehicle, and the last few layers generate labels for the input image, identifying the model of a specific car brand.

[0142] Once a DNN is trained, it can be deployed and used to recognize and classify objects or patterns in a process called inference. Examples of inference (the process by which a DNN extracts useful information from a given input) include recognizing handwritten numbers on check deposits in ATM machines, identifying images of friends in photos, providing movie recommendations to over 50 million users, recognizing and classifying different types of cars, pedestrians, and road hazards in self-driving cars, or translating human speech in real time.

[0143] During training, data flows through the DNN in a forward propagation phase until a prediction is produced, which indicates a label corresponding to the input. If the neural network does not correctly label an input, the error between the correct label and the predicted label is analyzed, and the weights are adjusted for each feature during a backward propagation phase until the DNN correctly labels that input and other inputs in the training data set. Training complex neural networks requires a large amount of parallel computing performance, including floating-point multiplication and addition supported by the PPU 300. Inference is less computationally intensive than training and is a latency-sensitive process in which a trained neural network is applied to new inputs it has not seen before to classify images, translate speech, and generally reason about new information.

[0144] Neural networks rely heavily on matrix math operations, and complex multi-layer networks require a lot of floating point performance and bandwidth for efficiency and speed. With thousands of processing cores optimized for matrix math operations and delivering tens to hundreds of TFLOPS of performance, the PPU 300 is a computing platform capable of delivering the performance required for deep neural network-based artificial intelligence and machine learning applications.

[0145] Note that the techniques described herein may be embodied in executable instructions stored in a computer-readable medium for use by or in conjunction with a processor-based instruction execution machine, system, device, or apparatus. Those skilled in the art will appreciate that for some embodiments, various types of computer-readable media may be included to store data. As used herein, "computer-readable media" includes one or more of any suitable media for storing executable instructions of a computer program, so that an instruction execution machine, system, device, or apparatus can read (or obtain) instructions from a computer-readable medium and execute the instructions for performing the described embodiments. Suitable storage formats include one or more of electrical, magnetic, optical, and electromagnetic formats. A non-exhaustive list of conventional exemplary computer-readable media includes: portable computer floppy disks; random access memory (RAM); read-only memory (ROM); erasable programmable read-only memory (EPROM); flash memory devices; and optical storage devices, including portable compact disks (CDs), portable digital video disks (DVDs), and the like.

[0146] It should be understood that the arrangement of the components shown in the drawings is for illustrative purposes, and other arrangements are also possible. For example, one or more elements described herein may be implemented in whole or in part as electronic hardware components. Other elements may be implemented in software, hardware, or a combination of software and hardware. Moreover, some or all of these other elements may be combined, some may be completely omitted, and additional components may be added while still implementing the functions described herein. Therefore, the subject matter described herein may be embodied in many different variations, and all of these variations are considered to be within the scope of the claims.

[0147] In order to promote the understanding of the subject matter described herein, many aspects are described according to the action sequence. It will be appreciated by those skilled in the art that various actions can be performed by a dedicated circuit or circuit, by a program instruction executed by one or more processors, or by a combination of the two. The description of any action sequence herein is not intended to imply that the specific order described for executing the sequence must be followed. Unless otherwise noted herein or clearly contradictory to the context, all methods described herein can be performed in any suitable order.

[0148] In the context of describing the subject matter (particularly in the context of the appended claims), the use of the terms "a", "an" and "the" and similar references should be interpreted as covering both the singular and the plural, unless otherwise stated herein or clearly contradicted by the context. The use of the term "at least one" followed by a list of one or more items (e.g., "at least one of A and B") should be understood to refer to one item (A or B) selected from the listed items or any combination of two or more of the listed items (A and B), unless otherwise stated herein or clearly contradicted by the context. In addition, the foregoing description is for illustrative purposes only and not for limiting purposes, as the scope of protection sought is defined by the claims described below and any equivalents thereof. Unless otherwise stated, the use of any and all examples or exemplary language (e.g., "such as") provided herein is intended only to better illustrate the subject matter and does not limit the scope of the subject matter. In the claims and written description, the use of the term "based on" and other similar phrases indicating conditions for producing a result is not intended to exclude any other conditions for producing that result. No language in the specification should be construed as indicating any non-claimed element as essential to the practice of the claimed invention.

Claims

1. A computer-implemented method, include: receiving an address for accessing an address space, the address space being mapped to a location in a physical memory associated with a processor, wherein the address space is divided into a strided memory space and at least one partitioned memory space; The address is determined to be within the stride memory space, wherein: A first amount of the strided memory space is mapped to a first subset of the locations in the physical memory that are aligned at a first common boundary across devices included in the physical memory, The remainder of the strided memory space is mapped to a second subset of the locations in the physical memory that are aligned on a second common boundary and distributed across the devices, and a first partitioned memory space of the at least one partitioned memory space being mapped to a third subset of the locations in the physical memory across the device between the first common boundary and the second common boundary; as well as A first location address in the first subset is calculated when the address is within the first amount of strided memory space, and a second location address in the second subset is calculated when the address is within the remainder of the strided memory space. 2 . The computer-implemented method of claim 1 , wherein the processor is a multi-threaded processor configured to perform simultaneous multiprocessing. 3 . The computer-implemented method of claim 1 , wherein the first subset of the locations includes an equal number from each of the devices. 4 . The computer-implemented method of claim 1 , wherein the second subset of the locations includes different quantities from at least two of the devices.

5. The computer-implemented method of claim 1, wherein the second subset of the locations is distributed proportionally among the third subset of the locations for the at least one partitioned memory space.

6. The computer-implemented method of claim 1 , wherein the remainder of the strided memory space is mapped to the second subset of locations according to a first format specified for the third subset of locations.

7. The computer-implemented method of claim 6, wherein the computing include: The bits of the first location address are reordered according to the first format.

8. The computer-implemented method of claim 6, wherein the computing include: A hash operation is applied to the bits of the first location address according to the first format.

9. The computer-implemented method of claim 6, wherein the first amount of the strided memory space is mapped to the first subset of the locations according to a second format different than the first format.

10. The computer-implemented method of claim 1, wherein a first partition memory space of the at least one partition memory space is accessed only by a first client, and a second partition memory space of the at least one partition memory space is accessed only by a second client.

11. A computer-implemented method according to claim 1, wherein the device includes a first physical memory device that is allocated only to a first partition memory space in the at least one partition memory space and a second physical memory device that is allocated only to a second partition memory space in the at least one partition memory space.

12. A computer-implemented method according to claim 1, wherein a first processing resource within the processor is allocated only to a first client associated with a partitioned memory space in at least one partitioned memory space, and a second processing resource within the processor is allocated only to a second client associated with a second partitioned memory space in at least one partitioned memory space.

13. A computer-implemented method according to claim 1, wherein a first cache resource within the processor is allocated only to a first client associated with a partitioned memory space in the at least one partitioned memory space, and a second cache resource within the processor is allocated only to a second client associated with a second partitioned memory space in the at least one partitioned memory space.

14. The computer-implemented method of claim 1, wherein taking into account a format specified for the strided memory space and the number of devices, the first amount of the strided memory space is mapped to all locations that are completely contained in the first subset of the locations.

15. A computer system, include: Devices contained in physical memory; a processor, coupled to the device and comprising an address mapping unit, configured to: receiving an address for accessing an address space, the address space being mapped to a location in physical memory, wherein the address space is divided into a first portion corresponding to a strided memory space and a second portion corresponding to at least one partitioned memory space; Determining that the address is within the first portion, wherein: a quantity of the first portion being mapped to a first subset of the locations in the physical memory that are aligned at a first common boundary across devices contained in the physical memory, The remainder of the first portion is mapped to a second subset of the locations in the physical memory that are aligned on a second common boundary and distributed across the devices, and the second portion being mapped to a third subset of the locations in the physical memory across the device between the first common boundary and the second common boundary; as well as When the address is in the first portion of the number, a first location address in the first subset is calculated, and when the address is within the remainder of the first portion, a second location address in the second subset is calculated.

16. The computer system of claim 15, wherein taking into account a format specified for the strided memory space and the number of devices, the first portion of the number is mapped to all locations that are completely contained in the first subset of the locations.

17. The computer system of claim 15, wherein the first subset of the locations includes an equal number from each of the devices.

18. The computer system of claim 15, wherein the second subset of the locations includes different quantities from at least two of the devices.

19. The computer system of claim 15, wherein the second subset of the locations is proportionally distributed among the third subset of the locations for the at least one partitioned memory space.

20. A non-transitory computer readable medium storing computer instructions which, when executed by one or more processors, cause the one or more processors to perform the following steps: receiving an address for accessing an address space, the address space being mapped to a location in a physical memory associated with a processor, wherein the address space is divided into a first portion corresponding to a strided memory space and a second portion corresponding to at least one partitioned memory space; Determining that the address is within the first portion, wherein: a quantity of the first portion being mapped to a first subset of the locations in the physical memory that are aligned at a first common boundary across devices contained in the physical memory, The remainder of the first portion is mapped to a second subset of the locations in the physical memory that are aligned on a second common boundary and distributed across the devices, and the second portion is mapped to a third subset of locations in the physical memory across the device between the first common boundary and the second common boundary; as well as When the address is in the first portion of the number, a first location address in the first subset is calculated, and when the address is within the remainder of the first portion, a second location address in the second subset is calculated.

21. A computer-implemented method, include: receiving an address for accessing an address space, the address space being mapped to a location in a physical memory associated with a processor, wherein the address space is divided into a strided memory space and at least one partitioned memory space, the strided memory space being distributed among memory devices comprising the physical memory; determining that the address is within the stride memory space; mapping the address to a location in the physical memory allocated to a first partition memory space of the at least one partition memory space, wherein each partition memory space is allocated to an exclusive portion of the memory device; as well as The location in the physical memory allocated to the first partition memory space is accessed.