Skip to content

[CI Optimization]: Optimize Jenkins Pipeline for Efficient Resource Utilization #391

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 67 additions & 61 deletions scripts/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,70 +85,76 @@ pipeline {
}
}
}
stage('CLI Tests') {
steps {
timeout(time: 60, unit: 'MINUTES') {
sh '''
sudo docker exec ${BUILD_TAG} bash -c "
source /qnn_sdk/bin/envsetup.sh &&
source /qnn_sdk/bin/envcheck -c &&
cd /efficient-transformers &&
. preflight_qeff/bin/activate &&
mkdir -p $PWD/cli &&
export TOKENIZERS_PARALLELISM=false &&
export QEFF_HOME=$PWD/cli &&
pytest tests -m '(cli and not qnn)' --ignore tests/vllm --junitxml=tests/tests_log3.xml &&
junitparser merge tests/tests_log3.xml tests/tests_log.xml &&
deactivate"
'''
}
}
}
stage('vLLM Tests') {
stage('CLI and Vllm Tests'){
parallel {
stage('CLI Tests') {
steps {
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed yesterday we need to avoid parallelism for CLI and VLLM Test.

Also we discussed to have 4 jenkin jobs corresponding to each PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I am working on it.

timeout(time: 60, unit: 'MINUTES') {
sh '''
sudo docker exec ${BUILD_TAG} bash -c "
cd /efficient-transformers &&
. preflight_qeff/bin/activate &&
mkdir -p $PWD/cli &&
export TOKENIZERS_PARALLELISM=false &&
export QEFF_HOME=$PWD/cli &&
pytest tests -m '(cli and not qnn)' --ignore tests/vllm -n 1 --junitxml=tests/tests_log3.xml &&
junitparser merge tests/tests_log3.xml tests/tests_log.xml &&
deactivate"
'''
}
}
}
stage('vLLM Tests') {

steps
{
build job: 'qefficient_vllm_upstream',
parameters: [string(name: 'NAME', value: "${BUILD_TAG}")],
propagate: true,
wait: true
}
}
stage('QNN CLI Tests') {
steps {
timeout(time: 30, unit: 'MINUTES') {
sh '''
sudo docker exec ${BUILD_TAG} bash -c "
source /qnn_sdk/bin/envsetup.sh &&
source /qnn_sdk/bin/envcheck -c &&
cd /efficient-transformers &&
. preflight_qeff/bin/activate &&
mkdir -p $PWD/Qnn_cli &&
export TOKENIZERS_PARALLELISM=false &&
export QEFF_HOME=$PWD/Qnn_cli &&
pytest tests -m '(cli and qnn)' --ignore tests/vllm --junitxml=tests/tests_log4.xml &&
junitparser merge tests/tests_log4.xml tests/tests_log.xml &&
deactivate"
'''
}
steps
{
build job: 'qefficient_vllm_upstream',
parameters: [string(name: 'NAME', value: "${BUILD_TAG}")],
propagate: true,
wait: true
}
}
}
}
stage('QNN Non-CLI Tests') {
steps {
timeout(time: 200, unit: 'MINUTES') {
sh '''
sudo docker exec ${BUILD_TAG} bash -c "
source /qnn_sdk/bin/envsetup.sh &&
source /qnn_sdk/bin/envcheck -c &&
cd /efficient-transformers &&
. preflight_qeff/bin/activate &&
mkdir -p $PWD/Qnn_non_cli &&
export TOKENIZERS_PARALLELISM=false &&
export QEFF_HOME=$PWD/Qnn_non_cli &&
pytest tests -m '(not cli) and (qnn) and (on_qaic)' --ignore tests/vllm --junitxml=tests/tests_log5.xml &&
junitparser merge tests/tests_log5.xml tests/tests_log.xml &&
deactivate"
'''
stage('QNN Tests'){
parallel {
stage('QNN CLI Tests') {
steps {
timeout(time: 30, unit: 'MINUTES') {
sh '''
sudo docker exec ${BUILD_TAG} bash -c "
source /qnn_sdk/bin/envsetup.sh &&
source /qnn_sdk/bin/envcheck -c &&
cd /efficient-transformers &&
. preflight_qeff/bin/activate &&
mkdir -p $PWD/Qnn_cli &&
export TOKENIZERS_PARALLELISM=false &&
export QEFF_HOME=$PWD/Qnn_cli &&
pytest tests -m '(cli and qnn)' --ignore tests/vllm --junitxml=tests/tests_log4.xml &&
junitparser merge tests/tests_log4.xml tests/tests_log.xml &&
deactivate"
'''
}
}
}
stage('QNN Non-CLI Tests') {
steps {
timeout(time: 200, unit: 'MINUTES') {
sh '''
sudo docker exec ${BUILD_TAG} bash -c "
source /qnn_sdk/bin/envsetup.sh &&
source /qnn_sdk/bin/envcheck -c &&
cd /efficient-transformers &&
. preflight_qeff/bin/activate &&
mkdir -p $PWD/Qnn_non_cli &&
export TOKENIZERS_PARALLELISM=false &&
export QEFF_HOME=$PWD/Qnn_non_cli &&
pytest tests -m '(not cli) and (qnn) and (on_qaic)' --ignore tests/vllm --junitxml=tests/tests_log5.xml &&
junitparser merge tests/tests_log5.xml tests/tests_log.xml &&
deactivate"
'''
}
}
}
}
}
Expand Down
Loading