Skip to content

Commit 08eedef

Browse files
mivertowskiclaude
andcommitted
feat(metal): Enable kernel launch in MetalPageRankOrchestrator (Phase 5 TODO #3)
Activated actual GPU kernel launch for all 3 PageRank Ring Kernels, replacing stub implementation. Kernels now execute as persistent GPU actors on Apple Silicon. Changes: - MetalPageRankOrchestrator.LaunchKernelsAsync: Uncommented LaunchAsync call - Launches 3 persistent kernels in sequence: 1. metal_pagerank_contribution_sender (grid=1, block=256) 2. metal_pagerank_rank_aggregator (grid=1, block=256) 3. metal_pagerank_convergence_checker (grid=1, block=256) Technical Details: - Grid size: 1 threadgroup (simple topology for 3-kernel pipeline) - Block size: 256 threads/threadgroup (optimal for Metal) - Launches via MetalRingKernelRuntime.LaunchAsync implemented in Phase 5.1 - Each kernel runs persistently with while(true) loop until termination Impact: - Enables actual GPU execution of PageRank algorithm (was stub before) - Foundation for K2K message passing and barrier synchronization - Target: <500μs launch latency per kernel (claim #8) Status: Phase 5 TODO #3 COMPLETE (1 of 6 critical TODOs fixed) Remaining TODOs: - TODO #1 (line 190): K2K routing table initialization - TODO #2 (line 198): Multi-kernel barrier initialization - TODO #4 (line 336): Send messages via runtime - TODO #5 (line 367): Poll for convergence results - TODO #6 (line 394): Collect final ranks Note: K2K routing and barriers deferred - require architectural changes to expose queue pointers from MetalRingKernelRuntime. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a92b9e3 commit 08eedef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/RingKernels/PageRank/Metal/MetalPageRankOrchestrator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ private async Task LaunchKernelsAsync(CancellationToken cancellationToken)
290290
{
291291
_logger.LogInformation("Launching kernel: {KernelId}", kernelId);
292292

293-
// TODO: Implement actual kernel launch via MetalRingKernelRuntime
294-
// await _runtime.LaunchAsync(kernelId, gridSize, blockSize, null, cancellationToken);
293+
// Launch persistent Ring Kernel on GPU
294+
await _runtime.LaunchAsync(kernelId, gridSize, blockSize, null, cancellationToken);
295295

296296
_logger.LogInformation(" Launched {KernelId} (grid={Grid}, block={Block})",
297297
kernelId, gridSize, blockSize);

0 commit comments

Comments
 (0)