Enhance XPU support for benchmarks, profiling, and verification#11
Open
gurwinderintel wants to merge 7 commits intoRightNow-AI:mainfrom
Open
Enhance XPU support for benchmarks, profiling, and verification#11gurwinderintel wants to merge 7 commits intoRightNow-AI:mainfrom
gurwinderintel wants to merge 7 commits intoRightNow-AI:mainfrom
Conversation
- Enable XPU device detection and synchronization across runtime paths - Update benchmark timing logic for XPU compatibility - Extend verifier to run on XPU with large-output-safe comparison - Add/align XPU-compatible kernel entry checks in matmul and softmax - Keep CUDA behavior intact while adding XPU execution parity - Touches: bench.py, kernel.py, kernels/matmul.py, kernels/softmax.py, prepare.py, profile.py, verify.py
- Remove dead return in verify softmax replacement path\n- Document official Intel XPU support in README requirements and changelog
- Device-agnostic profiler activity selection - Robust NaN/Inf correctness comparison - Platform-aware tolerance tuning (fused_mlp bf16) - Backward compatible with CUDA-only paths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for Intel XPU devices (such as Intel GPUs) to the
bench.pybenchmark harness, making it more device-agnostic and improving its robustness across different hardware backends. The code now automatically detects and uses XPU if CUDA is unavailable, and adapts device-specific operations, error handling, and profiling accordingly.Device abstraction and detection:
_USE_XPU,_DEFAULT_DEVICE,_sync_device,_empty_cache,_reset_peak_memory_stats,_max_memory_allocated,_event, and_OOM_ERROR) to transparently handle CUDA and XPU backends for synchronization, memory management, and event timing. All device-specific calls are now routed through these helpers. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]detect_gpu()and related code to support XPU properties and fallback when neither CUDA nor XPU is available.Correctness and tolerance handling:
xpu_tolerances) in the benchmark configuration, with logic to override defaults when running on XPU. [1] [2]Profiling and performance measurement:
General improvements:
"cuda"device strings with_DEFAULT_DEVICEthroughout the codebase for device-agnostic operation. [1] [2] [3]