How to do heterogeneous execution on cpu and gpu?

Hi~ Can this unittest case help you?