Skip to content

Conversation

@daisyden
Copy link
Contributor

@daisyden daisyden commented Nov 6, 2025

disable_build
disable_e2e
disable_distributed

Copilot AI review requested due to automatic review settings November 6, 2025 14:30
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 refactors the handling of python_ref_db in XPU test utilities to use PyTorch's stock definition instead of maintaining a custom copy. The changes eliminate redundant storage and manipulation of python_ref_db while filtering it locally where needed.

Key Changes:

  • Removed custom storage of python_ref_db in the XPU test wrapper class
  • Simplified align_supported_dtypes logic by removing complex conditional checks
  • Added skip list entries for newly exposed test cases

Reviewed Changes

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

File Description
test/xpu/xpu_test_utils.py Removed custom python_ref_db storage, simplified dtype alignment logic, and created local filtered version where needed
test/xpu/skip_list_common.py Added skip entries for _vdot_, _dot_, _flash_attention_, and _efficient_attention_ operations

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

) or opinfo.name in _ops_without_cuda_support:
if opinfo.name in _ops_without_cuda_support:
opinfo.dtypesIf["xpu"] = opinfo.dtypes
else:
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

The simplified logic in align_supported_dtypes no longer checks if opinfo.name is in _xpu_computation_op_list before setting dtypes. This means operations not in _xpu_computation_op_list but also not in _ops_without_cuda_support will now take the else branch and modify backward_dtypes, which may not be the intended behavior. The original condition ensured only operations in the computation list were processed this way.

Suggested change
else:
elif opinfo.name in _xpu_computation_op_list:

Copilot uses AI. Check for mistakes.

import torch
from torch import bfloat16, cuda
from torch import cuda
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

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

The removal of bfloat16 from the import statement leaves it unused elsewhere in the code, but line 927 previously referenced bfloat16 when adding it to backward_dtypes. Verify that removing the bfloat16 handling doesn't break backward compatibility for operations that require it.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Performance outliers, please check!

  • 🟡 [80%, 90%), may be fluctuations
Category Model Target vs. Baseline [Eager] Target vs. Baseline [Inductor]
torchbench_bfloat16_training mnasnet1_0 1.019841 0.898455

"_vdot_",
"_dot_",
"_flash_attention_",
"_efficient_attention_",
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to link issue for those cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are unsupported ops, do you know whether we have plan on dot and vdot?

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.

4 participants