[ Optest ]  refactor optest check_output_with_place logic (#40928)
[ Optest ]  refactor optest check_output_with_place logic (#40928)

* first version, maybe many errors

* refactor op_test

* fix compare list

* fix bg

* fix bugs
luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,luotao1/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle