merge AMD related code.