Finish cuda core part refactoring