Sum of squares on GPU
APL (Dyalog Unicode) with Co-dfns, 7 bytesSBCS



Anonymous prefix lambda. I have verified with the author of Co-dfns that the code will indeed run according to the required spec.

{+.×⍨⍵}


Try it online! (equivalent code, but TIO doesn't provide GPU access)

{…} compilable dfn; ⍵ is the argument vector

 +.× dot-product of

 ⍨ itself ("selfie")

 ⍵ using the argument as data