Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GoSL: Go as a shader language

GoSL (via the gosl executable) allows you to write Go programs that run on [[GPU]] hardware, by transpiling Go into the WGSL shader language used by WebGPU, thereby establishing the Go shader language.

GoSL uses the core gpu compute shader system, and can take advantage of the [[Goal]] transpiler to provide a more natural tensor indexing syntax.

Functionally, GoSL is similar to NVIDIA warp -- docs, which uses python as the original source and converts it to either C++ or CUDA code. In GoSL, the original code is directly Go, so we just need to do the WGSL part. Unlike warp, WGSL runs on all GPU platforms, including the web (warp only runs on NVIDIA GPUs, on desktop).

See examples/basic and rand for complete working examples.

See the Cogent Lab Docs for full documentation.