Our conflict graphs actually have a very special structure that we can exploit...
Chordal graphs
Our conflict graphs are intersection graphs of subtrees
not chordal
chordal
MWIS of chordal graphs: reduction
Based on the Isolated Weight Transfer reduction [Lamm2018]
Isolated vertex: $v$ is an isolated vertex if all neighbors of $v$ are connected by an edge Maximal isolated vertex: $v$ is a maximal isolated vertex if it is isolated and has the maximum weight among its isolated neighbors
1
2
86
4
51
Let $v$ be a maximal isolated vertex,
$\forall u \in N(v)$, if $w(u) \leq w(v)$: remove $u$
Remove $v$ and $\forall u \in N(v)$, change its weight to $w(u)−w(v)$
Property 1: chordal graphs have at least one isolated vertex.
Property 2: a subgraph of a chordal graph is chordal.
This means that the reduction will converge to the empty graph
MWIS of chordal graphs: expansion
1
2
68
4
5
$\mathcal{I}_3 = \{\}$
$\mathcal{I}_2 = \{$
$\}$
$\mathcal{I}_1 = \{$
$\}$
Sequence of graphs $G_1, ..., G_N$
with MWIS $\mathcal{I}_1, ..., \mathcal{I}_N$
$$\mathcal{I}_k = \mathcal{I}_{k+1} \cup M_k$$
$$\begin{align*}M_k = \{ v \in G_k,\,& v \text{ is maximal isolated} \\ &\text{ and } N(v) \cap \mathcal{I}_{k+1} = \emptyset\}
\end{align*}$$
We propose a GPU algorithm based on this reduction
Results
BreakingLionExplodingDragonClothBallBigScene
Results
Update time:
Faster than rebuild ($\times$ 1.6-2.7 speedup)
Slower than rotations ($\times$ 1.5-9.0 slowdown)
SAH:
Rotations struggle on difficult scenes
Treelet sampling quality is consistent across scenes
Raytracing time:
Our method performs worse than predicted by SAH
We are currently investigating this phenomenon
Conclusion
We propose a novel GPU algorithm to update a BVH based on sampling treelets.
Choosing the best subset of non-intersecting treelets is equivalent to finding the MWIS of a chordal graph.
We compute this MWIS in parallel on the GPU.
The resulting system gives hierarchies with consistently low SAH.
We are currently investigating why the raytracing performance is worse than predicted by the SAH.
Thank you for your attention!
Graph representation
We need efficient parallel implementations of the following operations:
☐Check if two vertices are neighbors
☐Iterate over the neighbors of a vertex
☐Delete a vertex
☐Reinsert a previously deleted vertex
We use both a dense and a sparse representation of the adjacency matrix
Dense representation: 2D matrix
Sparse representation (compressed sparse row): explicitly store the neighbors of every vertex
Vertices with nonpositive weights are considered deleted
MWIS computation: reduction phase
3 kernels for the reduction phase, 3 kernels for the expansion phase
Reduction (loop until the graph is empty):
Find the isolated vertices
Two threads per edge
Check if the neighbors of $v$ are connected to $u$
Check if max isolated vertex
One thread per vertex
If vertex is isolated: check if it is maximal
Reduce graph
One thread per max isolated vertex
Traverse neighbors and subtract weights
1-1-3
20-2
820
40-2
51-1
Iteration 1:
4
2
Iteration 2:
2
MWIS computation: expansion phase
3 kernels for the reduction phase, 3 kernels for the expansion phase
Expansion (loop for the same number of iterations):
Expand graph
One thread per neighbor $u$ of a max isolated vertex $v$
Add $w(v)$ to $w(u)$
Check if the neighbors are in the solution set
One thread per neighbor $u$ of a max isolated vertex
Check if the solution set contains $u$
Add to solution set
One thread per max isolated vertex $v$
If none of the neighbors of $v$ are in the solution set, add $v$ to solution set