Skip to content

Conversation

xin3he
Copy link
Contributor

@xin3he xin3he commented Oct 11, 2025

PR Type

Enhancement


Description

  • Skip time-consuming FP8 unit tests under specific conditions

Diagram Walkthrough

flowchart LR
  A["Identify specific test conditions"] -- "Check use_hpu_graphs, hp_dtype, device_type" --> B["Skip tests if conditions met"]
Loading

File Walkthrough

Relevant files
Enhancement
test_linear.py
Add condition to skip time-consuming tests                             

test/3x/torch/algorithms/fp8_quant/unit_tests/test_layers/test_linear.py

  • Added condition to skip tests
  • Used pytest.xfail for skipping
+2/-0     

Signed-off-by: He, Xin3 <xin3.he@intel.com>
@PRAgent4INC
Copy link
Collaborator

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Possible Issue

The condition for skipping tests might not cover all edge cases, leading to potential missed test coverage.

if not use_hpu_graphs and (hp_dtype == torch.bfloat16) and device_type == GAUDI2:
    pytest.xfail("[SW-242200] Temporary skip them since the time usage is more than expected.")

@PRAgent4INC
Copy link
Collaborator

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Improve skip reason clarity

Consider using a more descriptive reason for skipping the tests.

test/3x/torch/algorithms/fp8_quant/unit_tests/test_layers/test_linear.py [137-138]

 if not use_hpu_graphs and (hp_dtype == torch.bfloat16) and device_type == GAUDI2:
-    pytest.xfail("[SW-242200] Temporary skip them since the time usage is more than expected.")
+    pytest.xfail("Skipping due to unexpectedly high execution time on Gaudi2 with bfloat16 and without HPU graphs.")
Suggestion importance[1-10]: 5

__

Why: The suggestion provides a more descriptive reason for skipping the tests, which improves code readability and maintainability.

Low

@xin3he
Copy link
Contributor Author

xin3he commented Oct 11, 2025

@linoybu I'm skipping them here for now to keep our CI process fast.
In my test, this change could save 1h on Gaudi2 with 1.22.0 docker.

@xin3he
Copy link
Contributor Author

xin3he commented Oct 13, 2025

Time usage is reduced to normal
image

@xin3he xin3he merged commit f1f3a90 into master Oct 13, 2025
18 checks passed
@xin3he xin3he deleted the xinhe/fix_ut_time branch October 13, 2025 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants