Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LNL Windows python error Illegal instruction #1173

Open
daisyden opened this issue Dec 17, 2024 · 1 comment
Open

LNL Windows python error Illegal instruction #1173

daisyden opened this issue Dec 17, 2024 · 1 comment
Assignees
Labels

Comments

@daisyden
Copy link
Contributor

daisyden commented Dec 17, 2024

🐛 Describe the bug

The error caused fatal error in extended UT when run test_ops_xpu.py::TestCommonXPU::test_compare_cpu_grid_sampler_2d_xpu_float64

Current thread 0x00003b20 (most recent call first):
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\opinfo\core.py", line 1177 in __call__
  File "C:\pt26_ww48\pytorch\third_party\torch-xpu-ops\test\xpu\../../../../test\test_ops.py", line 398 in test_compare_cpu
  File "C:\pt26_ww48\pytorch\third_party\torch-xpu-ops\test\xpu\extended\test_ops_xpu.py", line 97 in test_compare_cpu
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_utils.py", line 2213 in wrapper
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_utils.py", line 2241 in wrapper
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_device_type.py", line 1409 in only_fn
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_device_type.py", line 1162 in test_wrapper
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_utils.py", line 1612 in wrapper
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_device_type.py", line 460 in instantiated_test
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_utils.py", line 3099 in wrapper
  File "C:\Users\sdp\AppData\Local\Programs\Python\Python310\lib\unittest\case.py", line 549 in _callTestMethod
  File "C:\Users\sdp\AppData\Local\Programs\Python\Python310\lib\unittest\case.py", line 591 in run
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_utils.py", line 3206 in _run_custom
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_utils.py", line 3234 in run
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\torch\testing\_internal\common_device_type.py", line 551 in run
  File "C:\Users\sdp\AppData\Local\Programs\Python\Python310\lib\unittest\case.py", line 650 in __call__
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\unittest.py", line 351 in runtest
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\runner.py", line 174 in pytest_runtest_call
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_callers.py", line 103 in _multicall
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_hooks.py", line 513 in __call__
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\runner.py", line 242 in <lambda>
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\runner.py", line 341 in from_call
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\runner.py", line 241 in call_and_report
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\runner.py", line 132 in runtestprotocol
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\runner.py", line 113 in pytest_runtest_protocol
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_callers.py", line 103 in _multicall
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_hooks.py", line 513 in __call__
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\main.py", line 362 in pytest_runtestloop
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_callers.py", line 103 in _multicall
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_hooks.py", line 513 in __call__
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\main.py", line 337 in _main
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\main.py", line 283 in wrap_session
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\main.py", line 330 in pytest_cmdline_main
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_callers.py", line 103 in _multicall
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\pluggy\_hooks.py", line 513 in __call__
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\config\__init__.py", line 175 in main
  File "C:\Users\sdp\pt26_ww48_virtual_env\lib\site-packages\_pytest\config\__init__.py", line 201 in console_main
  File "C:\Users\sdp\pt26_ww48_virtual_env\Scripts\pytest.exe\__main__.py", line 7 in <module>
  File "C:\Users\sdp\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86 in _run_code
  File "C:\Users\sdp\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196 in _run_module_as_main
Fatal Python error: Illegal instruction
  • Analysis:

• The error is reported when run torch cpu. It can be reproduced with the below small case. It only fails when run the code with pytest and with dtype float64. Run the code directly it can pass. I tried different pytest versions and it all have such issue.
• With XPU package 20241202 and nightly build both have this issue. However, with torch cpu package it can work.

import torch
class TestClass:
    def test_grid_sampler_2d(self):
        torch.manual_seed(0)
        b = torch.rand(2, 13, 10, 2, dtype=torch.float64)
        a = torch.rand(2, 3, 5, 20, dtype=torch.float64)
        torch.grid_sampler_2d(a, b, interpolation_mode=0, padding_mode=0, align_corners=False)

Versions

Machine: LNL windows 11
PyTorch version: https://github.com/pytorch/pytorch/tree/90b7dcf2c5ee13b892701822f2abbc0e64f5584d
Install command: pip install --pre torch==2.6.0.dev20241202+xpu torchvision==0.20.0.dev20241202+xpu torchaudio==2.5.0.dev20241202+xpu --index-url https://download.pytorch.org/whl/nightly/xpu
torch-xpu-ops commit: bf4bab1

@xuhancn
Copy link

xuhancn commented Jan 9, 2025

Please assign to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants