Closed garrett361 closed 4 months ago
Hi @garrett361, I will try to reproduce the issue and get back to you.
Hi @hueyline have you been able to reproduce this?
Hi @garrett361 , thank you for reporting this, I can reproduce the inconsistency and I have report it to dev team and they will fix it!
WIP...
Hi @garrett361 , we verified that it is a corner case with 2024.1 SYCL runtime. It uses ‘time.sleep(1)’ which triggers this issue. If it is a normal aten operator, it will work as expected. There is alternative solution for measuring elapsed time, such as using time.time(). In IPEX 2.3, the API event.elapsed_time is not supported, as we have dependency to SYCL runtime in 2025.0.
Hi @ZhaoqiongZ, thank you for the response.
The example above uses time.sleep
for clarity, but I originally found this issue when trying to time normal torch
operations. But you're saying it should work in that case? I will try to reproduce my original issue.
In IPEX 2.3, the API event.elapsed_time is not supported, as we have dependency to SYCL runtime in 2025.0.
All of my use cases are xpu
. What's the status of Event.elapsed_time
in 2.1.30+xpu?
verified that it is a corner case with 2024.1 SYCL runtime
I would like to understand the root cause better. Could you please expand upon the issue? I would like to know what types of issues are affected in general. Thank you!
Hi @garrett361 , for original case, it works only in 2.1.30+xpu with the proper driver 803, and for the version you use, it seems before 21.30 and previous driver, it will output the random wrong time. So please use 2.1.30 to check the original xpu operation time in your case.
Seems to be working in 2.1.30+xpu with the correct driver. Closing.
Describe the bug
Hi, I am trying to time
xpu
operations usingxpu.Event
analogously to howcuda.Event
is used and getting unexpected results. Isxpu.Event
supported? I didn't see this behavior reported elsewhere.The following script times multiple one-second chunks and prints out the results:
On CUDA this works fine:
But on
xpu
:The specific results on
xpu
also vary widely. Running the same script a few more times converges to outputs which more typically look like:Versions
Results of
collect_env.py
:aand some
xpu-smi discovery
printout: