Fix amd implementation.