Skip to content

Add Shared Layout tab with GPU memory swizzle visualization#19

Merged
leeliu103 merged 1 commit intomainfrom
feat/shared-layout
Jan 27, 2026
Merged

Add Shared Layout tab with GPU memory swizzle visualization#19
leeliu103 merged 1 commit intomainfrom
feat/shared-layout

Conversation

@leeliu103
Copy link
Owner

Implements comprehensive Shared Layout feature for visualizing GPU shared memory swizzle patterns with bank conflict analysis.

Core Implementation:

  • SharedLayout: Swizzle math supporting standard phase-based and AMD rotating modes
  • SharedLayoutValidator: Comprehensive validation for swizzle parameters and tensor shapes
  • SharedLayoutTab: Interactive tab with real-time bank info and tooltips
  • 56 new tests achieving full coverage (unit, integration, bank distribution, E2E)

Architecture Improvements:

  • Refactored ParameterForm to generic component for reusability across layout types
  • Added custom color provider support to CanvasRenderer for bank-based coloring
  • Fractional bank capacity reporting for accurate multi-bank element modeling
  • Single-render optimization matching other tab patterns

UI Features:

  • AMD-focused defaults (128×64, vec=4, perPhase=2, maxPhase=4, row-major order)
  • Real-time bank info display (32 banks, element capacity, segments)
  • Interactive tooltips showing logical index, offset, segment, and bank assignment
  • Auto-updating form with comprehensive validation

Test Coverage:

  • 21 unit tests for swizzle formulas and bank calculations
  • 11 integration tests for round-trip correctness
  • 5 bank distribution tests
  • 12 validator tests
  • 7 tab controller tests
  • 5 E2E tests for UI interactions

Implements comprehensive Shared Layout feature for visualizing GPU shared memory swizzle patterns with bank conflict analysis.

Core Implementation:
- SharedLayout: Swizzle math supporting standard phase-based and AMD rotating modes
- SharedLayoutValidator: Comprehensive validation for swizzle parameters and tensor shapes
- SharedLayoutTab: Interactive tab with real-time bank info and tooltips
- 56 new tests achieving full coverage (unit, integration, bank distribution, E2E)

Architecture Improvements:
- Refactored ParameterForm to generic component for reusability across layout types
- Added custom color provider support to CanvasRenderer for bank-based coloring
- Fractional bank capacity reporting for accurate multi-bank element modeling
- Single-render optimization matching other tab patterns

UI Features:
- AMD-focused defaults (128×64, vec=4, perPhase=2, maxPhase=4, row-major order)
- Real-time bank info display (32 banks, element capacity, segments)
- Interactive tooltips showing logical index, offset, segment, and bank assignment
- Auto-updating form with comprehensive validation

Test Coverage:
- 21 unit tests for swizzle formulas and bank calculations
- 11 integration tests for round-trip correctness
- 5 bank distribution tests
- 12 validator tests
- 7 tab controller tests
- 5 E2E tests for UI interactions

Co-Authored-By: Claude <noreply@anthropic.com>
@leeliu103 leeliu103 merged commit 97248ab into main Jan 27, 2026
1 check passed
@leeliu103 leeliu103 deleted the feat/shared-layout branch January 27, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant