Расчёт на видеокарте
В TMC Suite 5.0 счётные ядра PlanarRT H и PlanarRT X умеют вести основную часть расчёта на видеокарте (GPU). На больших сетках это ускоряет счёт в десятки раз. Результат при этом не меняется: видеокарта даёт те же числа, что и процессор, бит в бит.
1. Что ускоряется и во сколько раз
1.1. Что считается на видеокарте, а что — на процессоре
| Часть расчёта | Где считается |
|---|---|
| Проход по всем узлам сетки на каждом такте (включая плазменные члены X-моды) — около 99 % времени счёта | видеокарта |
Узлы блоков металла (METAL), поглотителей (ABSORBER), магнитных стенок (MAGNETIC) |
видеокарта |
| Порты: возбуждение падающей волны и запись сигналов | процессор |
| Подготовка задания (препроцессор, построение блоков на сетке) | процессор |
Запись всех выходных файлов (.t, .s, поле, ДН) |
процессор |
На каждом такте процессор забирает с видеокарты только узлы вокруг портов и возвращает их
обратно. Исключения — вывод поля (FIELDS) и накопление распределения поля для диаграммы
направленности (FIELD_DISTRIBUTION, FIELD_DISTRIBUTION_M): для них с видеокарты копируется
вся сетка, поэтому такие задания ускоряются слабо.
1.2. Измеренное ускорение
Замеры сделаны 22.10.2026 на компьютере с процессором Intel Core i5-9600KF и видеокартой NVIDIA GeForce RTX 5070 Ti (16 ГБ). Сравнивалось время цикла по времени (подготовка задания и запись результатов не входят) на текущем ядре: процессор — в один поток, видеокарта — через OpenCL. Время дано в наносекундах на один узел сетки за один такт.
| Сетка | H: процессор | H: видеокарта | H: ускорение | X: процессор | X: видеокарта | X: ускорение |
|---|---|---|---|---|---|---|
| 1000 × 1000 (1 млн узлов) | 2,23 | 0,231 | ×9,7 | 5,66 | 0,457 | ×12,4 |
| 2000 × 2000 (4 млн) | 2,05 | 0,112 | ×18,3 | 5,83 | 0,267 | ×21,8 |
| 4000 × 4000 (16 млн) | 1,92 | 0,082 | ×23,6 | 6,05 | 0,183 | ×33,0 |
| 8000 × 8000 (64 млн) | 2,01 | 0,063 | ×32,1 | 5,84 | 0,161 | ×36,2 |
| 12000 × 12000 (144 млн) | 2,06 | 0,057 | ×35,9 | — | — | — |
Главное:
- чем больше сетка, тем больше выигрыш: от ×10–12 на 1 млн узлов до ×36 на десятках миллионов узлов;
- ускорение подтверждено и на «живом» поле, когда волна заполнила всю область (проверка по замечанию автора: та же задача считалась 200, 1000, 2N и 4N тактов, N — сторона сетки). Время на узел за такт почти не меняется: на 1 млн узлов ×8–10 (H) и ×13 (X), на 4 млн — ×17–20 (H) и ×22–26 (X); результаты процессора и видеокарты совпали побайтно во всех 16 прогонах;
- на другой видеокарте ускорение будет другим: оно определяется в основном скоростью памяти видеокарты.
Цифры получены на одном компьютере. Окно «Расчёт на видеокарте» (п. 3) делает короткий замер на вашей машине и показывает оценку ускорения именно для неё.
1.3. Сколько помещается в память видеокарты
На видеокарте нужно примерно 32 байта на узел для H-моды и 96 байт на узел для X-моды. На карте с 16 ГБ помещается:
| Мода | Наибольшая сетка | Время одного такта |
|---|---|---|
| H | 21200 × 21200 = 449 млн узлов | 23,7 мс |
| X | 12200 × 12200 = 149 млн узлов | 22,1 мс |
В оперативной памяти компьютера при этом тоже нужно место (оценка: H ~56 байт на узел, X ~130 байт на узел). Если сетка в память видеокарты не помещается, ядро само считает её на процессоре (п. 5).
2. Что нужно для расчёта на видеокарте
| Требование | Пояснение |
|---|---|
| Windows x64 | пакет 5.0 выпускается только 64-разрядным |
| Видеокарта с двойной точностью (double) | расчёт ведётся в числах двойной точности; карта без неё не используется |
| Обычный драйвер видеокарты NVIDIA или AMD с поддержкой OpenCL | ставится с сайта производителя видеокарты |
| CUDA, пакеты разработчика | не нужны |
Ядро подключает библиотеку OpenCL из драйвера при запуске. Если драйвера или подходящей карты нет, ядро просто считает на процессоре.
Встроенная графика процессора (например, Intel UHD) проверку обычно проходит, но счёт не ускоряет; в окне проверки она отмечается как «Пройдена (без ускорения)». Если в компьютере несколько видеокарт, программа сама выбирает самую быструю по замеру.
3. Окно «Расчёт на видеокарте»
Окно открывается из меню ядра Настройки → Расчёт на видеокарте… (в PlanarRT H и PlanarRT X одинаково; настройка общая для обоих ядер). Заголовок окна — «Расчёт на GPU».

