TP 0.1 - Device query
Sept. 2020
You should complete this part within 30 minutes.
Use and extend the code sample provided in the next section to query the following properties of a CUDA device:
The code provided in the file device_query.cu
in the archive student_resources.tar.gz
is suggested as a starting point for you. You are expected to insert your code in the sections demarcated with //@@
. You should not have to make any change in other code sections.
The relevant documentations are:
cudaGetDeviceCount()
and cudaGetDeviceProperties()
.Please notice that you do not need to import any header file when using core** CUDA functions:** they are automatically made available in the global namespace for .cu
files by the compiler.
Once you have completed this exercise, please take some time to think about the following questions.