Auto-patch Adam kernel