Skip to main content

Module gpu_optimization

Module gpu_optimization 

Source
Expand description

Advanced GPU Optimization Engine

This module provides GPU-aware optimization heuristics and genuinely measured execution paths for dataset operations: adaptive kernel selection, auto-tuning, and benchmarking that report only what was actually dispatched and timed on this process — never a fabricated speedup.

§Backend model

AdvancedGpuOptimizer keeps this crate’s own crate::gpu::GpuBackend / crate::gpu::GpuContext as its public backend-selection type: it is also the type used throughout the rest of this crate’s GPU-flavored dataset generators and is re-exported at the crate root, so replacing it with scirs2_core::gpu’s (differently shaped, unit-variant-only) backend type would ripple far beyond this module.

Requesting GpuBackend::Cuda or GpuBackend::OpenCl here does not dispatch vendor-specific kernels — both route through the same real, backend-agnostic wgpu/GpuNdarray compute path used by this crate’s (crate-private) generators::gpu_dispatch module — see that module for the canonical pattern this file follows — with an honest, silent fallback to the CPU path whenever no adapter is present, the workload is too small to be worth transferring, or the wgpu feature is disabled at compile time. GpuBackend::Cpu never attempts a GPU dispatch, by design.

For genuine vendor-specific NVIDIA CUDA execution via the pure-Rust oxicuda-* stack, see crate::gpu_cuda (feature = "cuda") — a separate, additive path not currently wired into this optimizer.

Structs§

AIPerformancePredictor
Advanced MODE ENHANCEMENTS Advanced AI-driven optimization and real-time monitoring capabilities AI-driven performance predictor using machine learning
AdaptiveOptimizationState
Adaptive optimization state
AdvancedGpuOptimizer
Advanced-advanced GPU performance optimizer
AdvancedKernelConfig
Advanced-advanced GPU kernel configuration
BenchmarkResult
Individual benchmark result
GpuPerformanceProfile
GPU performance profiling data
MonitoringConfig
Monitoring configuration
OptimizationAdjustment
Optimization adjustment made by the adaptive system
PerformanceBenchmarkResults
Performance benchmark results
PerformanceDataPoint
Performance data point for ML training
PerformanceSnapshot
Performance snapshot at a specific point in time
PerformanceStats
Performance statistics summary
PredictionAccuracy
Prediction accuracy metrics
RealTimePerformanceMonitor
Real-time performance monitor with adaptive optimization

Enums§

AdjustmentType
Types of optimization adjustments
DataLayout
Data layout optimization strategies
LoadBalancingMethod
Load balancing methods
MemoryAccessPattern
Memory access pattern optimization
PerformanceTrend
Performance trend analysis
SpecializationLevel
Kernel specialization levels
VectorizationStrategy
Vectorization strategies

Functions§

benchmark_advanced_performance
Convenience function for performance benchmarking
generate_advanced_matrix
Convenience function for advanced-optimized matrix generation