Skip to content

Compute Test Results

Kel edited this page Sep 29, 2025 · 3 revisions

This document explains the output and interpretation of compute performance tests in the Metal Performance Tester. Compute tests measure GPU compute shader performance using parallel processing workloads.

Test Configuration Section

Compute Test Configuration:
- Baseline: Low Compute Baseline
- Device: AMD Radeon Pro 5300M
- Threadgroup size: 16x16x1
- Threadgroup count: 8x8x1
- Compute workload complexity: 3/10

Configuration Parameters Explained

Parameter Description Impact on Performance
Baseline Reference performance data for comparison Determines what "normal" performance looks like
Device GPU hardware being tested Different GPUs have different compute capabilities
Threadgroup size Number of threads per threadgroup (x, y, z) Affects memory access patterns and synchronization
Threadgroup count Number of threadgroups to dispatch Determines total parallel workload
Compute workload complexity Algorithm complexity level (1-10) Higher complexity = more instructions per thread

Compute Workload Details

Threadgroup Configuration

  • Size (16x16x1): 256 threads per threadgroup
  • Count (8x8x1): 64 threadgroups total
  • Total threads: 256 × 64 = 16,384 parallel threads

Complexity Levels

  • 1-3: Simple operations (arithmetic, basic math)
  • 4-6: Moderate algorithms (sorting, filtering)
  • 7-10: Complex algorithms (FFT, matrix operations)

Performance Comparison Section

Performance Comparison:
- Current Throughput: 133.4 ops/sec
- Baseline Throughput: 130.3 ops/sec
- Throughput Change: +2.4%

Throughput Metrics Explained

  • Current Throughput: Operations completed per second in current test
  • Baseline Throughput: Operations per second from reference baseline
  • Throughput Change: Percentage difference between current and baseline
    • Positive values: Performance improvement
    • Negative values: Performance regression
    • ±5%: Typically considered normal variance
    • ±10%+: May indicate significant change

Understanding Compute Throughput

  • Higher throughput: More work completed per unit time
  • Lower throughput: Less work completed per unit time
  • Factors affecting throughput:
    • Memory bandwidth utilization
    • Compute unit efficiency
    • Thread synchronization overhead
    • Algorithm complexity

Statistical Analysis Section

Statistical Analysis:
- Mean Difference: -0.177 ms
- Confidence Interval: [-0.641, 0.287] ms
- Statistical Significance: No
- Regression Detected: No

Statistical Metrics Explained

Mean Difference

  • Definition: Average difference in execution time between current and baseline
  • Units: Milliseconds (ms)
  • Interpretation:
    • Positive values: Slower execution (performance regression)
    • Negative values: Faster execution (performance improvement)
  • Your result: -0.177 ms (slightly faster, but not significant)

Confidence Interval

  • Definition: Range where the true mean difference likely falls
  • Interpretation:
    • Includes zero: No statistically significant difference
    • Doesn't include zero: Statistically significant difference
  • Example: [-0.641, 0.287] includes zero, so no significant change

Statistical Significance

  • No: Observed difference is within normal measurement variance
  • Yes: Observed difference is statistically meaningful

Regression Detected

  • No: Performance is within acceptable bounds
  • Yes: Performance has significantly degraded

Quality Comparison Section

Quality Comparison:
- Current Quality: Fair
- Baseline Quality: Fair

Quality Ratings Explained

Quality is based on Coefficient of Variation (CV) = Standard Deviation / Mean

Rating CV Range Description Typical Causes
Excellent < 5% Very consistent measurements Ideal test conditions, stable system
Good 5-10% Good consistency Minimal background load
Fair 10-20% Moderate variability Normal system conditions
Poor ≥ 20% High variability Background processes, thermal throttling

Why Quality Matters for Compute Tests

  • Higher quality: More reliable detection of compute performance changes
  • Lower quality: Still functional, but may miss subtle optimizations
  • Compute-specific factors: Memory bandwidth fluctuations, cache behavior

Compute Utilization Comparison

Compute Utilization Comparison:
- Compute Utilization: 38.0% (baseline: 33.0%, change: +15.0%)
- Memory Utilization: 56.7% (baseline: 56.5%, change: +0.3%)
- Total Utilization: 38.0% (baseline: 33.0%, change: +15.0%)

Utilization Metrics Explained

Compute Utilization

  • Definition: Percentage of GPU compute units actively processing
  • Factors: Threadgroup efficiency, instruction throughput
  • Normal range: 20-80% for typical compute workloads
  • Your result: 38.0% indicates moderate compute unit usage

