Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC...
-
Upload
miranda-elliott -
Category
Documents
-
view
220 -
download
0
Transcript of Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC...
![Page 1: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/1.jpg)
Piko: A Framework for Authoring Programmable Graphics Pipelines
Anjul Patney and Stanley TzengUC Davis and NVIDIA
Kerry A. Seitz, Jr. and John D. OwensUC Davis
![Page 2: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/2.jpg)
What does an efficient graphics pipeline look like?
![Page 3: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/3.jpg)
What does an efficient graphics pipeline look like?
Renderer
Unreal Engine 4
Unity 5
Disney Hyperion
Pixar RenderMan
Solid Angle Arnold
Media Molecule Dreams
![Page 4: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/4.jpg)
What does an efficient graphics pipeline look like?
Renderer Platform
Unreal Engine 4 GPU
Unity 5 GPU
Disney Hyperion Multicore CPU
Pixar RenderMan Multicore CPU
Solid Angle Arnold Multicore CPU
Media Molecule Dreams GPU
![Page 5: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/5.jpg)
What does an efficient graphics pipeline look like?
Renderer Platform Algorithm
Unreal Engine 4 GPU Rasterization with deferred shading
Unity 5 GPU Rasterization with forward / deferred shading
Disney Hyperion Multicore CPU Path tracing with deferred shading
Pixar RenderMan Multicore CPU Reyes with Path tracing
Solid Angle Arnold Multicore CPU Path tracing
Media Molecule Dreams GPU Point-based rendering with deferred shading
![Page 6: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/6.jpg)
Problem
Efficient graphics pipeline implementations are hard to write and the design space is hard to explore.
![Page 7: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/7.jpg)
Vision
Stage A
Stage B
Stage C
Stage E
Stage D
Stage F
?
CPU
GPU
High-level programmability
High-performance
Flexibility
![Page 8: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/8.jpg)
Existing Work
![Page 9: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/9.jpg)
Software Pipelines on GPUs
CudaRaster RenderAnts VoxelPipeFreePipe
OptiX and Embree
Programmable engines for accelerating ray tracing on specific platforms.
![Page 10: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/10.jpg)
GRAMPS
• Introduces flexible graphics pipelines• Abstracts stages in classes• Abstracts communication by queues
[Sugerman et al. 2009]
![Page 11: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/11.jpg)
Halide
• Introduces programmable image pipelines
• Applies well to shorter and more regular image-processing pipeline
[Ragan-Kelley et al. 2012]
![Page 12: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/12.jpg)
What are the fundamentals of high-performance?
• Parallelism• Execution Locality• Data Locality• Producer-consumer locality
Spatial tiling
![Page 13: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/13.jpg)
Efficient graphics pipelines utilize spatial tiling
![Page 14: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/14.jpg)
Efficient graphics pipelines utilize spatial tiling
![Page 15: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/15.jpg)
Efficient graphics pipelines utilize spatial tiling
• Packet ray tracing• SIMD fragment shading on GPUs• Tiled rendering on mobile GPUs
![Page 16: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/16.jpg)
Vision
Stage A
Stage B
Stage C
Stage E
Stage D
Stage F
?
CPU
GPU
High-level programmability
High-performance
Flexibility
![Page 17: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/17.jpg)
Vision
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko
CPU
GPU
High-level programmability
High-performance
Flexibility
![Page 18: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/18.jpg)
System Walkthrough
![Page 19: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/19.jpg)
pikoc
Pipe Description
(Piko)
Pipe Implementation
(C++ / PTX)
Host Code(C++)
Executable
CPU Compiler
Host Interface (C++)
Device Compiler
![Page 20: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/20.jpg)
pikoc
Pipe Description
(Piko)
Pipe Implementation
(C++ / PTX)
Executable
CPU Compiler
Host Interface (C++)
Device Compiler
Host Code(C++)
Device-independent(C++)
![Page 21: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/21.jpg)
pikoc
Pipe Implementation
(C++ / PTX)
Host Code(C++)
Executable
CPU Compiler
Host Interface (C++)
Device Compiler
Pipe Description
(Piko)
Pipeline description (graph of stages)
![Page 22: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/22.jpg)
Pipe Description
(Piko)
Host Code(C++)
Executable
CPU Compiler
Device Compiler
pikoc
Pipe Implementation
(C++ / PTX)
Host Interface (C++)
Clang- and LLVM- based infrastructure
![Page 23: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/23.jpg)
pikoc
Pipe Description
(Piko)
Pipe Implementation
(C++ / PTX)
Host Code(C++)
Host Interface (C++)
Executable
CPU Compiler
Device Compiler
![Page 24: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/24.jpg)
Problem
Efficient graphics pipeline implementations are hard to write and the design space is hard to explore.
![Page 25: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/25.jpg)
Problem
Efficient graphics pipeline implementations are hard to write and the design space is hard to explore.
Approach
Use spatial tiling to help author efficient and flexible graphics pipelines.
![Page 26: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/26.jpg)
Problem
Efficient graphics pipeline implementations are hard to write and the design space is hard to explore.
Approach
Use programmable spatial tiling to help author efficient and flexible graphics pipelines.
![Page 27: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/27.jpg)
Programmable Spatial Tiling
![Page 28: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/28.jpg)
We need three answers from the pipeline author
How does data map to spatial tile?
How do we schedule tiles at runtime?
What to compute for each tile?
AssignTile( )
Schedule( )
Process( )
Each stage consists of these three “phases”
![Page 29: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/29.jpg)
Each stage in a pipeline has three phases
Stage A
Stage C
Stage B
AssignTile
Schedule
Process
AssignTile
Schedule
Process
AssignTile
Schedule
Process
![Page 30: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/30.jpg)
S
A
A
A
S
S
S
P
P
InputPrimitives
Populated Bins
Execution Cores
Final Output
Input Scene P ProcessS ScheduleA AssignBin
![Page 31: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/31.jpg)
S
A
A
A
S
S
S
P
P
InputPrimitives
Populated Bins
Execution Cores
Final Output
Input Scene P ProcessS ScheduleA AssignBinAssignTile
![Page 32: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/32.jpg)
S
A
A
A
S
S
S
P
P
InputPrimitives
Populated Bins
Execution Cores
Final Output
Input Scene P ProcessS ScheduleA AssignBinAssignTile
![Page 33: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/33.jpg)
S
A
A
A
S
S
S
P
P
InputPrimitives
Populated Bins
Execution Cores
Final Output
Input Scene P ProcessS ScheduleA AssignBinAssignTile
![Page 34: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/34.jpg)
S
A
A
A
S
S
S
P
P
InputPrimitives
Populated Bins
Execution Cores
Final Output
Input Scene P ProcessS ScheduleA AssignBinAssignTile
![Page 35: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/35.jpg)
Phases help identify optimization opportunities.
Identical tile size
Identical data-to-tile mapping
Identical tile-to-core mapping
Stage A
Stage B
Stage C
Stage D
![Page 36: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/36.jpg)
Phases help identify optimization opportunities.
Identical tile size
Identical AssignTile Result
Identical Schedule Result
Stages can be fused to one
Stage A
Stage D
Stage B
Stage C
Stage BStage C
![Page 37: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/37.jpg)
Phases help explore pipeline implementations
Vertex Shade
Raster
Fragment Shade
Composite
Geometry Shade
VS VS VS VS
GS GS GS GS
Rst Rst Rst Rst
FS FS FS FS
Cmp Cmp Cmp Cmp
![Page 38: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/38.jpg)
Phases help explore pipeline implementations
Vertex Shade
Raster
Fragment Shade
Composite
Geometry Shade
Rst Rst Rst Rst
FS FS FS FS
Cmp Cmp Cmp Cmp
VS VS VS VS
GS GS GS GS
![Page 39: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/39.jpg)
Phases help explore pipeline implementations
Vertex Shade
Raster
Fragment Shade
Composite
Geometry Shade
VS VS VS VS
GS GS GS GS
Rst Rst Rst Rst
FS FS FS FS
Cmp Cmp Cmp Cmp
![Page 40: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/40.jpg)
Phases help explore pipeline implementations
Vertex Shade
Raster
Fragment Shade
Composite
Geometry Shade
VS VS VS VS
GS GS GS GS
Rst Rst Rst Rst
FS FS FS FS
Cmp Cmp Cmp Cmp
![Page 41: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/41.jpg)
Evaluation
![Page 42: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/42.jpg)
Piko pipelines are easy to express and customize
VS
Rast
FS
Setup
Comp
VS
Rast
FS
Setup
Comp
FS
Comp
Split
Dice
Sample
Shade
Comp
VS
Rast
Trace
Setup
FS
Comp
Triangle Raster Stereo Raster Reyes Raster-Raytrace
![Page 43: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/43.jpg)
Piko pipelines are easy to express and customize
VS
Rast
FS
Setup
Comp
VS
Rast
FS
Setup
Comp
FS
Comp
Split
Dice
Sample
Shade
Comp
VS
Rast
Trace
Setup
FS
Comp
Triangle Raster Stereo Raster Reyes Raster-Raytrace
![Page 44: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/44.jpg)
Piko pipelines are easy to express and customize
VS
Rast
FS
Setup
Comp
VS
Rast
FS
Setup
Comp
FS
Comp
Split
Dice
Sample
Shade
Comp
VS
Rast
Trace
Setup
FS
Comp
Triangle Raster Stereo Raster Reyes Raster-Raytrace
![Page 45: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/45.jpg)
Piko pipelines are easy to express and customize
VS
Rast
FS
Setup
Comp
VS
Rast
FS
Setup
Comp
FS
Comp
Split
Dice
Sample
Shade
Comp
VS
Rast
Trace
Setup
FS
Comp
Triangle Raster Stereo Raster Reyes Raster-Raytrace
![Page 46: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/46.jpg)
Piko lets us explore implementation alternatives
No tiling, complete stage fusion
1 10 100 10000
1
2
3
4
5
6
7
Shader complexity (# lights)
Rel
ativ
e fr
ame
tim
e
NVIDIA GPU Multicore CPU
Fairy ForestVS
Rast
FS
Setup
Comp
VS
Setup
Rast
FS
Comp
Baseline
![Page 47: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/47.jpg)
Piko lets us explore implementation alternatives
Tiling with fusion
1 10 100 10000
1
2
3
4
5
6
7
Shader complexity (# lights)
Rel
ativ
e fr
ame
tim
e Fairy Forest
NVIDIA GPU Multicore CPU
VS
Rast
FS
Setup
Comp
Baseline
VS
Setup
Rast
FS
Comp
![Page 48: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/48.jpg)
Piko lets us explore implementation alternatives
Tiling with no fusion
1 10 100 10000
1
2
3
4
5
6
7
Shader complexity (# lights)
Rel
ativ
e fr
ame
tim
e Fairy Forest
NVIDIA GPU Multicore CPU
VS
Rast
FS
Setup
Comp
Baseline
VS
Setup
FS
Comp
Rast
![Page 49: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/49.jpg)
Piko enables high-performance code generation
Fairy Forest
Buddha Mecha Dragon0
2
4
6
8
10
12
cudaraster Piko Raster
Ren
derin
g tim
e (m
s) Performance is within 3.3-5.5x of hand-optimized code.
[Laine and Karras 2011]
![Page 50: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/50.jpg)
Piko enables high-performance code generation
[Weber et al. 2015]
Micropolis Piko Reyes0
2
4
6
8
10
12
14
Spl
it P
erfo
rman
ce
(Mpa
tche
s /
seco
nd)
Split performance is within 30% of hand-optimized GPU Reyes.
![Page 51: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/51.jpg)
Summary
![Page 52: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/52.jpg)
Piko enables programmability and performance
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko
CPU
GPU
![Page 53: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/53.jpg)
Piko
CPU
GPU
Piko enables programmability and performance
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
High-level programmability
![Page 54: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/54.jpg)
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko enables programmability and performance
Piko
CPU
GPU
High-performance
![Page 55: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/55.jpg)
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko
Piko enables programmability and performance
CPU
GPU
Flexibility
![Page 56: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/56.jpg)
Our work is not done
![Page 57: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/57.jpg)
Piko can be improved
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko
CPU
GPU
Utilization of shared local memory
![Page 58: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/58.jpg)
Piko can be improved
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko
CPU
GPU
Support for dynamic scheduling of pipeline work
![Page 59: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/59.jpg)
The search for a graphics abstraction is not over
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko
CPU
GPU
![Page 60: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/60.jpg)
The search for a graphics abstraction is not over
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko
CPU
GPU
Do tiles have to be 2d, uniform, one-config-per stage?
![Page 61: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/61.jpg)
The search for a graphics abstraction is not over
Stage B
Stage C
Stage A
Stage E
Stage D
Stage F
Piko
CPU
GPU
Are there other abstractions that enable high-level programmability and achieve high-performance?
![Page 62: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/62.jpg)
Acknowledgments
Discussions and adviceTim Foley, Jonathan Ragan-Kelley, Aaron Lefohn, Matt Pharr, Mark Lacey, Kayvon Fatahalian, Bill Mark, Marco Salvi, Chuck Lingle, Jason Mak, Edmund Yan, Calina Copos, Mike Steffen, Alex Elkman
NVVM HelpVinod Grover, Sean Lee
Financial SupportIntel Science and Technology Center (VC), NVIDIA Research Fellowship, Intel Ph.D. Fellowship, National Science Foundation Fellowship, NVIDIA, AMD, NSF, UC Lab Fees
AssetsAMD, Intel (Project Offset), Ingo Wald, Bay Raitt, Stanford
![Page 63: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/63.jpg)
Thank you!github.com/piko-dev/piko-public
![Page 64: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/64.jpg)
Extra Slides
![Page 65: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/65.jpg)
RasterPipe pipe;pipe.allocate(...);pipe.prepare();pipe.run_single();
unsigned* pixels = pipe.pikoScreen.getData();
glDrawPixels(screenW, screenH, GL_RGBA, GL_UNSIGNED_BYTE, data);
Host Code is device independent.
Unmodified C++
![Page 66: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/66.jpg)
A pipeline is a C++ class declaration.
class RasterPipe : public PikoPipe {
VertexShaderStage vertexShader_; RasterStage raster_; PikoScreen pikoScreen_; ...
RasterPipe() { pikoConnect (vertexShader_, raster_, 0, 0); } ...};
Connections indicate pipeline structure.
Stages are instantiated as objects.
![Page 67: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/67.jpg)
Each phase is a member function.
class RasterStage : public Stage<8, 8, 32, raster_stri, Pixel> { inline void AssignTile(raster_stri p) { ... this->assignToBin (p, binID); ... } inline void schedule(int binID) { this->specifySchedule (LOAD_BALANCE); } inline void process(raster_stri p) { ... this->emit (Pixel(pos, color), 0); ... } };
A stage is a C++ class definition.
Built-in routines identify common scenarios.
Templates specify tiling configuration.
![Page 68: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/68.jpg)
pikoc implements the pipeline description.
Pipeline
Stagesclang
pikocfrontend
Kernelplan
pikoc backend
Host Interface
Pipe Implementation
clang libNVVM
Frontend walks the AST and performs high-level optimizations.
Backend uses LLVM to generate optimized device code.
![Page 69: Piko: A Framework for Authoring Programmable Graphics Pipelines Anjul Patney and Stanley Tzeng UC Davis and NVIDIA Kerry A. Seitz, Jr. and John D. Owens.](https://reader035.fdocuments.in/reader035/viewer/2022062308/56649ec95503460f94bd6d46/html5/thumbnails/69.jpg)
WIP Slides