Codes d’erreur › gpu-barrier

Codes d’erreur

gpu-barrier

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 with barrier() or shared: a barrier under an if, a while, or in a loop whose range depends on the index (every index of the group must reach it, the same times), a return (the index would not reach the next barrier), no group, or a variable kept across a barrier with no type or that is an array. A warning: a kernel that shares an array and has no barrier (docs/gpu.md).

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-barrier affiche cette explication ; archec explain fpga liste les codes de son domaine.