shithub: gpufswip

Download patch

ref: 35ff0931afeac236868423ae29a8dde69892f64b
parent: be5e9cb1476400d19ad4eb8f66cb26c92a222aff
author: sirjofri <[email protected]>
date: Thu Apr 11 13:41:40 EDT 2024

fixes, text

--- /dev/null
+++ b/slides/glsl.p
@@ -1,0 +1,28 @@
+.PS
+down
+GLSL: box "GLSL" wid 1.5
+arrow
+SPV: box "SPIR-V" wid 1.5
+Thresh: arrow
+Native: box dashed "Native" wid 1.5
+arrow
+GPU: box dashed "GPU" wid 1.5
+
+right
+[
+move .5 right; "high-level shader program" ljust
+] with .w at GLSL.e
+[
+move .5 right; "low-level SPIR-V program" ljust
+] with .w at SPV.e
+[
+move .5 right; "native program" ljust
+] with .w at Native.e
+[
+move .5 right; "execution on GPU" ljust
+] with .w at GPU.e
+
+L: line dashed from Thresh.c - 3, 0 to Thresh.c + 5.5, 0
+"Compiler" ljust above at L.w
+"Driver" ljust below at L.w
+.PE
--- a/slides/mkfile
+++ b/slides/mkfile
@@ -1,4 +1,4 @@
 PICS=`{ls *.p}
 
 slides.pdf: tmac slides.ms $PICS
-	cat tmac slides.ms | pic | troff -ms | lp -dstdout | ps2pdf -g1024x768 -r80x80 >$target
+	cat slides.ms | pic | troff -ms | lp -dstdout | ps2pdf -g1024x768 -r80x80 >$target
--- a/slides/notes.txt
+++ b/slides/notes.txt
@@ -1,0 +1,4 @@
+INTRO
+
+
+WHAT IS A GPU?
\ No newline at end of file
--- a/slides/slides.ms
+++ b/slides/slides.ms
@@ -1,3 +1,4 @@
+.so tmac
 .TL
 .rs
 .sp |3i
@@ -6,12 +7,17 @@
 .ce 100
 Joel Fridolin Meyer
 .CW \[email protected]\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 "%
 .
-.ds CF "GPUFS – Joel Fridolin Meyer
-.ds RF "IWP9 2024
-.
 .TL
 What is a GPU?
 .DS
@@ -19,11 +25,15 @@
 .PE
 .DE
 .IP •
-Separate ``Computer''
+Coprocessor
 .IP •
-Single Instruction, Multiple Data
-.bp
+``Separate Computer''
+.IP •
+``Graphics'' Processing Unit
+.IP •
+Single Instruction, Multiple Data (SIMD)
 .
+.bp
 .TL
 Application Architecture
 .DS
@@ -31,37 +41,39 @@
 .PE
 .DE
 .IP •
-Resource Abstraction
+Resource Abstraction (Plug and Play)
 .IP •
-9P Performance
+9P Performance?
 .IP •
 Scalability on the application level
-.bp
 .
+.bp
 .TL
 Inspired by Vulkan
+.sp 1i
 .IP •
 Lowlevel API
 .IP •
 Abstract and cross-platform
 .IP •
-Shaders and Buffers
-.bp
+Shaders and buffers as objects
 .
+.bp +0
 .TL
 Inspired by Vulkan
+.sp 1i
 .IP •
 Lowlevel API
 .IP •
 Abstract and cross-platform
 .IP •
-Shaders and Buffers
+Shaders and buffers as objects
 .DS
 .PS <comp.p
 .PE
 .DE
-.bp
 .
+.bp
 .TL
 Filesystem Interface
 .DS
@@ -71,15 +83,28 @@
 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 +0
 .TL
 Filesystem Interface
 .sp .5i
 .DS
 .ft CW
-; echo n b 4  > ctl    # object 0, 4 bytes
-; echo n s    > ctl    # object 1
+; 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
@@ -94,15 +119,80 @@
 	/1/ctl      \fRobject 1 ctl file\f(CW
 	/1/shader   \fRshader program\f(CW
 .DE
-.bp
 .
+.bp
 .TL
 Filesystem Interface
-.\" descriptor table
+.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
+.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
+Example Shader Program
+.DS
+.PS <glsl.p
+.PE
+.DE
+.IP •
+Lots of magic happens in the driver
+.IP •
+SPIR-V program is cross-platform
+.
+.bp
+.TL
 Implementation
+.sp 1i
 .IP •
 Draft Implementation (CPU)
 .IP •
@@ -109,3 +199,16 @@
 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
+.
\ No newline at end of file
--- a/slides/what.p
+++ b/slides/what.p
@@ -1,7 +1,15 @@
 .PS
+down
 CPU: box "CPU"
 line <->
-GPU: box "GPU"
-arrow from CPU.s down
-box "\s-5Coprocessors\s0" "\s-5(e. g. FPU)\s0" wid 1.5 ht 1.1
+[
+	B: [
+		right
+		box "FPU"
+		box "GPU"
+		box "…"
+	]
+	box wid 3 ht 1.3 at B
+	"\s-5Coprocessors\s0" above at last box.s
+] with .n at last line.s
 .PE