intel / intel-extension-for-pytorch

A Python package for extending the official PyTorch that can easily obtain performance on Intel platform
Apache License 2.0
1.54k stars 234 forks source link

Compilation Intel Extension For PyTorch with specific AOT device enabled didn't reduce AOT for first pass tensor to model. #659

Closed MaksimDanilov closed 1 month ago

MaksimDanilov commented 2 months ago

Describe the issue

I tried to resolve this problem Native API failed. Native API returns: -2 (PI_ERROR_DEVICE_NOT_AVAILABLE) -2 (PI_ERROR_DEVICE_NOT_AVAILABLE) by compiling an extension with AOT=dg1 'cause my display driver is Intel Iris Xe Graphics.
I used compile_bundle.bat script as recommended on installation page. Everything builded fine except large compiling time (around 14-15 hours) and some warnings before starting making fat binary (see 2d screenshot).
However, when I tried to run for loop with my model, first pass was taking too long. How can I find if I compiled the extension correctly or maybe I did it in wrong way?

Screenshot 2024-06-17 095831

telegram-cloud-photo-size-2-5440399181257757871-y

YuningQiu commented 2 months ago

Hello, thanks for raising this issue. We will look into this issue and get back to you soon.

MaksimDanilov commented 2 months ago

I can upload dll if it helps you.

YuningQiu commented 2 months ago

I can upload dll if it helps you.

Sure, that would be great. Also, could you please share your CPU information?

MaksimDanilov commented 2 months ago

Screenshot 2024-06-18 105959

https://disk.yandex.ru/d/CGKZ28FpphDncA

YuningQiu commented 2 months ago

Hello, the long compiling time can be caused by either the limitation of the iGPU, or the AOT setting. We will look into this issue and get back to you once we have updates. Thanks for your patience!

YuningQiu commented 1 month ago

Hello, currently only Intel® Data Center GPU Flex series, Max series and Intel® Arc™ A770 Graphics are supported with AOT setting options. You can find more details here https://intel.github.io/intel-extension-for-pytorch/xpu/2.1.30%2Bxpu/tutorials/technical_details/AOT.html. Hope this can be helpful to your case.

MaksimDanilov commented 1 month ago

@YuningQiu, Hello. I read it and my hope was that it's not a strict option, cause article in the end has link to compile for another device type. It seems this thread must be closed now :-(

YuningQiu commented 1 month ago

Thanks for your response. Please feel free to create new ticket if you encountered other issues.