code gen method for gpu types
Merge pull request #1 from soloman817/master

update