From 48061f796e5b0263b8597f92504e68c8ae86e433 Mon Sep 17 00:00:00 2001 From: Wenxin Zhang Date: Fri, 11 Aug 2023 00:47:00 +0800 Subject: [PATCH 1/5] update contricution.md Signed-off-by: Wenxin Zhang --- docs/contributions.md | 81 +++++++++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 18 deletions(-) diff --git a/docs/contributions.md b/docs/contributions.md index a854726c622..b8e7c6b544c 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -1,15 +1,31 @@ Contribution Guidelines ======================= -1. [Pull Request Checklist](#pull-request-checklist) -2. [Pull Request Template](#distillation-support-matrix) -3. [Support](#support) -4. [Contributor Covenant Code of Conduct](#contributor-covenant-code-of-conduct) +1. [General](#General) + + 1.1 [Pull Request Checklist](#pull-request-checklist) + + 1.2 [Pull Request Template](#pull-request-template) + + 1.3 [Pull Request Acceptance Criteria](#pull-request-acceptance-criteria) + +2. [CI Introduction](#ci-introduction) + +3. [FAQ](#faq) + +4. [Support](#support) + +5. [Contributor Covenant Code of Conduct](#contributor-covenant-code-of-conduct) + + +## General If you have improvements to Intel® Extension for Transformers, pull requests for [review](https://github.com/intel/intel-extension-for-transformers/pulls). If you are new to Github, view the pull request [How To](https://help.github.com/articles/using-pull-requests/). -## Pull Request Checklist + +### Pull Request Checklist + Before sending your pull requests, follow the information below: @@ -17,30 +33,59 @@ Before sending your pull requests, follow the information below: - Use pylint to check your Python code. - Use flake8 and autopep8 to make Python code clean. -## Pull Request Template +### Pull Request Template +See [PR template](../.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) + +### Pull Request Acceptance Criteria + +(1) At least two approval from reviewers (1 approval from the component [owner](../.github/CODEOWNERS)) -**Type of Change** -feature or bug fix or documentation or validation or others -API changed or not +(2) ALL detected CI checks pass -**Description** -detail description -JIRA ticket: xxx +(3) ALL conversation solved -**Expected Behavior & Potential Risk** -the expected behavior that triggered by this PR -**How has this PR been tested?** -how to reproduce the test (including hardware information) +## CI Introduction + + + +| Test Name | Test Pass Criteria | Checks | +|-------------------------------|-----------------------------------------------|---------------| +| Format Scan | Pylint/Cpplint/bandit/cloc Pass | 4 | +| Spell Check | Check Pass | 1 | +| Copyright Check | Check Pass | 1 | +| DCO | Check Pass | 1 | +| Optimize UT + Coverage | a. No failure, no core dump, no segmentation fault b. No coverage drop| 1 | +| Engine UT + Coverage | a. No failure, no core dump, no segmentation fault b. No coverage drop| 3 | +| Kernel UT | No failure, no core dump, no segmentation fault | 1 | +| Kernel Benchmark | No failure, No performance regresion | 1 | +| Optimize Model Test | a. Quantize success b. Fp32 Benchmark/Throughput/Accuracy success and no regression c. Int8 Benchmark/Throughput/Accuracy success and no regression| 2 | +| Backend Model Test | a. Fp32 inference no regression b. Int8 inference no regression c. C++ API inference no regression| 2 | +| LLM Test | No failure, No performance regresion | 1 | +| CPP Graph Test | No failure, No performance regresion | 1 | + + +## FAQ + + +1. How to add third-party dependency + + If you are using third-party component by: (1) import lib and uses its API (2) static/dynamic linked (3) copy code and modified (4) other uncertain usage, please contact [Maintainers](inc.maintainers@intel.com) to check license compliance before push code to repo. + + +2. How to apply for repo access + + Create a [ticket](https://opensource.intel.com/jira/servicedesk/customer/portal/1/create/29) to join “intel-extension-for-transformers-write” team. + + if you don't have permision to create ticket, please contact [Maintainers](inc.maintainers@intel.com) to apply for help. -**Dependency Change?** -any library dependency introduced or removed ## Support Submit your questions, feature requests, and bug reports to the [GitHub issues](https://github.com/intel/intel-extension-for-transformers/issues) page. You may also reach out to [Maintainers](inc.maintainers@intel.com). + ## Contributor Covenant Code of Conduct This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant Code of Conduct](./CODE_OF_CONDUCT.md). From 7dfbff0909767ec1e13e0f84b68410fc03fa25ea Mon Sep 17 00:00:00 2001 From: Wenxin Zhang Date: Fri, 11 Aug 2023 01:06:58 +0800 Subject: [PATCH 2/5] fix spelling Signed-off-by: Wenxin Zhang --- .github/workflows/script/formatScan/nlp_dict.txt | 8 +++++++- docs/contributions.md | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/script/formatScan/nlp_dict.txt b/.github/workflows/script/formatScan/nlp_dict.txt index 40b782bc4af..62412bfe5f0 100644 --- a/.github/workflows/script/formatScan/nlp_dict.txt +++ b/.github/workflows/script/formatScan/nlp_dict.txt @@ -2256,4 +2256,10 @@ ChatLLAMA ChatMPT LLM MPT -mailto \ No newline at end of file +mailto +CODEOWNERS +Cpplint +DCO +cloc +jira +servicedesk \ No newline at end of file diff --git a/docs/contributions.md b/docs/contributions.md index b8e7c6b544c..4a9b6857f34 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -58,11 +58,11 @@ See [PR template](../.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) | Optimize UT + Coverage | a. No failure, no core dump, no segmentation fault b. No coverage drop| 1 | | Engine UT + Coverage | a. No failure, no core dump, no segmentation fault b. No coverage drop| 3 | | Kernel UT | No failure, no core dump, no segmentation fault | 1 | -| Kernel Benchmark | No failure, No performance regresion | 1 | +| Kernel Benchmark | No failure, No performance regression | 1 | | Optimize Model Test | a. Quantize success b. Fp32 Benchmark/Throughput/Accuracy success and no regression c. Int8 Benchmark/Throughput/Accuracy success and no regression| 2 | | Backend Model Test | a. Fp32 inference no regression b. Int8 inference no regression c. C++ API inference no regression| 2 | -| LLM Test | No failure, No performance regresion | 1 | -| CPP Graph Test | No failure, No performance regresion | 1 | +| LLM Test | No failure, No performance regression | 1 | +| CPP Graph Test | No failure, No performance regression | 1 | ## FAQ @@ -77,7 +77,7 @@ See [PR template](../.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) Create a [ticket](https://opensource.intel.com/jira/servicedesk/customer/portal/1/create/29) to join “intel-extension-for-transformers-write” team. - if you don't have permision to create ticket, please contact [Maintainers](inc.maintainers@intel.com) to apply for help. + if you don't have permission to create ticket, please contact [Maintainers](inc.maintainers@intel.com) to apply for help. ## Support From 403857923df1bed1d750849faf74eac54d3957b8 Mon Sep 17 00:00:00 2001 From: Wenxin Zhang Date: Fri, 11 Aug 2023 09:56:58 +0800 Subject: [PATCH 3/5] add CI and owner Signed-off-by: Wenxin Zhang --- .../pull_request_template.md | 1 - docs/CI_introduction.md | 17 +++++++++++ docs/component_owner.md | 14 +++++++++ docs/contributions.md | 30 +++++-------------- 4 files changed, 38 insertions(+), 24 deletions(-) create mode 100644 docs/CI_introduction.md create mode 100644 docs/component_owner.md diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index c28d1c790c0..4181ee3c288 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -6,7 +6,6 @@ API changed or not ## Description detail description -JIRA ticket: xxx ## Expected Behavior & Potential Risk diff --git a/docs/CI_introduction.md b/docs/CI_introduction.md new file mode 100644 index 00000000000..5f3e686fa84 --- /dev/null +++ b/docs/CI_introduction.md @@ -0,0 +1,17 @@ +# CI Introduction +Intel Extension for Transformers use Github Action (GHA) for CI test, if you are new to GHA, please refer to [GHA](https://docs.github.com/en/actions) +All the test scripts will be maintained under [.github](../.github/workflows). + + + +| Test Name | Test Pass Criteria | Checks | +|-------------------------------|-----------------------------------------------|---------------| +| Format Scan | Pylint/Cpplint/bandit/cloc Pass | 4 | +| Spell Check | Check Pass | 1 | +| Copyright Check | Add License on top of code/scripts | 1 | +| DCO | Use git commit -s to signoff | 1 | +| Unit Test | a. No failure, no core dump, no segmentation fault b. No coverage drop| 5 | +| Kernel Benchmark | No failure, No performance regression | 1 | +| Model Test | a. Fp32/Int8 inference no regression b. API no fucntionality success | 5 | +| CPP Graph Test | No failure, No performance regression | 1 | + diff --git a/docs/component_owner.md b/docs/component_owner.md new file mode 100644 index 00000000000..b1c59f492d3 --- /dev/null +++ b/docs/component_owner.md @@ -0,0 +1,14 @@ +# Module Owner Matrix +Here is the matrix of first/second owners for each component in Intel Extension for Transformers. + +Contributions to Intel Extension for Transformers specific component must get approval from the owners + +| Component | Owner | Backup | +|--------------------|-----------------|-----------------| +| Kernel | Hengyu | Luo yu | +| Engine | Dong bo | Zhenwei | +| Pytorch | Penghui | He xin | +| Tensorflow | Lv liang | Penghui | +| Neuralchat | Lv liang | Kaokao | +| Workflow | Lv liang | Haihao | +| Tests | Wenxin | Xuehao | \ No newline at end of file diff --git a/docs/contributions.md b/docs/contributions.md index 4a9b6857f34..86c1919c43d 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -30,45 +30,29 @@ If you have improvements to Intel® Extension for Transformers, pull requests fo Before sending your pull requests, follow the information below: - Changes are consistent with the Python [Coding Style](https://github.com/google/styleguide/blob/gh-pages/pyguide.md). -- Use pylint to check your Python code. -- Use flake8 and autopep8 to make Python code clean. +- Use pylint to check your Python code, more detail please go to [pylint script](../.github/workflows/script/formatScan/pylint.sh) ### Pull Request Template See [PR template](../.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) ### Pull Request Acceptance Criteria -(1) At least two approval from reviewers (1 approval from the component [owner](../.github/CODEOWNERS)) +(1) At least two approvals from reviewers (1 approval from the component [owner](./component_owner.md)) (2) ALL detected CI checks pass -(3) ALL conversation solved - - -## CI Introduction +(3) ALL conversations solved +(4) Third-party dependency license compliable -| Test Name | Test Pass Criteria | Checks | -|-------------------------------|-----------------------------------------------|---------------| -| Format Scan | Pylint/Cpplint/bandit/cloc Pass | 4 | -| Spell Check | Check Pass | 1 | -| Copyright Check | Check Pass | 1 | -| DCO | Check Pass | 1 | -| Optimize UT + Coverage | a. No failure, no core dump, no segmentation fault b. No coverage drop| 1 | -| Engine UT + Coverage | a. No failure, no core dump, no segmentation fault b. No coverage drop| 3 | -| Kernel UT | No failure, no core dump, no segmentation fault | 1 | -| Kernel Benchmark | No failure, No performance regression | 1 | -| Optimize Model Test | a. Quantize success b. Fp32 Benchmark/Throughput/Accuracy success and no regression c. Int8 Benchmark/Throughput/Accuracy success and no regression| 2 | -| Backend Model Test | a. Fp32 inference no regression b. Int8 inference no regression c. C++ API inference no regression| 2 | -| LLM Test | No failure, No performance regression | 1 | -| CPP Graph Test | No failure, No performance regression | 1 | - +## CI Introduction +See [CI Introduction](./CI_introduction.md) ## FAQ -1. How to add third-party dependency +1. How to check third-party dependency license compliance If you are using third-party component by: (1) import lib and uses its API (2) static/dynamic linked (3) copy code and modified (4) other uncertain usage, please contact [Maintainers](inc.maintainers@intel.com) to check license compliance before push code to repo. From 514a08237e6895cb837c6a063032702deaeec703 Mon Sep 17 00:00:00 2001 From: Wenxin Zhang Date: Fri, 11 Aug 2023 10:45:07 +0800 Subject: [PATCH 4/5] update owner and CI Signed-off-by: Wenxin Zhang --- .../workflows/script/formatScan/nlp_dict.txt | 23 ++++++++++++- docs/CI_introduction.md | 32 +++++++++++++------ docs/component_owner.md | 14 ++++---- docs/contributions.md | 2 +- 4 files changed, 52 insertions(+), 19 deletions(-) diff --git a/.github/workflows/script/formatScan/nlp_dict.txt b/.github/workflows/script/formatScan/nlp_dict.txt index 62412bfe5f0..3f9feca7c43 100644 --- a/.github/workflows/script/formatScan/nlp_dict.txt +++ b/.github/workflows/script/formatScan/nlp_dict.txt @@ -2262,4 +2262,25 @@ Cpplint DCO cloc jira -servicedesk \ No newline at end of file +servicedesk +Bas +GHA +clangformat +dco +gtest +inteltf +jenk +mr +sign off +formatScan +Neuralchat +PenghuiCheng +VincyZhang +XuehaoSun +airMeng +kevinintel +lkk +luoyu +lvliang +xin +zhenwei \ No newline at end of file diff --git a/docs/CI_introduction.md b/docs/CI_introduction.md index 5f3e686fa84..7c815dbc460 100644 --- a/docs/CI_introduction.md +++ b/docs/CI_introduction.md @@ -1,17 +1,29 @@ # CI Introduction Intel Extension for Transformers use Github Action (GHA) for CI test, if you are new to GHA, please refer to [GHA](https://docs.github.com/en/actions) -All the test scripts will be maintained under [.github](../.github/workflows). +Generally We use [Azure Cloud](https://azure.microsoft.com/en-us/pricing/purchase-options/pay-as-you-go) to deploy CI on Es-v5, Bas-v2. -| Test Name | Test Pass Criteria | Checks | + +| Test Name | Test Scope | Test Pass Criteria | |-------------------------------|-----------------------------------------------|---------------| -| Format Scan | Pylint/Cpplint/bandit/cloc Pass | 4 | -| Spell Check | Check Pass | 1 | -| Copyright Check | Add License on top of code/scripts | 1 | -| DCO | Use git commit -s to signoff | 1 | -| Unit Test | a. No failure, no core dump, no segmentation fault b. No coverage drop| 5 | -| Kernel Benchmark | No failure, No performance regression | 1 | -| Model Test | a. Fp32/Int8 inference no regression b. API no fucntionality success | 5 | -| CPP Graph Test | No failure, No performance regression | 1 | +| Format Scan | Pylint/Cpplint/bandit/cloc/clangformat Pass | PASS | +| Spell Check | Spelling Check | PASS | +| Copyright Check | Copyright Check | PASS | +| [DCO](https://github.com/apps/dco/) | Use git commit -s to sign off | PASS | +| Unit Test | pytest + coverage + gtest | PASS(No failure, No core dump, No segmentation fault, No coverage drop) | +| Kernel Benchmark | Benchmark [Details](../intel_extension_for_transformers/backends/neural_engine/test/kernels/benchmark) | PASS(No performance regression) | +| Model Test | Pytorch + Tensorflow + Neural Engine + IPEX + CPP Graph | PASS(FP32/INT8 No performance regression) | + +# FAQ +1. How to add examples + + (1) Still need to pass detected CI tests + + (2) Use [Extension Test](https://inteltf-jenk.sh.intel.com/view/nlp-toolkit-validation/job/nlp-toolkit-validation-top-mr-extension/) to cover new examples. If you do not have permission for extension test, please contact [Maintainers](inc.maintainers@intel.com) + + +2. How to test specific component version + + (1) Use [Extension Test](https://inteltf-jenk.sh.intel.com/view/nlp-toolkit-validation/job/nlp-toolkit-validation-top-mr-extension/) to specify the version. If you do not have permission for extension test, please contact [Maintainers](inc.maintainers@intel.com) diff --git a/docs/component_owner.md b/docs/component_owner.md index b1c59f492d3..def3055c9eb 100644 --- a/docs/component_owner.md +++ b/docs/component_owner.md @@ -5,10 +5,10 @@ Contributions to Intel Extension for Transformers specific component must get ap | Component | Owner | Backup | |--------------------|-----------------|-----------------| -| Kernel | Hengyu | Luo yu | -| Engine | Dong bo | Zhenwei | -| Pytorch | Penghui | He xin | -| Tensorflow | Lv liang | Penghui | -| Neuralchat | Lv liang | Kaokao | -| Workflow | Lv liang | Haihao | -| Tests | Wenxin | Xuehao | \ No newline at end of file +| Kernel | airMeng | luoyu-intel | +| Engine | a32543254 | zhenwei-intel | +| Pytorch | PenghuiCheng | xin3he | +| Tensorflow | lvliang-intel | PenghuiCheng | +| Neuralchat | lvliang-intel | lkk12014402 | +| Workflow | lvliang-intel | kevinintel | +| Tests | VincyZhang | XuehaoSun | \ No newline at end of file diff --git a/docs/contributions.md b/docs/contributions.md index 86c1919c43d..07749243560 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -43,7 +43,7 @@ See [PR template](../.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) (3) ALL conversations solved -(4) Third-party dependency license compliable +(4) Third-party dependency license Compatible ## CI Introduction From c20a7eb5515cc8872763a53a2f416d02c0620aa6 Mon Sep 17 00:00:00 2001 From: hshen14 Date: Fri, 11 Aug 2023 14:16:19 +0800 Subject: [PATCH 5/5] Use the mailto and remove unused info Signed-off-by: hshen14 --- docs/contributions.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/contributions.md b/docs/contributions.md index 07749243560..60a0f507334 100644 --- a/docs/contributions.md +++ b/docs/contributions.md @@ -54,20 +54,13 @@ See [CI Introduction](./CI_introduction.md) 1. How to check third-party dependency license compliance - If you are using third-party component by: (1) import lib and uses its API (2) static/dynamic linked (3) copy code and modified (4) other uncertain usage, please contact [Maintainers](inc.maintainers@intel.com) to check license compliance before push code to repo. - - -2. How to apply for repo access - - Create a [ticket](https://opensource.intel.com/jira/servicedesk/customer/portal/1/create/29) to join “intel-extension-for-transformers-write” team. - - if you don't have permission to create ticket, please contact [Maintainers](inc.maintainers@intel.com) to apply for help. + If you are using third-party component by: (1) import lib and uses its API (2) static/dynamic linked (3) copy code and modified (4) other uncertain usage, please contact [Maintainers](mailto:inc.maintainers@intel.com) to check license compliance before push code to repo. ## Support Submit your questions, feature requests, and bug reports to the -[GitHub issues](https://github.com/intel/intel-extension-for-transformers/issues) page. You may also reach out to [Maintainers](inc.maintainers@intel.com). +[GitHub issues](https://github.com/intel/intel-extension-for-transformers/issues) page. You may also reach out to [Maintainers](mailto:inc.maintainers@intel.com). ## Contributor Covenant Code of Conduct