training_extensions icon indicating copy to clipboard operation
training_extensions copied to clipboard

Torch freezes Fast API endpoints in Windows

Open warrkan opened this issue 10 months ago • 2 comments

When you run installed Geti Tune application in Windows and makes a request to a backend, calling this method completely freezes Fast API: torch.xpu.is_available It means that single request of SystemService.get_devices makes application non-working. Backend stops serving any incoming requests.

warrkan avatar Jan 30 '26 11:01 warrkan

I can't reproduce in my local Windows environment:

PS C:\Users\laileona\training_extensions\application\backend> uv run python
Python 3.13.11 (main, Jan 27 2026, 23:41:32) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.xpu.is_available()
True

I've also tried with the cpu extra, it also works (no hanging).

I suspect this bug is HW-dependant. @warrkan if you can reproduce the hanging by simply calling torch.xpu.is_available(), I suggest reporting the bug to https://github.com/pytorch/pytorch .

leoll2 avatar Feb 02 '26 08:02 leoll2

This problem constantly reproduces on my environment, but I believe it's specific to my HW. I have Tiger Lake CPU and tried to run XPU build. I was even able to reproduce it in WIndows just by running torch.xpu.is_available(). If I run Geti CPU build, then everything works fine. Closing this issue, since this is a build mismatch.

warrkan avatar Mar 23 '26 14:03 warrkan