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

Python tests are failing in Windows build #4040

Open
sahas3 opened this issue Feb 23, 2025 · 0 comments
Open

Python tests are failing in Windows build #4040

sahas3 opened this issue Feb 23, 2025 · 0 comments

Comments

@sahas3
Copy link
Member

sahas3 commented Feb 23, 2025

There are two types of failures when running the python based tests on Windows:

  1. End-to-end execution tests are failing due to the signal.SIGALRM (used for timeout handling in the following piece of testing code) is not available for Windows

    class timeout:
    def __init__(self, seconds=1, error_message="Timeout"):
    self.seconds = seconds
    self.error_message = error_message
    def handle_timeout(self, signum, frame):
    raise TimeoutError(self.error_message)
    def __enter__(self):
    signal.signal(signal.SIGALRM, self.handle_timeout)
    signal.alarm(self.seconds)
    def __exit__(self, type, value, traceback):
    signal.alarm(0)

    One possible solution is to use the https://pypi.org/project/pytest-timeout/ plugin with pytest which offers portability across different platforms.

  2. Python API unit tests using LLVM's lit testing framework are failing due to pwd module not being available in Windows. This failure is a bit puzzling as it seems to be triggered from fx.export_and_import as seen in the logs, but running the file from CLI directly such as python test\python\fx_importer\v2.3\types_test.py doesn't produce any error.

sahas3 added a commit that referenced this issue Mar 9, 2025
1. Adds a workflow to trigger windows build in the CI similar to the
existing one for Linux to address the build CI request captured in
#3985
2. Only non-python based LIT unit tests are enabled in the workflow due
to failures reported in #4040
3. The CI is only run against `torch-nightly` since python based tests
are disabled. My understanding is that without the python based tests
there's no need to run against the `stable` version too. If that's not
the case, will enable `stable` as well. Tested that both `nightly` and
`stable` versions work fine:
https://github.com/sahas3/torch-mlir/actions/runs/13477124004
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

No branches or pull requests

1 participant