ref: b8acb5be3adb6a2c7f6f1a1cd9f371e65873b6d1
dir: /slides/slides.ms/
.so tmac .TL .rs .sp |3i GPU Filesystem for Plan 9 .LP .ce 100 Joel Fridolin Meyer .CW \s-3joel@sirjofri.de\s0 .sp 1i 10th International Workshop on Plan 9 .br \s-3April 12-14 2024\s0 .ce 0 . .bp .ds LF "IWP9 2024 .ds CF "GPU Filesystem for Plan 9 .ds RF "% . .TL What is a GPU? .DS .PS <what.p .PE .DE .IP • Coprocessor .IP • ``Separate Computer'' .IP • ``Graphics'' Processing Unit .IP • Single Instruction, Multiple Data (SIMD) . .bp .TL Application Architecture .DS .PS <arch.p .PE .DE .IP • Resource Abstraction (Plug and Play) .IP • 9P Performance? .IP • Scalability on the application level . .bp .TL Inspired by Vulkan .sp 1i .IP • Designed by Khronos .IP • Lowlevel API .IP • Abstract and cross-platform .IP • Shaders and buffers as objects . .bp +0 .TL Inspired by Vulkan .sp 1i .IP • Designed by Khronos .IP • Lowlevel API .IP • Abstract and cross-platform .IP • Shaders and buffers as objects .DS .PS <comp.p .PE .DE . .bp .TL Shader Compilation .DS .PS <glsl.p .PE .DE .IP • Lots of magic happens in the driver .IP • SPIR-V program is cross-platform . .bp .TL Filesystem Interface .DS .PS down move 2 box "\fB\s+3Work in progress!\s0\fR" wid 4 ht 1.2 .PE .DE . .bp .TL Filesystem Interface .sp 1i .IP • Simple to understand .IP • Generic enough to be portable .IP • Plug and Play .IP • GPGPU first (compute shader) . .bp .TL Filesystem Interface .sp .5i .DS .ft CW /dev/gpu /ctl \fR\f(CW /desc \fRdescriptor table\f(CW /0/ctl \fRobject 0 ctl file\f(CW /0/buffer \fRbuffer data\f(CW /1/ctl \fRobject 1 ctl file\f(CW /1/shader \fRshader program\f(CW .DE . .bp +0 .TL Filesystem Interface .sp .5i .DS .ft CW /dev/gpu /ctl \fR\f(CW /desc \fRdescriptor table\f(CW /0/ctl \fRobject 0 ctl file\f(CW /0/buffer \fRbuffer data\f(CW /1/ctl \fRobject 1 ctl file\f(CW /1/shader \fRshader program\f(CW .DE .sp 1i .DS .ft CW ; echo n b 4 > ctl # object 0, buffer 4 bytes ; echo n s > ctl # object 1, shader ; cp buffer.bin 0/buffer ; cp shader.spv 1/shader .DE . .bp .TL Filesystem Interface .sp .5i .DS .ft CW DescPool 0 Set 0 0 -1 \fR(unbound)\f(CW 1 0 \fR(Buffer 0)\f(CW 2 -1 \fR(unbound)\f(CW 3 -1 \fR(unbound)\f(CW Set 1 .DE .sp .5i .IP • Shader is bound to a descriptor pool .IP • Buffer is bound to a specific binding .IP • Shader program knows which set+binding to access . .bp .TL Example Shader Program .sp .2i .DS .ft CW #version 450 core layout(std430, set = 0, binding = 1) buffer pos { vec4 positions[]; }; layout(local_size_x = 1000, local_size_y = 1, local_size_z = 1) in; void main() { vec4 position = positions[gl_GlobalInvocationID.x]; // do something beautiful } .DE . .bp .TL Workgroups .sp 1i .IP • Number of workgroups (set by application) .IP • Workgroup size (compiled in the shader; \f(CWlocal_size_x\fR, …) .IP • Both are 3D vectors .IP • #(Invocations) = #(workgroups) · (Workgroup size) . .bp .TL Implementation .sp 1i .IP • Draft Implementation (CPU) .IP • Drawterm (GPU, Vulkan SDK) .IP • Possible others? (SSE/CPU, network, hardware, …) . .bp .LP .rs .sp |3.5i .ce 100 \s+5\fBThank you\fR\s0 Questions? .ce 0 .ds LF " .ds RF " .ds CF "\s-8\f(CWpic slides.ms | troff -ms\fR\s0 .