A processor comprising a mode indicator, a plurality of processing cores, and a neural network unit (NNU), comprising a memory array, an array of neural processing units (NPU), cache control logic, and selection logic that selectively couples the plurality of NPUs and the cache control logic to the memory array. When the mode indicator indicates a first mode, the selection logic enables the plurality of NPUs to read neural network weights from the memory array to perform computations using the weights. When the mode indicator indicates a second mode, the selection logic enables the plurality of processing cores to access the memory array through the cache control logic as a cache memory.
Please help me write a proper abstract based on the patent claims. CLAIM: 1. A processor, comprising: a mode indicator; a plurality of processing cores; and a neural network unit (NNU), comprising: a memory array; an array of neural processing units (NPU); cache control logic; and selection logic, configured to selectively couple the plurality of NPUs and the cache control logic to the memory array; wherein when the mode indicator indicates a first mode, the selection logic enables the plurality of NPUs to read neural network weights from the memory array to perform computations using the weights; and wherein when the mode indicator indicates a second mode, the selection logic enables the plurality of processing cores to access the memory array through the cache control logic as a cache memory. 2. The processor of claim 1, further comprising: wherein when the mode indicator indicates the second mode, the plurality of processing cores access the memory array through the cache control logic as a victim cache memory. 3. The processor of claim 1, further comprising: wherein when the mode indicator indicates the second mode, the plurality of processing cores access the memory array through the cache control logic as a slice of a last level cache memory of the processor. 4. The processor of claim 3, further comprising: a plurality of last level cache slices; and wherein when the mode indicator indicates the second mode, the memory array and cache control logic operate in conjunction with the plurality of last level cache slices as the last level cache memory that the plurality of processing cores access. 5. The processor of claim 1, further comprising: wherein the NNU is coupled to the plurality of processing cores; and wherein when the mode indicator indicates the first mode, the NNU is controllable by the plurality of processing cores to accelerate neural network computations for the plurality of processing cores. 6. The processor of claim 5, further comprising: a ring bus that couples the NNU and the plurality of processing cores. 7. The processor of claim 6, further comprising: a plurality of last level cache slices coupled to the ring bus; and wherein when the mode indicator indicates the second mode, the memory array and cache control logic operate in conjunction with the plurality of last level cache slices as a last level cache memory that the plurality of processing cores access via the ring bus. 8. The processor of claim 1, further comprising: wherein to transition from the second mode to the first mode, the cache control logic write-back-invalidates the memory array. 9. The processor of claim 1, further comprising: wherein the plurality of processing cores are x86 instruction set architecture processing cores. 10. A method for operating a processor having a mode indicator, a plurality of processing cores, and a neural network unit (NNU) comprising a memory array, an array of neural processing units (NPU), cache control logic, and selection logic, configured to selectively couple the plurality of NPUs and the cache control logic to the memory array, the method comprising: enabling, by the selection logic in response to setting the mode indicator to indicate a first mode, the plurality of NPUs to read neural network weights from the memory array to perform computations using the weights; and enabling, by the selection logic in response to setting the mode indicator to indicate a second mode, the plurality of processing cores to access the memory array through the cache control logic as a cache memory. 11. The method of claim 10, further comprising: accessing, by the plurality of processing cores when the mode indicator indicates the second mode, the memory array through the cache control logic as a victim cache memory. 12. The method of claim 10, further comprising: accessing, by the plurality of processing cores when the mode indicator indicates the second mode, the memory array through the cache control logic as a slice of a last level cache memory of the processor. 13. The method of claim 12, further comprising: wherein the processor further comprises a plurality of last level cache slices; and operating, by the memory array and cache control logic when the mode indicator indicates the second mode, in conjunction with the plurality of last level cache slices as the last level cache memory that the plurality of processing cores access. 14. The method of claim 10, further comprising: wherein the NNU is coupled to the plurality of processing cores; and controlling, by the plurality of processing cores when the mode indicator indicates the first mode, the NNU to accelerate neural network computations for the plurality of processing cores. 15. The method of claim 14, further comprising: where the processor further comprises a ring bus that couples the NNU and the plurality of processing cores. 16. The method of claim 15, further comprising: where the processor further comprises a plurality of last level cache slices coupled to the ring bus; and operating, by the memory array and cache control logic when the mode indicator indicates the second mode, in conjunction with the plurality of last level cache slices as a last level cache memory that the plurality of processing cores access via the ring bus. 17. The method of claim 10, further comprising: write-back-invalidating, by the cache control logic, the memory array to transition from the second mode to the first mode. 18. The method of claim 10, further comprising: wherein the plurality of processing cores are x86 instruction set architecture processing cores. 19. A computer program product encoded in at least one non-transitory computer usable medium for use with a computing device, the computer program product comprising: computer usable program code embodied in said medium, for specifying a processor, the computer usable program code comprising: first program code for specifying a mode indicator; second program code for specifying a plurality of processing cores; and third program code for specifying a neural network unit (NNU), comprising: a memory array; an array of neural processing units (NPU); cache control logic; and selection logic, configured to selectively couple the plurality of NPUs and the cache control logic to the memory array; wherein when the mode indicator indicates a first mode, the selection logic enables the plurality of NPUs to read neural network weights from the memory array to perform computations using the weights; and wherein when the mode indicator indicates a second mode, the selection logic enables the plurality of processing cores to access the memory array through the cache control logic as a cache memory. 20. The computer program product of claim 19, wherein the at least one non-transitory computer usable medium is selected from the set of a disk, tape, or other magnetic, optical, or electronic storage medium.