Рисунок 1. Окно «Расчёт на видеокарте» после успешной проверки: найдена NVIDIA GeForce RTX 5070 Ti, все проверки пройдены, флажок «Использовать видеокарту для расчётов» включён.
При открытии окно сразу само запускает проверку: ищет видеокарты, затем на каждой карте с двойной точностью выполняет самопроверку. Пока проверка идёт, под строкой хода видна тонкая бегущая полоса, а кнопки «ОК» и «Проверить снова» недоступны. Проверка занимает доли секунды — несколько секунд.
Элементы окна сверху вниз:
| № | Элемент | Что показывает или делает |
|---|---|---|
| 1 | Строка хода проверки (под заголовком «Расчёт на видеокарте») | во время проверки — «Поиск видеокарт…», затем «Проверка видеокарты…»; по окончании — зелёным «Проверка пройдена: видеокарта готова к расчётам» (или «видеокарт готово: N») либо красным «Ни одна видеокарта не подходит — расчёт пойдёт на процессоре» |
| 2 | Панель диагноза (красная рамка; появляется только при неполадке) | что не так и что установить, со ссылками на страницы драйверов NVIDIA и AMD (например, «Самопроверка на видеокарте не пройдена. Обновите драйвер видеокарты … и нажмите Проверить снова») |
| 3 | Таблица видеокарт | по строке на каждую найденную видеокарту; столбцы описаны ниже |
| 4 | Панель подробностей | подробности о карте, выбранной в таблице (см. ниже) |
| 5 | Флажок «Использовать видеокарту для расчётов» | включён — ядро считает на видеокарте (с учётом порога, п. 5); выключен — на процессоре. Флажок доступен, только если хотя бы одна карта прошла самопроверку |
| 6 | Список «Видеокарта:» | выбор карты для расчёта. Появляется, только если самопроверку прошли две и более карты. Щелчок по годной карте в таблице тоже выбирает её |
| 7 | Пояснение (серый текст) | «Программа решает сама для каждого задания: небольшие сетки и задания, которые не помещаются в память видеокарты, считаются на процессоре. Самопроверка убеждается, что видеокарта даёт те же числа, что и процессор, бит в бит. Ключи командной строки /GPU и /CPU отменяют эту настройку.» |
| 8 | Строка «Сохранено: …» | что сейчас сохранено в настройках: «расчёт на видеокарте» или «расчёт на процессоре», дата последней сохранённой проверки, имя карты, версия драйвера и итог («пройдена» зелёным или «не пройдена» красным) |
| 9 | Кнопка «ОК» | сохраняет выбор (флажок и карту) вместе с итогом проверки и закрывает окно. Следующий расчёт в этом же окне ядра уже пойдёт по новой настройке, перезапускать ядро не нужно |
| 10 | Кнопка «Проверить снова» | повторяет поиск карт и самопроверку (например, после обновления драйвера) |
| 11 | Кнопка «Отмена» | закрывает окно без сохранения |
3.1. Столбцы таблицы видеокарт
| Столбец | Что в нём |
|---|---|
| Видеокарта | название карты; значок слева — общий итог (зелёный кружок с галочкой — годится, красный с крестиком — нет). Подсказка при наведении — платформа OpenCL |
| Память | объём памяти видеокарты |
| Двойная точность | «Да» / «Нет» с отметкой; карта без двойной точности не используется |
| Самопроверка | «Идёт…», «Пройдена», «Пройдена (без ускорения)» — карта считает верно, но не быстрее процессора, «Не пройдена» или «—» (не проводилась) |
| Драйвер | версия драйвера видеокарты |
3.2. Панель подробностей
Для карты, выбранной в таблице, показывается:
- название, платформа и версия OpenCL, число вычислительных блоков, частота;
- объём памяти и наибольший размер одного буфера (
largest single buffer); - список проверок, каждая — с зелёной галочкой или красным крестиком:
- «Драйвер OpenCL найден»;
- «Двойная точность поддерживается» (иначе — «Нет двойной точности — эту видеокарту использовать нельзя»);
- «Видеокарта принимает работу (контекст OpenCL)»;
- «Драйвер собрал расчётную программу»;
- «Пробный расчёт совпадает с процессором бит в бит»;
- при ошибке — её текст (красным) и начало журнала сборки расчётной программы;
- оценка скорости: «Пробная сетка 2048×2048: видеокарта быстрее процессора (потоков: N) примерно в ×K раза; пропускная способность памяти M ГБ/с».
Оценка в окне сравнивает видеокарту с процессором во всех потоках на пробной сетке, а таблица в п. 1.2 — с текущим ядром в один поток на полном задании. Поэтому числа различаются (на снимке — ×25,7 против ×36 из таблицы на той же машине).
3.3. Что делает самопроверка
Самопроверка — короткий пробный расчёт той же схемы, что в ядре:
- на карте создаётся рабочий контекст OpenCL;
- драйвер собирает расчётную программу (проверка, что драйвер умеет числа двойной точности);
- на сетке 301 × 203 узла считается 200 тактов — на видеокарте и на процессоре — и результаты сравниваются побитно;
- дополнительно — короткий замер скорости на сетке 2048 × 2048 и замер скорости памяти видеокарты.
Если хоть один бит отличается, карта для расчёта не допускается.
4. Строка «Расчёт: …» в строке состояния
Справа в строке состояния ядра показано, на чём будет идти расчёт:
| Надпись | Что значит |
|---|---|
Расчёт: GPU — <название карты> |
включён расчёт на видеокарте (флажок в окне или ключ /GPU) |
Расчёт: CPU |
расчёт на процессоре |

