100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Exam 3 - GPU Programming EXAMS WITH CORRECT QUESTIONS AND ANSWERS.

Rating
-
Sold
-
Pages
18
Grade
A
Uploaded on
01-04-2025
Written in
2024/2025

what does GPU stand for? Graphics Processing Unit GPU programming have hundreds or thousands of small, efficient cores that can process lots of data at the same time, GPUs are parallel processors. Heterogeneous computing - both the CPU (host) and GPU (device) work together to complete tasks. Host - This is the CPU and its memory (often called "host memory") (RAM) The CPU handles the main logic of the program, coordinating the overall flow and tasks. DeviceGPU and its memory (known as "device memory") The GPU excels at handling computations that can be done in parallel, so it's ideal for performing repetitive, data-heavy tasks quickly. How It Works: Data Transfer: - The CPU (host) first loads data into its own memory. To utilize the GPU, it needs to transfer this data to the GPU's device memory. Data is sent from the CPU memory to the GPU memory through the PCI Bus that carry every piece of data that needs to be processed, takes the bridge Kernel Launch: - The CPU sends a function (called a kernel) to the GPU. This kernel is a piece of code that each GPU core will execute in parallel. Computation on Device - The GPU processes the data in parallel, performing the operations specified in the kernel. To optimize performance, GPUs utilize on-chip caches. - These caches store frequently accessed data close to the processing units to minimize data retrieval times from the main GPU memory (VRAM). Results Transfer: - Once the computation is complete, the GPU transfers the results back to the CPU. The serial code ran on and defined sequentially, meaning one instruction completes before the next begins (CPUs excel in executing serial code due to their higher clock speeds optimized for a broad range of tasks, including complex arithmetic and logic operations). Parallel code ran on GPU, allowing multiple instructions to be executed simultaneously. This is beneficial for tasks that can be divided into independent sub-tasks, which can be processed at the same time DRAM - Dynamic random memory is in the GPU what does NVCC compiler stand for? NVIDIA CUDA Compiler (used for GPU code) While nvcc is optimized for CUDA, it integrates a host C/C++ compiler that can also compile standard C or C++ programs. This makes nvcc a versatile tool in mixed development environments where both GPU-accelerated and standard CPU processes are being developed. what is NVIDIA CUDA

Show more Read less
Institution
GPU PRACTISE
Course
GPU PRACTISE










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
GPU PRACTISE
Course
GPU PRACTISE

Document information

Uploaded on
April 1, 2025
Number of pages
18
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

Exam 3 - GPU Programming
EXAMS WITH CORRECT
QUESTIONS AND ANSWERS.

what does GPU stand for - ✔✔Graphics Processing Unit



GPU programming have - ✔✔hundreds or thousands of small, efficient cores that can process lots of
data at the same time,



GPUs are _____ - ✔✔parallel processors



Heterogeneous computing - ✔✔both the CPU (host) and GPU (device) work together to complete
tasks.



Host - ✔✔This is the CPU and its memory (often called "host memory") (RAM)



The CPU handles the - ✔✔main logic of the program, coordinating the overall flow and tasks.



Device - ✔✔GPU and its memory (known as "device memory")



The GPU excels at handling - ✔✔computations that can be done in parallel, so it's ideal for
performing repetitive, data-heavy tasks quickly.



How It Works: - ✔✔



Data Transfer: - ✔✔The CPU (host) first loads data into its own memory. To utilize the GPU, it needs
to transfer this data to the GPU's device memory.

,Data is sent from the CPU memory to the GPU memory through the - ✔✔PCI Bus that carry every
piece of data that needs to be processed, takes the bridge



Kernel Launch: - ✔✔The CPU sends a function (called a kernel) to the GPU. This kernel is a piece of
code that each GPU core will execute in parallel.



Computation on Device - ✔✔The GPU processes the data in parallel, performing the operations
specified in the kernel.



To optimize performance, GPUs utilize on-chip caches. - ✔✔These caches store frequently accessed
data close to the processing units to minimize data retrieval times from the main GPU memory
(VRAM).



Results Transfer: - ✔✔Once the computation is complete, the GPU transfers the results back to the
CPU.



serial code ran on and definition - ✔✔sequentially, meaning one instruction completes before the
next begins (CPUs excel in executing serial code due to their higher clock speeds optimized for a
broad range of tasks, including complex arithmetic and logic operations.



parallel code ran on - ✔✔GPU-allows multiple instructions to be executed simultaneously. This is
beneficial for tasks that can be divided into independent sub-tasks, which can be processed at the
same time



DRAM - ✔✔Dynamic random mamory is in the GPU



what does NVCC compiler stand for - ✔✔NVIDIA CUDA Compiler (used for GPU code)



While nvcc is optimized for CUDA, it integrates a - ✔✔host C/C++ compiler which can also compile
standard C or C++ programs. This makes nvcc a versatile tool in mixed development environments
where both GPU-accelerated and standard CPU processes are being developed.



what is NVIDIA CUDA Compiler used for - ✔✔compiling CUDA code to run on NVIDIA GPUs.
However, it can also compile standard C code to run on the CPU.

, Developers can maintain a single compiler setup for both their CPU and GPU code. This helps in
simplifying the build process and maintaining consistency across different parts of a project. - ✔✔



example of compiling code using nvcc - ✔✔nvcc hello_world.cu



what is the extension typically used for CUDA files - ✔✔.cu but can be used for C



Execution Command: - ✔✔./a.out



The C code runs on the CPU ("host"). This is standard for programs that - ✔✔don't utilize GPU-
specific code (like CUDA).



Compilation Process: - ✔✔



nvcc processes CUDA code by separating out the CUDA kernels and device functions from the host
code. It compiles the CUDA parts into - ✔✔PTX (Parallel Thread Execution) code or binary code,
which is executable on the GPU.



The non-CUDA code is compiled into machine code targeted at the CPU using the integrated or
external C/C++ compiler, - ✔✔



C code runs on the - ✔✔CPU (host) machine



how are kernel functions called inside the main - ✔✔<<< ... >>>();



what goes inside this syntax - ✔✔firs #: number of blocks in grid

second #: number of threads per block



__global__ indicates what - ✔✔•a function that:

-Runs on the device

-Is called from host code



nvcc separates source code into - ✔✔host and device components
$17.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
Sinzorah

Get to know the seller

Seller avatar
Sinzorah Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
1 year
Number of followers
0
Documents
318
Last sold
1 month ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions