control code changes like in CUDA version