Skip to content

Conversation

daisyden
Copy link
Contributor

As torch.testing._internal.common_device_type.largeTensorTest already supports xpu, remove the hook in test code.

Copy link
Contributor

@Copilot 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 removes custom XPU-specific hooks for the largeTensorTest function, as the upstream PyTorch common testing utilities now natively support XPU devices. The changes simplify the XPU test infrastructure by eliminating redundant device translation logic.

  • Removes the largeTensorTest attribute assignment in the XPUPatchForImport constructor
  • Eliminates the lambda function that redirected CUDA device calls to XPU in the __init__ method
  • Removes the restoration of the original largeTensorTest function in the __exit__ method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@daisyden daisyden removed the request for review from mengfei25 September 18, 2025 02:32
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