Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into penghuic/woq_loading_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PenghuiCheng authored Jun 20, 2024
2 parents c973693 + 9a5a578 commit 042e086
Show file tree
Hide file tree
Showing 34 changed files with 92 additions and 54 deletions.
7 changes: 0 additions & 7 deletions .github/checkgroup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ subprojects:
- "optimize-unit-test-PR-test"
- "Genreate-OptimizeUT-Report"

- id: "Neural Speed Unit Test workflow"
paths:
- .github/workflows/unit-test-neuralspeed.yml
- ".github/workflows/script/unitTest/run_unit_test_neuraspeed.sh"
checks:
- "neural-speed-unit-test"

- id: "NeuralChat Unit Test"
paths:
- ".github/workflows/unit-test-neuralchat.yml"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/Scaner_BDBA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Scanner BDBA
on:
workflow_dispatch:

permissions: write-all
jobs:
bdba_job:
name: BDBA Scan
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/Scaner_Coverity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Scanner Coverity PYTHON
on:
workflow_dispatch:

permissions: write-all
jobs:
coverity_job:
name: Coverity
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/Scaner_Trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Trivy Scan for Containers

on:
workflow_dispatch:
permissions: write-all
jobs:
trivy_container_job:
uses: "intel-innersource/frameworks.ai.infrastructure.code-scan-tools/.github/workflows/Scanner_Trivy.yml@one-ci-cd"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
workflow_dispatch: # Can be manually executed
schedule: # 1/week Sunday at 07:00AM
- cron: "5 7 * * 0"
permissions: write-all
jobs:
build:
container: # MLOps Dev container for Compose Automation
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/chatbot-finetune-mpt-7b-chat-hpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-ft-mpt-7b-hpu
cancel-in-progress: true
permissions: write-all
jobs:
finetuning:
name: finetuning test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/chatbot-finetune-mpt-7b-chat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-ft-mpt-7b
cancel-in-progress: true
permissions: write-all
jobs:
finetuning:
name: finetuning test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/chatbot-inference-llama-2-7b-chat-hf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-inf-lla-7b
cancel-in-progress: true
permissions: write-all
jobs:
inference:
name: inference test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-inf-lla-7b-hpu
cancel-in-progress: true
permissions: write-all
jobs:
inference:
name: inference test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/chatbot-inference-mpt-7b-chat-hpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-inf-mpt-7b-hpu
cancel-in-progress: true
permissions: write-all
jobs:
inference:
name: inference test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/chatbot-inference-mpt-7b-chat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-inf-mpt-7b
cancel-in-progress: true
permissions: write-all
jobs:
inference:
name: inference test
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/chatbot-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ on:
- '!intel_extension_for_transformers/neural_chat/README.md'

