fix op_register_version for compare ops, test=op_version (#30007)
fix op_register_version for compare ops, test=op_version (#30007)

Co-authored-by: zhoushunjie <963d2416b30b344508d652084bba5f00332ac290@baidu.com>
luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle