Skip to content

Conversation

@shangerxin
Copy link

Description

Fixes #114850, we will port test utils and schema check to Intel GPU
We could enable Intel GPU with following methods and try the best to keep the original code styles:

Changes

  1. Get device type with from accelerator and get_devtype helper method
  2. Replace the requires cuda statement to device_type.
  3. Add HAS_XPU and HAS GPU check to replace some of the HAS_XPU etc.

Copilot AI review requested due to automatic review settings October 31, 2025 07:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates test utilities and schema checking functionality to support Intel XPU (GPU) devices by porting existing CUDA-specific test files. The migration follows a pattern of making device-agnostic changes while preserving original code structure.

  • Creates device-agnostic test infrastructure for Intel XPU support
  • Introduces a checkpoint utility module for XPU test environments
  • Enables device type detection using accelerator helpers instead of hardcoded CUDA references

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.

File Description
test/xpu/test_utils.py Migrates utility tests from CUDA to device-agnostic approach using HAS_GPU and device_type variables
test/xpu/test_schema_check.py Ports schema validation tests to XPU with device type instantiation for cpu/cuda/xpu
test/xpu/checkpoint.py Adds comprehensive checkpoint functionality supporting XPU device detection and state management

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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