Fixes #5645: caches the AMD configuration