Рисунок 2. Строка состояния ядра во время расчёта; справа — «Расчёт: GPU — NVIDIA GeForce RTX 5070 Ti».
Важно. Эта надпись показывает настройку. Решение «видеокарта или процессор» ядро принимает отдельно для каждого шага задания (п. 5): маленькое задание при надписи «GPU» всё равно посчитается на процессоре. Где фактически шёл расчёт, видно в отчёте о времени расчёта (п. 6).
5. Когда ядро всё равно считает на процессоре
Даже при включённой видеокарте ядро для каждого шага проверяет, есть ли смысл и возможность считать на ней. Расчёт идёт на процессоре, если:
| Причина | Текст в отчёте о времени (строка Compute:) |
|---|---|
| Сетка маленькая: меньше 150 000 узлов для H-моды или 60 000 узлов для X-моды | CPU (grid of N nodes is below the GPU threshold 150000; TMC_GPU_MIN_NODES=0 forces the card) |
| Сетка не помещается в память видеокарты | CPU (the grid needs X GB, card … has Y GB) |
| Не найдена библиотека OpenCL (нет драйвера) | CPU (GPU requested, but OpenCL.dll was not found) |
| Нет карты с двойной точностью | CPU (GPU requested, but no card with double precision) |
| Видеокарта не приняла работу | CPU (OpenCL start on … failed: …) или CPU (memory on …: …) |
Почему маленькие сетки — на процессоре. На каждом такте видеокарта ждёт обмена данными с портами (около 0,25–0,3 мс на такт независимо от размера сетки). На маленькой сетке это ожидание дороже самого счёта, и видеокарта проигрывает процессору. Порог измерен на RTX 5070 Ti (2000 тактов):
| Сетка | H: процессор / видеокарта, с | X: процессор / видеокарта, с |
|---|---|---|
| 200 × 200 (40 тыс. узлов) | 0,30 / 0,55 | 0,49 / 0,58 |
| 250 × 250 (63 тыс.) | 0,35 / 0,50 | 0,71 / 0,56 |
| 300 × 300 (90 тыс.) | 0,45 / 0,63 | 1,09 / 0,56 |
| 400 × 400 (160 тыс.) | 0,66 / 0,50 | 1,88 / 0,60 |
| 1000 × 1000 (1 млн) | 4,25 / 0,64 | 11,8 / 1,08 |
6. Как узнать, где шёл расчёт
После расчёта откройте Вид → Статистика (Shift+F4) → кнопка «Время расчёта…». В
отчёте у каждого шага есть строка Compute::
Compute: GPU 0: <карта> (<версия OpenCL>, driver <версия>, <память> GB)— шаг считался на видеокарте;Compute: CPU …— на процессоре, в скобках — причина (п. 5).

