Added call to malloc in copy_to_device.
Added call to malloc in copy_to_device.

psuriana/Halide,ronen/Halide,jiawen/Halide,kgnk/Halide,kgnk/Halide,ronen/Halide,kgnk/Halide,jiawen/Halide,psuriana/Halide,psuriana/Halide,kgnk/Halide,jiawen/Halide,jiawen/Halide,ronen/Halide,ronen/Halide,ronen/Halide,psuriana/Halide,ronen/Halide,jiawen/Halide,psuriana/Halide,kgnk/Halide,kgnk/Halide,ronen/Halide,psuriana/Halide,kgnk/Halide,jiawen/Halide,ronen/Halide,kgnk/Halide,jiawen/Halide,psuriana/Halide