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

Neural Coder use INC API by default instead of Optimum #518

Merged
merged 5 commits into from
Feb 7, 2023

Conversation

kaikaiyao
Copy link
Contributor

@kaikaiyao kaikaiyao commented Feb 6, 2023

Type of Change

change logic of which default API design to be enabled

Description

  1. a change of default adopted optimization API's logic:
  • Old logic:
    -- Default all use Optimum API for launchers, no matter INC launcher or Optimum launcher
  • New logic:
    -- If user use INC launcher, then default API is INC API.
    -- If user use Optimum launcher, then default API is Optimum API.

Optimum side's modification is in this PR

  1. also refined some backend yamls

  2. also added pre-requisite in Python Launcher example

How has this PR been tested?

locally

Dependency Change?

no

@kaikaiyao kaikaiyao marked this pull request as draft February 6, 2023 06:43
@kaikaiyao kaikaiyao self-assigned this Feb 7, 2023
@kaikaiyao kaikaiyao marked this pull request as ready for review February 7, 2023 07:25
@kaikaiyao
Copy link
Contributor Author

@chensuyue hi, modification is done: in the future INC launcher will enable INC API, Optimum launcher will enable Optimum API. Optimum PR is huggingface/optimum-intel#183


Pre-requisites:
```bash
pip install transformers==4.21.0 torch datasets
Copy link
Contributor

Choose a reason for hiding this comment

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

How about adding pip install neural-compressor ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

[+] from torch.backends.quantized import engine; engine = 'onednn'
[+] from neural_compressor.conf.config import QuantConf
[+] from neural_compressor.experimental import Quantization, common
[+] quant_config = QuantConf()
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems it's still using 1.x API, when will Neural Coder migrate into 2.0 API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know about the high-level plan, from technical perspective, if INC 2.0 API is ready, then migration is doable at any time

@chensuyue
Copy link
Contributor

Local test pass, will merge first, please check the comments.

@chensuyue chensuyue merged commit 3851227 into master Feb 7, 2023
@chensuyue chensuyue deleted the neural_coder_use_inc_by_default branch February 7, 2023 09:29
VincyZhang pushed a commit that referenced this pull request Feb 12, 2023
* update version in all html

* fix figure path and cp readme to welcome as default page

* fix path

* fix path in welcome

* fix table format

* fix table format

* fix table format

* fix table format

* fix table format

* fix path in welcome

* fix doc path in readme

* fix doc path in readme

* fix path in welcome

* fix path in welcome

* fix link for doc

* mv build_docs to docs, restore README.md

* including other docs

* add 2 product

* update structure

* add title

* add build args

* fix error

* fix error

* fix path

* add help, skip remove env

* fix error

* fix error

* add arg

* fix versons.html path, support local build

---------

Co-authored-by: ZhangJianyu <[email protected]>
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