workflow_dispatch:
permissions: write-all
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/chatbot_finetuning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: write-all
jobs:
call-finetune-mpt-7b-chat:
uses: ./.github/workflows/chatbot-finetune-mpt-7b-chat.yml
1 change: 0 additions & 1 deletion .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: write-all
env:
OUT_SCRIPT_PATH: ${{ github.workspace }}/.github/workflows/script/models
SCRIPT_PATH: /intel-extension-for-transformers/.github/workflows/script
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/format_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- .github/workflows/format_scan.yml
- .github/workflows/script/formatScan/**
workflow_dispatch:
permissions: write-all
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/llm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
- "!intel_extension_for_transformers/transformers/runtime/third_party/**"
- "!intel_extension_for_transformers/transformers/runtime/docs/**"
workflow_dispatch:
permissions: write-all
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -50,6 +49,7 @@ jobs:
- name: Binary build
run: |
cd ${{ github.workspace }}
source ~/.bashrc
conda activate llm-test || source activate llm-test
compiler_version=11.1.0
conda install --update-deps -c conda-forge gxx==${compiler_version} gcc==${compiler_version} gxx_linux-64==${compiler_version} libstdcxx-ng sysroot_linux-64 libxcrypt -y
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/optimize-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: write-all
env:
OUT_SCRIPT_PATH: ${{ github.workspace }}/.github/workflows/script/models
SCRIPT_PATH: /intel-extension-for-transformers/.github/workflows/script
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
workflow_dispatch:
permissions: write-all
jobs:
build:

Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.

name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '25 5 * * 5'
push:
branches: [ "main" ]

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecard on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}

# Public repositories:
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories:
# - `publish_results` will always be set to `false`, regardless
# of the value entered here.
publish_results: true

# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/script/launch_llm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function main() {
fi

# init conda
#. $(dirname ${CONDA_EXE})/../etc/profile.d/conda.sh
source ~/.bashrc
conda activate $conda_env || source activate $conda_env

# env
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/script/models/run_llm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,16 @@ main() {
}

function prepare() {
[[ -d ${HOME}/anaconda3/bin ]] && export PATH=${HOME}/anaconda3/bin/:$PATH
[[ -d ${HOME}/miniconda3/bin ]] && export PATH=${HOME}/miniconda3/bin/:$PATH
export LD_LIBRARY_PATH=/lib64/libcrypto.so.1.1:${HOME}/miniconda3/envs/${conda_env_name}/lib/:$LD_LIBRARY_PATH
source ~/.bashrc
source activate ${conda_env_name} || conda activate ${conda_env_name}
export LD_LIBRARY_PATH=/lib64/libcrypto.so.1.1:${CONDA_PREFIX}/lib/:$LD_LIBRARY_PATH
if [[ ${precision} == "fp8" ]]; then
export NE_WEIGHT_FP8_4E3M=1
fi
if [[ ${model} == "gpt-j-6b" ]]|| [[ model == "gpt-j-6b-pruned" ]]; then
working_dir="${WORKING_DIR}/examples/huggingface/pytorch/text-generation/deployment"
fi
$BOLD_YELLOW && echo "Running ---- ${framework}, ${model}----Prepare"
source activate ${conda_env_name} || conda activate ${conda_env_name}
if [[ ${cpu} == *"spr"* ]] || [[ ${cpu} == *"SPR"* ]] || [[ ${cpu} == *"Spr"* ]]; then
export CC=/opt/rh/gcc-toolset-11/root/usr/bin/gcc
export CXX=/opt/rh/gcc-toolset-11/root/usr/bin/g++
Expand All @@ -56,8 +55,7 @@ function prepare() {
echo "Working in ${working_dir}"
echo -e "\nInstalling model requirements..."
export PATH=/lib64/libcrypto.so.1.1:$PATH
cp /lib64/libcrypto.so.1.1 ${HOME}/miniconda3/envs/${conda_env_name}/lib/libcrypto.so.1.1
cp /lib64/libcrypto.so.1.1 ${HOME}/miniconda3/lib/libcrypto.so.1.1
cp /lib64/libcrypto.so.1.1 ${CONDA_PREFIX}/lib/libcrypto.so.1.1
if [ -f "requirements.txt" ]; then
sed -i '/^transformers/d' requirements.txt
n=0
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/script/prepare_env_with_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ if [[ -z "${conda_env_name}" ]] || [[ -z "${python_version}" ]]; then
exit 1
fi

source ~/.bashrc
conda create -n ${conda_env_name} python=${python_version} -y
source activate ${conda_env_name} || conda activate ${conda_env_name}
#pip install -U pip
#
#if [ -f "requirements.txt" ]; then
# python -m pip install --default-timeout=100 -r requirements.txt
# pip list
#else
# echo "Not found requirements.txt file."
#fi
1 change: 0 additions & 1 deletion .github/workflows/sparse_lib_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: write-all

env:
DOCKER_CONFIG_NAME: "commonDockerConfig"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/trellix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Trellix Command Line Scanner
on:
workflow_dispatch:

permissions: write-all
jobs:
Trellix:
runs-on: inner-source
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/unit-test-engine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
- "!intel_extension_for_transformers/transformers/runtime/third_party/**"
- "!intel_extension_for_transformers/transformers/runtime/docs/**"
workflow_dispatch:
permissions: write-all
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/unit-test-kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: write-all
env:
DOCKER_CONFIG_NAME: "commonDockerConfig"
REPO_NAME: "intel-extension-for-transformers"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/unit-test-neuralchat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: write-all
env:
DOCKER_CONFIG_NAME: "commonDockerConfig"
REPO_NAME: "intel-extension-for-transformers"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/unit-test-neuralspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: write-all
env:
DOCKER_CONFIG_NAME: "commonDockerConfig"
REPO_NAME: "intel-extension-for-transformers"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/unit-test-optimize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: write-all
env:
DOCKER_CONFIG_NAME: "commonDockerConfig"
REPO_NAME: "intel-extension-for-transformers"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
- "!intel_extension_for_transformers/transformers/runtime/test/**"
- "!intel_extension_for_transformers/qbits/qbits_ut/**"
workflow_dispatch:
permissions: write-all
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
OpenSSF Badge
===============

## [OpenSSF Badge](https://www.bestpractices.dev/en/projects/9128)

Security Policy
===============

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pip install -r requirements.txt

```
cd ptq
bash run_tuning.sh --topology=[topology]
bash run_tuning.sh --topology=[topology]
```

* To benchmark the int8 model
Expand All @@ -52,12 +52,12 @@ bash run_benchmark.sh --topology=[topology] --mode=benchmark --int8=true

```
cd ptq
bash run_tuning.sh --topology=[topology]
bash run_tuning.sh --topology=[topology]
```

* To benchmark the int8 model

```
cd ptq
bash run_benchmark.sh --topology=[topology] --mode=benchmark --int8=true
```
```
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
py-cpuinfo
setuptools>=65
setuptools==69.5.1
setuptools_scm[toml]>=6.2
Loading

0 comments on commit 042e086

Please sign in to comment.