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


Former-commit-id: b661150845d9e216fbbef8cf7f9dcb75e0a58f9b
darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,Trass3r/Halide