Framework for GPU kernel