Skip to content

Improve the implementation of Manual Cast and IPEX support#14597

Merged
AUTOMATIC1111 merged 7 commits intodevfrom
improved-manual-cast
Jan 9, 2024
Merged

Improve the implementation of Manual Cast and IPEX support#14597
AUTOMATIC1111 merged 7 commits intodevfrom
improved-manual-cast

Conversation

@KohakuBlueleaf
Copy link
Copy Markdown
Collaborator

Description

  • Improved the efficiency of manual cast with type checking.
  • Apply the behavior of precision=full into manual cast
    • Also ensure fp8 can be used with precision=full on autocastable devices.
      (With manual cast, which is as fast as autocast + output upcast. I just chose the simples one)
  • Use float32 for MHA layer in ipex since some computation in it is not good for IPEX devices.
  • Have checked this implementation can be used on NV Cuda/Apple M/Intel ARC. With latest ipex, Arc A770 can use manual cast with fp8 features.
  • Manual Cast on A770 is now faster then autocast('xpu'), even with ipex.optimize.

Checklist:

@AUTOMATIC1111 AUTOMATIC1111 merged commit 905b142 into dev Jan 9, 2024
@AUTOMATIC1111 AUTOMATIC1111 deleted the improved-manual-cast branch January 9, 2024 16:33
@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.

2 participants