Backport GPU cache emulation (bounty-centifized now)