Рисунок 3. Отчёт «Время расчёта» для demo_h.tpl (20 604 узла): Compute: CPU (grid of 20604
nodes is below the GPU threshold 150000; …) — задание меньше порога, поэтому посчитано на
процессоре, хотя в настройках выбрана видеокарта.
Тот же отчёт без окна получают ключом /Time (см. Работа без окон).
7. Ключи /GPU и /CPU
При запуске из командной строки (в том числе в пакетном режиме) ключи главнее настройки из окна:
| Ключ | Действие |
|---|---|
/CPU (или -CPU) |
считать на процессоре, даже если в окне включена видеокарта |
/GPU (или -GPU) |
считать на первой видеокарте с двойной точностью, даже если в окне видеокарта выключена |
/GPU:n |
считать на видеокарте с номером n (счёт с нуля, среди карт с двойной точностью) |
| без ключа | как выбрано в окне «Расчёт на видеокарте» (и только если последняя проверка была пройдена) |
Порог маленькой сетки (п. 5) действует и с ключом /GPU.
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "D:\calc\big.tpl" /Arb /Time /GPU
"C:\Program Files\TMC Suite Qt\planarrt_x.exe" "D:\calc\big.tpl" /Arb /CPU
7.1. Для опытных: переменные окружения
| Переменная | Действие |
|---|---|
TMC_GPU=1 |
то же, что ключ /GPU (TMC_GPU=n+1 — карта с номером n) |
TMC_GPU_MIN_NODES=<число> |
заменить порог маленькой сетки; 0 — считать на видеокарте всегда |
Переменную
TMC_GPUставит и снимает само ядро при запуске по настройке окна, поэтому задавать её вручную обычно не нужно.
8. Совпадение результатов бит в бит
Формулы на видеокарте записаны в том же порядке операций, что и в ядре для процессора, а слияние умножения со сложением запрещено. Поэтому арифметика двойной точности на видеокарте и на процессоре даёт одни и те же биты, а не «близкие» числа.
Проверено:
- на 44 заданиях (H и X): тестовые задания с константами и формулами ε, кругами,
многоугольниками, рупора, учебные задания, магнитные стенки, подмагниченная плазма (N, B,
N+B, N+B+Y), поглотители многоугольником, файл распределения ε, сетка 1 млн узлов —
выходные файлы
.t,.s,.AMP,.FAZ,.DATсовпали побайтно; - на 16 прогонах «по длине расчёта» (поле заполняет 97–98 % области) — побайтно;
- по сведениям разработчика — на пяти компьютерах автора с разными видеокартами.
Поэтому выбор «видеокарта или процессор» влияет только на скорость.
9. Если самопроверка не пройдена
- Прочитайте панель диагноза (красная рамка) и подробности о карте: какая проверка отмечена красным крестиком.
- Обновите драйвер видеокарты с сайта производителя — ссылки на страницы драйверов NVIDIA и AMD есть прямо в панели диагноза.
- Откройте окно снова (или нажмите «Проверить снова»).
- Если карта по-прежнему не проходит, ничего делать не нужно: флажок «Использовать видеокарту» недоступен, расчёт идёт на процессоре с теми же результатами.
| Что видно | Что это значит | Что делать |
|---|---|---|
| «Двойная точность: Нет» | карта не поддерживает числа двойной точности | эту карту использовать нельзя |
| «Драйвер OpenCL» не найден / диагноз про OpenCL | драйвер не установлен или устарел | установить или обновить драйвер |
| «Драйвер собрал расчётную программу» — крестик | компилятор OpenCL в драйвере не справился; ниже — начало журнала сборки | обновить драйвер |
| «Пробный расчёт совпадает с процессором бит в бит» — крестик | карта считает не так, как процессор | обновить драйвер; при повторе — не использовать карту |
| «Пройдена (без ускорения)» | карта считает верно, но не быстрее процессора (встроенная графика) | можно не включать |
10. Ограничения
- Только 64-разрядная Windows-версия.
- Расчёт на видеокарте используется только для цикла по времени. Подготовка задания (препроцессор, построение блоков на сетке) и запись файлов идут на процессоре.
- Задания с выводом поля (
FIELDS) и с накоплением распределения поля для диаграммы направленности (FIELD_DISTRIBUTION,FIELD_DISTRIBUTION_M) ускоряются слабо: на каждом такте с видеокарты копируется вся сетка. - Маленькие сетки (меньше 150 тыс. узлов H / 60 тыс. узлов X) считаются на процессоре.
- Используется одна видеокарта; несколько карт в одном расчёте не используются.
- Порог маленькой сетки измерен на RTX 5070 Ti; на других картах выгодная граница может быть другой.
GPU computing
In TMC Suite 5.0 the PlanarRT H and PlanarRT X compute kernels can perform the main part of the computation on the video card (GPU). On large grids this speeds up the computation by tens of times. The result does not change: the video card gives the same numbers as the processor, bit for bit.
1. What is accelerated and by how much
1.1. What is computed on the video card and what on the processor
| Part of the computation | Where it is computed |
|---|---|
| The pass over all grid nodes at every time step (including the plasma terms of the X-mode) — about 99 % of the computation time | video card |
Nodes of metal (METAL), absorber (ABSORBER) and magnetic wall (MAGNETIC) blocks |
video card |
| Ports: excitation of the incident wave and recording of the signals | processor |
| Preparation of the task (preprocessor, building the blocks on the grid) | processor |
Writing all output files (.t, .s, field, RP) |
processor |
At every time step the processor takes only the nodes around the ports from the video card and returns them
back. The exceptions are field output (FIELDS) and accumulation of the field distribution for the radiation
pattern (FIELD_DISTRIBUTION, FIELD_DISTRIBUTION_M): for them the whole grid is copied from the video card,
so such tasks are accelerated only slightly.
1.2. Measured speed-up
The measurements were made on 22.10.2026 on a computer with an Intel Core i5-9600KF processor and an NVIDIA GeForce RTX 5070 Ti video card (16 GB). The time of the time loop was compared (task preparation and writing of the results are not included) on the current kernel: the processor in a single thread, the video card through OpenCL. The time is given in nanoseconds per grid node per time step.
| Grid | H: processor | H: video card | H: speed-up | X: processor | X: video card | X: speed-up |
|---|---|---|---|---|---|---|
| 1000 × 1000 (1 million nodes) | 2.23 | 0.231 | ×9.7 | 5.66 | 0.457 | ×12.4 |
| 2000 × 2000 (4 million) | 2.05 | 0.112 | ×18.3 | 5.83 | 0.267 | ×21.8 |
| 4000 × 4000 (16 million) | 1.92 | 0.082 | ×23.6 | 6.05 | 0.183 | ×33.0 |
| 8000 × 8000 (64 million) | 2.01 | 0.063 | ×32.1 | 5.84 | 0.161 | ×36.2 |
| 12000 × 12000 (144 million) | 2.06 | 0.057 | ×35.9 | — | — | — |
The main points:
- the larger the grid, the larger the gain: from ×10–12 at 1 million nodes to ×36 at tens of millions of nodes;
- the speed-up has also been confirmed on a "live" field, when the wave has filled the whole region (a check following the author's remark: the same task was computed for 200, 1000, 2N and 4N time steps, N being the grid side). The time per node per time step hardly changes: at 1 million nodes ×8–10 (H) and ×13 (X), at 4 million — ×17–20 (H) and ×22–26 (X); the processor and video card results matched byte for byte in all 16 runs;
- on another video card the speed-up will be different: it is determined mainly by the memory speed of the video card.
The figures were obtained on one computer. The Calculation on the video card window (Sec. 3) makes a short measurement on your machine and shows the speed-up estimate for it specifically.
1.3. How much fits into the video card memory
The video card needs approximately 32 bytes per node for the H-mode and 96 bytes per node for the X-mode. A 16 GB card holds:
| Mode | Largest grid | Time of one time step |
|---|---|---|
| H | 21200 × 21200 = 449 million nodes | 23.7 ms |
| X | 12200 × 12200 = 149 million nodes | 22.1 ms |
Space is also needed in the computer's main memory (estimate: H ~56 bytes per node, X ~130 bytes per node). If the grid does not fit into the video card memory, the kernel computes it on the processor by itself (Sec. 5).
2. What is needed for GPU computing
| Requirement | Explanation |
|---|---|
| Windows x64 | package 5.0 is released in 64-bit form only |
| A video card with double precision (double) | the computation is done in double-precision numbers; a card without it is not used |
| An ordinary NVIDIA or AMD video card driver with OpenCL support | installed from the video card maker's website |
| CUDA, developer toolkits | not needed |
The kernel loads the OpenCL library from the driver at startup. If there is no driver or no suitable card, the kernel simply computes on the processor.
Integrated processor graphics (for example, Intel UHD) usually passes the check but does not speed up the computation; in the check window it is marked as Passed (no speed-up). If the computer has several video cards, the program itself selects the fastest one by measurement.
3. The "Calculation on the video card" window
The window is opened from the kernel menu Config → Compute (GPU)... (the same in PlanarRT H and PlanarRT X; the setting is shared by both kernels). The window title is Compute.

Figure 1. The Calculation on the video card window after a successful check: an NVIDIA GeForce RTX 5070 Ti was found, all checks were passed, the Use the video card for calculations check box is on.
When opened, the window immediately starts the check by itself: it looks for video cards, then runs a self-test on each card with double precision. While the check is running, a thin moving bar is visible under the progress line, and the OK and Check again buttons are unavailable. The check takes from a fraction of a second to a few seconds.
Window elements from top to bottom:
| No. | Element | What it shows or does |
|---|---|---|
| 1 | Check progress line (under the heading Calculation on the video card) | during the check — "Looking for video cards…", then "Testing the video card…"; when finished — in green "Check passed: the video card is ready for calculations." (or "N video cards are ready for calculations.") or in red "No video card can be used — calculations will run on the processor." |
| 2 | Diagnosis panel (red frame; appears only when there is a problem) | what is wrong and what to install, with links to the NVIDIA and AMD driver pages (for example, "The self-test on the video card failed. Update the graphics driver from the video card maker … and press Check again.") |
| 3 | Video card table | one row for each video card found; the columns are described below |
| 4 | Details panel | details of the card selected in the table (see below) |
| 5 | The Use the video card for calculations check box | on — the kernel computes on the video card (taking the threshold into account, Sec. 5); off — on the processor. The check box is available only if at least one card has passed the self-test |
| 6 | The Video card: list | selection of the card for the computation. It appears only if two or more cards have passed the self-test. Clicking a suitable card in the table also selects it |
| 7 | Explanation (grey text) | "The program decides for each task by itself: small grids and tasks that do not fit into the video card memory are calculated on the processor. The self-test checks that the video card gives the same numbers as the processor, bit for bit. Command line keys /GPU and /CPU override this setting." |
| 8 | The "Saved: …" line | what is currently saved in the settings: "calculations on the video card" or "calculations on the processor", the date of the last saved check, the card name, the driver version and the result ("passed" in green or "failed" in red) |
| 9 | The OK button | saves the choice (check box and card) together with the check result and closes the window. The next computation in the same kernel window already follows the new setting; there is no need to restart the kernel |
| 10 | The Check again button | repeats the card search and the self-test (for example, after a driver update) |
| 11 | The Cancel button | closes the window without saving |
3.1. Columns of the video card table
| Column | What it contains |
|---|---|
| Video card | the card name; the icon on the left is the overall result (a green circle with a tick — suitable, a red one with a cross — not). The tooltip shows the OpenCL platform |
| Memory | the amount of video card memory |
| Double precision | Yes / No with a mark; a card without double precision is not used |
| Self-test | Running…, Passed, Passed (no speed-up) — the card computes correctly but not faster than the processor, Failed or "—" (not performed) |
| Driver | the video card driver version |
3.2. Details panel
For the card selected in the table the following is shown:
- the name, the OpenCL platform and version, the number of compute units, the clock frequency;
- the amount of memory and the largest size of a single buffer (
largest single buffer); - the list of checks, each with a green tick or a red cross:
- "OpenCL driver found";
- "Double precision supported" (otherwise — "No double precision — this card cannot be used");
- "The video card accepts work (OpenCL context)";
- "The driver compiled the calculation program";
- "Test calculation matches the processor bit for bit";
- in case of an error — its text (in red) and the beginning of the build log of the calculation program;
- the speed estimate: "Test grid 2048×2048: the video card is about ×K faster than the processor (N threads); memory bandwidth M GB/s."
The estimate in the window compares the video card with the processor in all threads on the test grid, whereas the table in Sec. 1.2 compares it with the current kernel in a single thread on a full task. That is why the numbers differ (in the screenshot — ×25.7 versus ×36 from the table on the same machine).
3.3. What the self-test does
The self-test is a short test computation of the same scheme as in the kernel:
- a working OpenCL context is created on the card;
- the driver compiles the calculation program (a check that the driver supports double-precision numbers);
- 200 time steps are computed on a 301 × 203 node grid — on the video card and on the processor — and the results are compared bit by bit;
- in addition — a short speed measurement on a 2048 × 2048 grid and a measurement of the video card memory speed.
If even one bit differs, the card is not allowed for computation.
4. The "Compute: …" line in the status bar
The right part of the kernel's status bar shows what the computation will run on:
| Label | What it means |
|---|---|
Compute: GPU — <card name> |
GPU computing is on (the check box in the window or the /GPU key) |
Compute: CPU |
computation on the processor |

Figure 2. The kernel status bar during a computation; on the right — "Compute: GPU — NVIDIA GeForce RTX 5070 Ti".
Important. This label shows the setting. The kernel makes the "video card or processor" decision separately for each step of the task (Sec. 5): a small task will still be computed on the processor even when the label says "GPU". Where the computation actually ran is shown in the calculation-time report (Sec. 6).
5. When the kernel still computes on the processor
Even with the video card turned on, the kernel checks for each step whether it makes sense and is possible to compute on it. The computation runs on the processor if:
| Reason | Text in the time report (the Compute: line) |
|---|---|
| The grid is small: fewer than 150 000 nodes for the H-mode or 60 000 nodes for the X-mode | CPU (grid of N nodes is below the GPU threshold 150000; TMC_GPU_MIN_NODES=0 forces the card) |
| The grid does not fit into the video card memory | CPU (the grid needs X GB, card … has Y GB) |
| The OpenCL library was not found (no driver) | CPU (GPU requested, but OpenCL.dll was not found) |
| There is no card with double precision | CPU (GPU requested, but no card with double precision) |
| The video card did not accept the work | CPU (OpenCL start on … failed: …) or CPU (memory on …: …) |
Why small grids go to the processor. At every time step the video card waits for the data exchange with the ports (about 0.25–0.3 ms per time step regardless of the grid size). On a small grid this wait costs more than the computation itself, and the video card loses to the processor. The threshold was measured on an RTX 5070 Ti (2000 time steps):
| Grid | H: processor / video card, s | X: processor / video card, s |
|---|---|---|
| 200 × 200 (40 thousand nodes) | 0.30 / 0.55 | 0.49 / 0.58 |
| 250 × 250 (63 thousand) | 0.35 / 0.50 | 0.71 / 0.56 |
| 300 × 300 (90 thousand) | 0.45 / 0.63 | 1.09 / 0.56 |
| 400 × 400 (160 thousand) | 0.66 / 0.50 | 1.88 / 0.60 |
| 1000 × 1000 (1 million) | 4.25 / 0.64 | 11.8 / 1.08 |
6. How to find out where the computation ran
After the computation, open View → Statistics (Shift+F4) → the Calc. time... button. In the
report each step has a Compute: line:
Compute: GPU 0: <card> (<OpenCL version>, driver <version>, <memory> GB)— the step was computed on the video card;Compute: CPU …— on the processor; the reason is in parentheses (Sec. 5).

Figure 3. The Calculation time report for demo_h.tpl (20 604 nodes): Compute: CPU (grid of 20604
nodes is below the GPU threshold 150000; …) — the task is below the threshold, so it was computed on the
processor although the video card is selected in the settings.
The same report is obtained without a window with the /Time key (see Headless mode).
7. The /GPU and /CPU keys
When started from the command line (including batch mode), the keys take precedence over the setting in the window:
| Key | Action |
|---|---|
/CPU (or -CPU) |
compute on the processor even if the video card is turned on in the window |
/GPU (or -GPU) |
compute on the first video card with double precision even if the video card is turned off in the window |
/GPU:n |
compute on the video card number n (counting from zero, among the cards with double precision) |
| no key | as selected in the Calculation on the video card window (and only if the last check was passed) |
The small-grid threshold (Sec. 5) also applies with the /GPU key.
"C:\Program Files\TMC Suite Qt\planarrt_h.exe" "D:\calc\big.tpl" /Arb /Time /GPU
"C:\Program Files\TMC Suite Qt\planarrt_x.exe" "D:\calc\big.tpl" /Arb /CPU
7.1. For advanced users: environment variables
| Variable | Action |
|---|---|
TMC_GPU=1 |
the same as the /GPU key (TMC_GPU=n+1 — the card number n) |
TMC_GPU_MIN_NODES=<number> |
replace the small-grid threshold; 0 — always compute on the video card |
The
TMC_GPUvariable is set and cleared by the kernel itself at startup according to the window setting, so there is usually no need to set it manually.
8. Bit-for-bit identical results
The formulas on the video card are written in the same order of operations as in the processor kernel, and fused multiply-add is prohibited. Therefore double-precision arithmetic on the video card and on the processor gives the same bits, not "close" numbers.
Verified:
- on 44 task files (H and X): test tasks with constant and formula ε, circles,
polygons, horns, training tasks, magnetic walls, magnetized plasma (N, B,
N+B, N+B+Y), polygon absorbers, an ε distribution file, a 1-million-node grid —
the output files
.t,.s,.AMP,.FAZ,.DATmatched byte for byte; - on 16 runs "by computation length" (the field fills 97–98 % of the region) — byte for byte;
- according to the developer — on five of the author's computers with different video cards.
Therefore the "video card or processor" choice affects only the speed.
9. If the self-test fails
- Read the diagnosis panel (red frame) and the card details: which check is marked with a red cross.
- Update the video card driver from the maker's website — links to the NVIDIA and AMD driver pages are right in the diagnosis panel.
- Open the window again (or press Check again).
- If the card still does not pass, nothing needs to be done: the Use the video card for calculations check box is unavailable, and the computation runs on the processor with the same results.
| What is shown | What it means | What to do |
|---|---|---|
| "Double precision: No" | the card does not support double-precision numbers | this card cannot be used |
| "OpenCL driver" not found / a diagnosis about OpenCL | the driver is not installed or is outdated | install or update the driver |
| "The driver compiled the calculation program" — a cross | the OpenCL compiler in the driver failed; below it — the beginning of the build log | update the driver |
| "Test calculation matches the processor bit for bit" — a cross | the card computes differently from the processor | update the driver; if it repeats, do not use the card |
| Passed (no speed-up) | the card computes correctly but not faster than the processor (integrated graphics) | you may leave it off |
10. Limitations
- Only the 64-bit Windows version.
- GPU computing is used only for the time loop. Preparation of the task (preprocessor, building the blocks on the grid) and writing of files run on the processor.
- Tasks with field output (
FIELDS) and with accumulation of the field distribution for the radiation pattern (FIELD_DISTRIBUTION,FIELD_DISTRIBUTION_M) are accelerated only slightly: at every time step the whole grid is copied from the video card. - Small grids (fewer than 150 thousand nodes for H / 60 thousand nodes for X) are computed on the processor.
- One video card is used; several cards are not used in one computation.
- The small-grid threshold was measured on an RTX 5070 Ti; on other cards the break-even point may be different.