Coursera

[GPU programming] GPU Programming Quiz

star.candy 2022. 6. 27. 21:42
질문 1

It is preferred for compilation of C/C++ that the javac compiler is used.

False

This is correct because the preferred cross compilers for C/C++ are gcc and g++.

 

질문 2

Which keyword is used as part of Runtime API kernels to indicate that the function is available for execution on the GPU and called from CPU code?

__global__

CUDA __global__ keyword indicates that the function can be called by the host(CPU) for the code to be executed on the GPU.

 

질문 3

When developing Driver API-based CUDA code, you will need to initialize all of the following except:.

The float

While float type primitives are useful for writing code, they are not required to execute Driver API code.

 

질문 4

Which three keywords are needed to inform the compiler where code can be called from and where it can be executed?

__global__, __device__, __host__

 

질문 5

What is the relationship between blocks, grids, and threads?

Threads make blocks, which are optionally composed into grids for 3-dimensional access.

 

질문 6

What keyword should you use to specify a variable as an integer in register memory?

int

This statement is correct, though it isn’t guaranteed to always end up being set to a register.

 

질문 7

Build tools like make and cmake allow for editing code files?

False

these types of tools do not allow editing of code files, they are used to compile and run code in a variety of languages.

 

질문 8

The Nvidia NSight collection of plugins are available for which tools?

Eclipse and Visual Studio IDEs.

 

질문 9

The CUDA Framework’s Runtime API is written to be used directly in many programming languages.

False

CUDA Runtime API code needs to be written in C/C++.

 

질문 10

Using the CUDA Driver API will require the developer to manage which of the following?

Contexts, devices, and programming modules

Feedback: Writing Driver API code requires developers to manage the three important components in order to execute code on Nvidia GPUs.