Central Processing Unit(CPU) is main compute device. These days, computers that have accelerator are widely used for supercomputer. There are several kinds of accelerators, GPU, FPGA, Intel Xeon phi, etc. If you use accelerator to run compute intensive jobs, you can save energy and get better performance. Computers that have accelerators are called heterogeneous system. To use heterogeneous system, we need new programming model for parallel programming. The most popular programming models are CUDA and OpenCL. CUDA is a proprietary parallel computing framework for NVIDIA GPUs specically. While OpenCL is a standard and open parallel computing framework for various compute devices. Even though early OpenCL and CUDA were very similar, they are not compatible with each other. In this paper, we present similarities and differenes between the two programming models. And based on this comparison, we propose an automatic translator for both OpenCL to CUDA and CUDA to OpenCL. We show that our translator achieves comparable performance with three benchmark suites:Rodinia, NVIDIA SDK, SNU NPB. There are many CUDA and OpenCL application. Our translator is meaningful because we can translate OpenCL application to CUDA application, and vice versa. Through this work, we can reuse applications without any modications and widen code base.