[Solved] CSCI376-Assignment 1 OpenCL Basics

$25

File Name: CSCI376_Assignment_1_OpenCL_Basics.zip
File Size: 320.28 KB

SKU: [Solved] CSCI376-Assignment 1 OpenCL Basics Category: Tag:
5/5 - (1 vote)

Write an OpenCL program that does the following:

  • Allow the user to enter whether he/she wants to use a CPU or a GPU device. Based on the users selection, search the system for all CPU or GPU devices. (Note that some systems have multiple CPUs and GPUs).
    • mark)
  • Based on the users choice, display the following information for each CPU/GPU device that is available on the system: o Name of the platform(s) that support that device
    • Device type CPU or GPU

(hint: CL_DEVICE_TYPE_CPU or CL_DEVICE_TYPE_GPU) o Device name

  • Number of compute units

(hint: CL_DEVICE_MAX_COMPUTE_UNITS) o Maximum work group size

(hint: CL_DEVICE_MAX_WORK_GROUP_SIZE) o Maximum work item sizes

(hint: CL_DEVICE_MAX_WORK_ITEM_SIZES) o Global memory size

(hint: CL_DEVICE_GLOBAL_MEM_SIZE)

  • Based on the devices available, allow the user to select one device. Check whether the device supports the cl_khr_icd extension (hint: CL_DEVICE_EXTENSIONS). Create a context and a command queue for that device.
  • Read the program source code from the provided source.cl file and build the program. Display whether or not the program built successfully and display the program build log (display the build log even if the program built successfully. Note: for some compilers, the build log will be empty if successful).
  • Find and display the number of kernels in the program. Create kernels from the program and display all the kernel function names.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSCI376-Assignment 1 OpenCL Basics[Solved] CSCI376-Assignment 1 OpenCL Basics
$25