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 Duplicate importer V2 #11310

Merged
merged 10 commits into from
Jun 19, 2024
Merged

Conversation

qiyuangong
Copy link
Contributor

Description

  • Replace importer after importing ipex, then revert it back before converting model.
  • Simply check to improve performance.

1. Why the change?

2. User API changes

3. Summary of the change

4. How to test?

  • N/A
  • Unit test
  • Application test
  • Document test
  • ...

5. New dependencies

  • New Python dependencies
    - Dependency1
    - Dependency2
    - ...
  • New Java/Scala dependencies and their license
    - Dependency1 and license1
    - Dependency2 and license2
    - ...

@qiyuangong qiyuangong marked this pull request as draft June 13, 2024 10:05
@qiyuangong qiyuangong changed the title [WIP] IPEX Duplicate importer V2 IPEX Duplicate importer V2 Jun 17, 2024
@qiyuangong qiyuangong marked this pull request as ready for review June 17, 2024 05:44
@Oscilloscope98 Oscilloscope98 force-pushed the duplicatev2 branch 2 times, most recently from 4567430 to c2fac5d Compare June 18, 2024 01:59
@qiyuangong
Copy link
Contributor Author

Add calling package to avoid error when using intel_extension_for_deepspeed, e.g.,

from intel_extension_for_deepspeed import XPU_Accelerator

Or

import deepspeed

@qiyuangong
Copy link
Contributor Author

qiyuangong commented Jun 19, 2024

@jason-dai added a control env IPEX_DUPLICATE_CHECKER, default is true. We can turn it off with IPEX_DUPLICATE_CHECKER=0

import inspect
from ipex_llm.utils.common import log4Error


# Default is True, set to False to disable IPEX duplicate checker
IPEX_DUPLICATE_CHECKER = os.getenv("IPEX_DUPLICATE_CHECKER", 'True').lower() in ('true', '1', 't')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to BIGDL_CHECK_DUPLICATE_IMPORT

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@qiyuangong
Copy link
Contributor Author

Failed unit tests are not related to this PR

@qiyuangong qiyuangong merged commit 1eb884a into intel-analytics:main Jun 19, 2024
17 of 18 checks passed
@qiyuangong qiyuangong deleted the duplicatev2 branch June 19, 2024 08:29
RyuKosei pushed a commit to RyuKosei/ipex-llm that referenced this pull request Jul 19, 2024
* Add gguf support.
* Avoid error when import ipex-llm for multiple times.
* Add check to avoid duplicate replace and revert.
* Add calling from check to avoid raising exceptions in the submodule.
* Add BIGDL_CHECK_DUPLICATE_IMPORT for controlling duplicate checker. Default is true.
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