Created by: wangxicoding
Enforce in cuda kernel may not catch in paddle,so also need assert type(e) == RuntimeError