hardware-gpu
Introduction
The graphics processing unit, or GPU was originally designed to accelerate the rendering of 3D graphics. you can use graphics SDK(DirectX, OpenGL
) to use GPU for rendering, but it has become one of the most important types of computing technology now
, it is designed for parallel processing
, the GPU is used in a wide range of applications, including:
- Graphics and video rendering.
Artificial intelligence
(AI)Machining learning
Deep learning
- More
GPU
GPUs come in two basic types of a computer: integrated and discrete. An integrated GPU does not come on its own separate card at all and is instead embedded alongside the CPU. A discrete GPU is a distinct chip that is mounted on its own circuit board and is typically attached to a PCI Express slot.
Integrated Graphics Processing Unit
The majority of GPUs on the market are actually integrated graphics. So, what are integrated graphics and how does it work in your computer? A CPU that comes with a fully integrated GPU on its motherboard allows for thinner and lighter systems, reduced power consumption, and lower system costs.
Intel® Graphics Technology, which includes Intel® Iris® Plus and Intel® Iris® Xe
graphics, is at the forefront of integrated graphics technology.
Discrete Graphics Processing Unit
Many computing applications can run well with integrated GPUs. However, for more resource-intensive
applications with extensive performance demands, a discrete GPU (sometimes called a dedicated graphics card
) is better suited to the job.
GPU vs Graphics Card
While the terms GPU and graphics card (or video card) are often used interchangeably
, there is a subtle distinction between these terms. Much like a motherboard contains a CPU, a graphics card refers to an add-in board that incorporates the GPU. This board also includes the raft of components required to both allow the GPU to function and connect to the rest of the system.
GPU vs CPU
CPU | GPU |
---|---|
Central Processing Unit | Graphics Processing Unit |
Several cores | Many cores |
Low latency | High throughput |
Good for serial processing | Good for parallel processing |
Can do a handful of operations at once | Can do thousands of operations at once |
Architecturally, the CPU is composed of just a few cores with lots of cache memory that can handle a few software threads at a time. In contrast, a GPU is composed of hundreds of cores that can handle thousands of threads simultaneously.
GPU
The GPU is a processor that is made up of many smaller and more specialized cores(special, worker, student)
. By working together, the cores deliver massive performance when a processing task can be divided up and processed across many cores.
CPU
CPU is commonly referred to as the brain of the computer(generic, smart, professor)
. It is essential to all modern computing systems as it executes the commands and processes needed for your computer and operating system.
Difference
The CPU is suited to a wide variety of workloads, especially those for which latency or per-core performance are important
. A powerful execution engine, the CPU focuses its smaller number of cores on individual tasks and on getting things done quickly. This makes it uniquely well equipped for jobs ranging from serial computing to running databases.
GPUs began as specialized ASICs developed to accelerate specific 3D rendering tasks. Over time, these fixed-function engines became more programmable and more flexible. While graphics and the increasingly lifelike visuals of today’s top games remain their principal function, GPUs have evolved to become more general-purpose parallel processors as well
, handling a growing range of applications.
if you run a small task, CPU is faster than GPU, but if you run a complex task, GPU is faster as GPUs break complex problems into thousands or millions of separate tasks and work them out at once
Market
Intel has the big market due to its Integrated Graphics Processing Unit, while for Dedicated GPU, Nvidia and AMD are the two main players
.
Program GPU based application
Earlier years, There are only two SDK OpenGL(Apple lead this(open source): linux, mac, windows) and DirectX(Microsoft)
to program GPD based application, applications can use them to render 2D and 3D computer graphics which is the main task of GPU, but today, except graphic rending, GPU is also designed for parallel processing, so the SDK should add proper APIS to support this, hence openGL ---> OpenCL
, DirectX with new version supports this, beside OpenCL and new version DirectX which support different vendors, Nvidia provides its own SDK Cuda
which is more powerful and easy to use if you are using Nvidia GPU which has Cuda Arch.
OpenGL vs DirectX
Basis | OpenGL | DirectX |
Definition | It is an open-source cross-platform application of interface programming which works on rendering of vector graphics of 2d and 3d graphics. | DirectX is a collection APIs which re using for many different types of multimedia platform as well as game programming. |
Developer | It was developed by the Khronos group but originally Silicon Graphics Inc. started its development in 1991 and released on June 30, 1992, for public use. | Microsoft was its developer and launched it on September 30, 1995. |
Operating systems | OpenGL can be installed on Linux, Mac OS, and Microsoft Windows operating systems. | DirectX can run on Microsoft Windows, Dreamcast, Xbox, Xbox One, Xbox 360, Xbox series, and Series S because it is compatible with these operating systems. |
Latest version | The latest version of OpenGL was released 3 years ago means on July 31, 2017, and named 4.6. | 12 Ultimate API was released on November 10, 2020 as its latest collection. |
Availability | For working with OpenGL you can visit on www.opengl.org and have it on your personal computer. | Visit www.microsoft.com for DirectX and you can get any of the members of its collection to start working with that. |
Supported file format | It supports .obj, .3ds as 3d model file formats for working on them. | You can have 3d model of this software in c4d, max, obj, fbx, ma, 3ds, blend, 3dm, and many more file formats. |
Written in Language | OpenGL is written in C or C++ computer language. | As C and C++ are game designer’s pet languages so that is way DirectX is also written in C and C++ computer languages. |
OpenCL vs Cuda
Note: Most GPUs are designed for a specific usage, real-time 3D graphics or other mass calculations:
- Gaming
- GeForce GTX, RTX
- Nvidia Titan
- Radeon HD, R5, R7, R9, RX, Vega and Navi series
- Radeon VII
- Cloud Gaming
Nvidia GRID
- Radeon Sky
- Workstation
Nvidia Quadro
- AMD FirePro
- AMD Radeon Pro
- Cloud Workstation
- Nvidia Tesla
- AMD FireStream
- Artificial Intelligence training and Cloud
Nvidia Tesla
- AMD Radeon Instinct
- Automated/Driverless car
- Nvidia Drive PX
Nvidia Family: mobile GPU (Tegra), discrete GPU for a laptop (GeForce GT), desktop (GeForce GTX) and server (Quadro and Tesla)
Suggestion
- GPU from Nvidia, Use Cuda
- NOT from Nvidia, Use OpenCL, or DirectX for Windows
Nvidia
To be more precise, Cuda is not a language or an API. Cuda is a platform for parallel computing and at the same time, it’s a programming model to utilize GPU to speed up general purpose computing
. The developer still can write software at C or C++, and incorporate some extensions in the form of a few basic keywords.