cleanup cuda.py