рус eng
 
 Резюме
 Работа
 Публикации
 Заметки
 Образование
 Увлечения
 
Программирование графических процессоров
Спецкурс для магистрантов ФИТ, специализации "Компьютерное моделирование"
осенний семестр 2021-2022 года обучения
Программа курса
Lectures notes
  • Введение. Часть 1 (pdf)
  • Введение. Часть 2 (pdf)
  • CUDA. API (pdf)
  • Текстуры в CUDA (pdf)
  • Оптимизация программ (pdf)
  • CUDA Driver API (pdf)
  • Использование нескольких GPU (pdf)
  • Оптимизированные библиотеки для GPU (pdf)
  • Адаптация программ для GPU (pdf)
  • Программирование GPU на Фортран, Java, C# (pdf)
  • Введение в OpenCL (pdf)
  • Введене в OpenACC (pdf, pdf, Методичка)


ssh: cuda.ccfit.nsu.ru
Порядок сдачи заданий
Все вопросы\ответы высылать по адресу arom[ at ]nsu.ru. Префикс темы письма "CUDA_2021".
К отчету:
  1. Код программы и Makefile или строку компиляции на сервере cuda.ccfit.nsu.ru
  2. Отчет на полстраницы с результатом работы программы и его объяснением
Задачи
  1. Allocate an array of doubles. Init it with `a[i] = sin(2*Pi*i/N)`, calculate `sum(a[i])` on CPU and GPU. Copy array from GPU to CPU and check the error `sum(abs(a_gpu[i]- sin(2*Pi*i/N)))/N`. Explain the difference. Use OpenACC. Check `-gpu=fastmath` option
  2. Implement the code to solve the Poison equation on a square mesh (NxN). Iterative scheme. Use OpenACC directives. Compare CPU vs GPU performance for the main loop depending on N (N=128, 256, 512, 1024).
    1. Profile the code.
    2. Optimize the code.
  3. Implement the code from the item 2. Use the cuBLAS function to calculate the error. The same ode should be compiled for CPU and GPU. Use preprocessor directives. Compare the performance of the code from the prev. task.
  4. Adopt the code to GPU. Signal correlation. Profile the code, optimize, explain the result. Use OpenACC.
  5. Implement the task from the item 2 using CUDA. For the reduction operation use the CUB library.
  6. Implement the signal correlation algorithm from the item 4 as a module. Call it from a Python script.


Usefull links (Полезные ссылки)