This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12624|Reply: 0

CUDA is different from OpenCL

[Copy link]
Posted on 4/22/2018 9:42:36 PM | | | |
According to the website information, a brief compilation of the differences between CUDA and OpenCL. Please point out any errors.

Digression: A simulation test at Sandia National Laboratory in the United States proved that due to the limitations of storage mechanism and memory bandwidth, 16-core, 32-core or even 64-core processors not only cannot bring performance improvements to supercomputers, but may even lead to a significant decrease in efficiency.

What is OpenCL?

It is an open and free standard for parallel programming for the general purpose of heterogeneous systems initiated by Apple and jointly produced by many well-known manufacturers in the industry, and it is also a unified programming environment. It is convenient for software developers to write efficient and lightweight code for high-performance computing servers, desktop computing systems, and handheld devices, and is widely used in multi-core processors (CPUs), graphics processing units (GPUs), cell-type architectures, and other parallel processors such as digital signal processors (DSPs), and has broad development prospects in various fields such as games, entertainment, scientific research, and medical care.

What is CUDA?

CUDA is an architecture based on parallel computing on Nvidia GPUs. CUDA mainly includes two aspects: one is the ISA instruction set architecture; the second hardware computing engine; It's actually hardware and instruction set. In other words, we can think of CUDA as an architecture similar to X86 or cell, but based on GPUs, not traditional CPUs.




What is OpenCL actually?

OpenCL is actually a brand new API for parallel programming of heterogeneous systems, and OpenCL can use GPUs to do some parallel computing work.
OpenGL is for graphs, while OpenCL is for parallel computing.
In the process of OpenCL development, the technical platforms are all NVIDIA GPUs, and in fact, OpenCL is developed based on NVIDIA GPU platforms. In addition, the first demo of OpenCL was also running on NVIDIA GPUs.
Essentially, OpenCL is a technology equivalent to DirectX in the Windows platform. Or rather, it is an API interface that connects hardware and software. In this respect, it is similar to OpenGL, but OpenCL is much more extensive than OpenGL, and it is not only used for 3D graphics. If you describe it in one sentence, the role of OpenCL is to unleash the hardware potential by calling the computing resources of the processor and GPU, so that the program runs faster and better.
What is CUDA actually?

The CUDA architecture is native, specially built for computing interfaces, and this hardware architecture, including instruction sets, is a complete set of architectures designed for this kind of parallel computing and heterogeneous computing. The CUDA architecture can support APIs, including OpenCL or DirectX, and CUDA also supports C, C++, Fortran, Java, Python and other languages.



What is the relationship between OpenCL and CUDA?

The relationship between CUDA and OpenCL is not a conflict relationship, but an inclusive relationship. OpenCL is an API, at the first level, the CUDA architecture is a higher level, whether it is OpenCL or DX11 or C language, Fortran, DX11 computing, can be supported. As a program developer, generally they only understand these languages or APIs, and can use multiple languages to develop their own programs, no matter what language they choose, as long as they want to call the computing power of the GPU, they can use CUDA to program on this architecture.
The technical differences between OpenCL and CUDA are mainly reflected in the implementation method. CUDA based on C language is packaged into an easy-to-write code, so even researchers who are not familiar with chip construction may use CUDA tools to write practical programs. Although OpenCL is syntactically close to CUDA, it emphasizes the underlying operations more, so it is more difficult, but because of this, OpenCL can run across platforms.
CUDA is a parallel computing architecture that contains an instruction set architecture and a corresponding hardware engine. OpenCL is an application programming interface (API) for parallel computing, and OpenCL is a new CUDA program development path in addition to C for CUDA on the NVIDIA CUDA architecture.
If you want to gain more control over the hardware, you can use the OpenCL API to program, and if you don't know much about the API, you can also program in CUDA C, which are two different ways of programming, and they have their similarities and differences. But there is a little bit when OpenCL and CUDA C languages are developed, in parallel computing, their concepts are similar, these two programs have great similarities in programs, so it is relatively easy to port programs to each other.


CUDA C language is positioned differently from OpenCL, or in other words, it uses different people. CUDA C is a high-level language that can be easily used by non-professionals who don't know much about hardware; OpenCL is a hardware-oriented application development interface, which gives programmers more control over the hardware, and it will be more difficult to get started and develop.
Programmers' usage habits are also very important, those who use C language on the X86 CPU platform will easily accept the C language based on the CUDA GPU platform; People who are accustomed to using OpenGL graphics development will be more friendly to see OpenCL, and it will be very easy to develop computing programs related to graphics and video on its basis.






Previous:HttpRuntime Cache reads set cache information encapsulation
Next:Why not give MB to set avatars
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com