1. A system comprising: a cache; compute engines connected to said cache; cache allocation logic associated with a way mask disposed between said cache and said compute engines, said way mask partitioned into ways, wherein some ways are dedicated to only one of said compute engines and other ways are shared among more than one of said compute engines; a power control unit to monitor a power state of said compute engines and to update said way mask based on said power state of said compute engines.