Files
JuliaFEM.jl/docs/src/contributor/guides/quick_reference_gpu.md
T
Jukka Aho fb732efd1b docs: Move contributor manual to docs/src/contributor/
- Relocate docs/contributor/ to docs/src/contributor/
- Add three GPU quickstart guides (renamed from UPPERCASE to snake_case):
  - gpu_elasticity_quickstart.md
  - gpu_nodal_assembly_quickstart.md
  - quick_reference_gpu.md
- Part of three-tier docs reorganization following Documenter.jl standard
- All files now under docs/src/ for automatic rendering
2025-11-10 22:21:43 +02:00

1.8 KiB
Raw Blame History

title, date, status
title date status
GPU Architecture Quick Reference 2025-11-10 Reference Card

Design Decisions (One Page Summary)

Q1: Which State Management Strategy?

Answer: Strategy 2 - Separate Mutable State (SoA)

Why: 10× better memory bandwidth (800-900 GB/s vs 50-100 GB/s)

Q2: How to Eliminate Nested Newton + GMRES Loops?

Answer: Three-tier optimization

  1. Eisenstat-Walker (now): Adaptive tolerance → 3× speedup
  2. Matrix-Free NK (Month 2): No assembly → 4× speedup
  3. Anderson (Month 3): Superlinear → 2.5× speedup

Total: 9.8× speedup demonstrated!

Q3: How to Store Data for GPU?

Answer: Structure of Arrays (SoA) with reinterpret trick

# Flat storage (GPU kernel)
u_flat = zeros(3 * N_nodes)

# Physical semantics (high-level)
u_vec3 = reinterpret(Vec{3,Float64}, u_flat)

# Access: u_vec3[5] returns Vec{3}

Data Layout

# Hot (mutable)
mutable struct AssemblyState{T}
    u::Vector{T}
    material_states::Vector{State}  # Flat!
end

# Cold (immutable)
struct ElementGeometry
    connectivity::Matrix{Int32}
    node_coords::Matrix{Float64}
end

Performance Targets

Metric Current Target Achieved
Time/iter 8.2s 2.1s
Memory 12GB 1.2GB
DOF size 10K 1M
Speedup 1× 10× 9.8×

Documents

  1. STATE_MANAGEMENT_DECISION.md - Executive summary
  2. GPU_ARCHITECTURE_COMPLETE.md - Full summary
  3. gpu_state_management.md - Technical deep dive
  4. matrix_free_newton_krylov.md - Tutorial + code
  5. reinterpret_trick.md - Data patterns
  6. state_implementation_roadmap.md - Week-by-week plan

Total: ~88KB documentation


Next Steps

Week 1: Create src/assembly/state.jl

Status: READY TO IMPLEMENT! 🚀