Codes d’erreur › gpu-race

Codes d’erreur

gpu-race

erreur FPGA components: what can be synthesised, widths (archec gen --target vhdl), the device and the limits of archec synth; GPU kernels: what a GPU cannot run, races, opaque kernels (archec gen --target opencl, cuda, metal)

Ce que cela signifie#

In a GPU kernel: a write to anything but the element at the kernel's own index (y[0] = …, a variable of the part), or a read of an array the kernel writes at another index (y[i - 1]); between two barrier()s, an element of a shared array one index writes and another reads, or that every index writes. Every index runs at once: two would write the same element, or one would read what another writes. Write out[i] = …, the result in another array than the one read, a sum over the indexes as reduce sum into total, and a barrier() between a shared write and its read.

Comment le corriger#

Le message dit ce qui ne va pas et où, et souvent ce qui était voulu (Did you mean …?). Modifiez le modèle pour que ce que décrit cette page ne soit plus vrai, puis vérifiez à nouveau : archec check main.arche.

Une erreur : archec ne construit rien tant qu’elle n’est pas corrigée.

archec check --beginner reformule les messages les plus courants en mots simples, avec les noms qui existent.

La correction automatique#

archec n’a pas de correction propre à ce code. Quand le message dit Did you mean …?, VS Code propose ce changement (Quick Fix).

Dans le terminal#

archec explain gpu-race affiche cette explication ; archec explain fpga liste les codes de son domaine.