Memory Utilization

  • Definition: Percentage of memory bandwidth being used
  • Factors: Memory access patterns, data transfer rates
  • Normal range: 30-90% for memory-intensive workloads
  • Your result: 56.7% indicates moderate memory usage

Total Utilization

  • Definition: Overall GPU utilization for compute workload
  • Calculation: Weighted average based on compute vs memory workload
  • Normal range: 40-90% for active compute workloads

Interpreting Utilization Changes

  • Small changes (±5%): Normal variance
  • Medium changes (±15%): May indicate workload differences
  • Large changes (±50%+): Likely configuration or system differences

Test Results Summary

NO SIGNIFICANT CHANGE: Compute performance is within normal variance.
No action required.

Result Interpretations

NO SIGNIFICANT CHANGE

  • Performance difference is within normal measurement variance
  • No regression or improvement detected
  • Continue with normal development workflow

REGRESSION DETECTED

  • Compute performance has significantly degraded
  • Investigate recent changes (algorithms, memory access patterns)
  • Consider optimizing compute shaders or threadgroup configuration

IMPROVEMENT DETECTED

  • Compute performance has significantly improved
  • Verify the improvement is intentional and stable
  • Update baseline if improvement is permanent

Compute-Specific Performance Factors

Threadgroup Efficiency

  • Optimal threadgroup size: Depends on GPU architecture
  • Memory coalescing: How threads access memory together
  • Synchronization overhead: Barriers and atomic operations

Memory Access Patterns

  • Coalesced access: Efficient memory bandwidth usage
  • Cache utilization: L1/L2 cache hit rates
  • Memory latency: Time to fetch data from memory

Compute Unit Utilization

  • Warp/wavefront efficiency: How well threads execute together
  • Instruction throughput: Instructions per clock cycle
  • Resource occupancy: Utilization of compute units

Troubleshooting Common Issues

Low Compute Utilization

  1. Check threadgroup size: May not match GPU architecture
  2. Review memory access patterns: Ensure coalesced access
  3. Verify workload distribution: Balance compute vs memory work

High Memory Utilization

  1. Optimize memory access: Reduce unnecessary memory transfers
  2. Use local memory: Store frequently accessed data locally
  3. Batch operations: Reduce memory transaction overhead

Inconsistent Performance

  1. Check system load: Close background applications
  2. Monitor thermal conditions: Prevent throttling
  3. Verify consistent test conditions: Same system state

Best Practices for Compute Testing

Threadgroup Configuration

  1. Match GPU architecture: Use optimal threadgroup sizes
  2. Balance work distribution: Even workload across threadgroups
  3. Minimize synchronization: Reduce barriers and atomics

Memory Optimization

  1. Coalesce memory access: Adjacent threads access adjacent memory
  2. Use appropriate memory types: Local, private, global
  3. Minimize memory transfers: Keep data on GPU when possible

Workload Design

  1. Choose representative algorithms: Match real-world usage
  2. Scale appropriately: Test different workload sizes
  3. Profile memory usage: Monitor bandwidth utilization

Advanced Compute Analysis

Performance Profiling

  • Use Metal Performance Shaders (MPS) for optimization
  • Profile compute shader execution with Instruments
  • Monitor memory bandwidth and cache behavior

Algorithm Optimization

  • Optimize for GPU architecture (Apple Silicon vs discrete GPUs)
  • Use vectorized operations when possible
  • Minimize divergent execution paths

System Tuning

  • Monitor GPU power consumption during compute
  • Check thermal management settings
  • Verify memory allocation and deallocation patterns

Compute vs Graphics Testing Differences

Aspect Graphics Tests Compute Tests
Primary metric FPS (frames per second) Throughput (ops/sec)
Workload type Rendering pipeline Parallel computation
Utilization focus Vertex/Fragment stages Compute units/Memory
Optimization target Frame time consistency Instruction throughput
Memory patterns Texture/vertex data Structured data arrays

Integration with CI/CD

Automated Testing

  1. Set performance thresholds: Typically ±10% for compute workloads
  2. Monitor trends: Track performance over time
  3. Alert on regressions: Integrate with build systems

Baseline Management

  1. Update baselines: When performance improvements are intentional
  2. Version control: Track baseline changes with code changes
  3. Environment consistency: Ensure test environments match production

Clone this wiki locally