[Cherry pick] ddd60444, fix judge pslib & transpiler !23855
Created by: MrChengmo
cherry-pick: https://github.com/PaddlePaddle/Paddle/pull/23720, 修复了 transpiler 与 pslib 模式判断的问题
Created by: MrChengmo
cherry-pick: https://github.com/PaddlePaddle/Paddle/pull/23720, 修复了 transpiler 与 pslib 模式判断的问题