whittle down temp memory usage of gpu.py