Skip to content

[IPEX] Fix xpu generator#14562

Merged
AUTOMATIC1111 merged 2 commits intoAUTOMATIC1111:devfrom
Nuullll:fix-ipex-xpu-generator
Jan 7, 2024
Merged

[IPEX] Fix xpu generator#14562
AUTOMATIC1111 merged 2 commits intoAUTOMATIC1111:devfrom
Nuullll:fix-ipex-xpu-generator

Conversation

@Nuullll
Copy link
Copy Markdown
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 requested a review from AUTOMATIC1111 as a code owner January 6, 2024 11:18
@Nuullll Nuullll changed the title Fix ipex xpu generator [IPEX] Fix xpu generator Jan 6, 2024
@zakusworo
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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
@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