Codes d’erreur › gpu-range

Codes d’erreur

gpu-range

avertissement 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#

A GPU kernel whose range has constant ends that take its own index past the end of an array it indexes there (kernel i in 0..<32 over a float32[16]): on a GPU that index reads or writes outside the array. End the range at the array's length, or make the array longer.

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.

Un avertissement : le modèle se construit, mais quelque chose est sans doute faux.

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