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

[IPEX] Fix xpu generator #14562

Merged
merged 2 commits into from
Jan 7, 2024

Conversation

Nuullll
Copy link
Contributor

@Nuullll Nuullll commented Jan 6, 2024

Description

  • Checks whether torch.Generator supports xpu device before hijacking. "xpu" is supported starting from torch 2.1 and at the same time torch.xpu.Generator API is removed starting from IPEX 2.1.
  • Properly handles the device arg when it's a str. Fixes issue [Bug]: Can't use IPEX with Token Merging #14434

Screenshots/videos:

Using token merging:
image

txt2img works as expected:
image

Checklist:

@Nuullll Nuullll changed the title Fix ipex xpu generator [IPEX] Fix xpu generator Jan 6, 2024
@zakusworo
Copy link

Hi, i'm succesfully running IPEX 2.1 from your repo here, But, when i'm use Vlad's System Info Benchmark, it's gives error about NaN in benchmark step 3,4,5 (16,32,64 batch i think)

But, when i'm downgrade to IPEX 2.0, it's fine, no error

@Nuullll
Copy link
Contributor Author

Nuullll commented Jan 7, 2024

But, when i'm use Vlad's System Info Benchmark, it's gives error about NaN in benchmark step 3,4,5 (16,32,64 batch i think)

Extensive benchmark tests batch size 1, 2, 4, 8, 16.
I didn't verify IPEX 2.1 much for SD workloads. What I know is that IPEX 2.1 perf is ~20% worse than IPEX 2.0, so I stick to IPEX 2.0 as well for now.

@zakusworo
Copy link

But, when i'm use Vlad's System Info Benchmark, it's gives error about NaN in benchmark step 3,4,5 (16,32,64 batch i think)

Extensive benchmark tests batch size 1, 2, 4, 8, 16. I didn't verify IPEX 2.1 much for SD workloads. What I know is that IPEX 2.1 perf is ~20% worse than IPEX 2.0, so I stick to IPEX 2.0 as well for now.

oh, okay. IPEX 2.0 is fine. with your IPEX extension, my A770 can pass 20 it/s on benchmark.

the only thing i concern about IPEX 2.1 (with torch 2.1 ofc), is to be able use FP8 Weight Storage form memory management. but it's still broken for IPEX 2.1, with "torch not compiled with CUDA" error.

@AUTOMATIC1111 AUTOMATIC1111 merged commit 71e0057 into AUTOMATIC1111:dev Jan 7, 2024
3 checks passed
@w-e-w w-e-w mentioned this pull request Feb 17, 2024
@pawel665j pawel665j mentioned this pull request Apr 16, 2024
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

Successfully merging this pull request may close these issues.

3 participants