Skip to content

Conversation

@edgchen1
Copy link
Contributor

@edgchen1 edgchen1 commented Feb 9, 2021

Description
Add a CI build with type reduction enabled.

Motivation and Context
Test type reduction from a CI build.

@edgchen1 edgchen1 requested a review from a team as a code owner February 9, 2021 19:29
@edgchen1
Copy link
Contributor Author

edgchen1 commented Feb 9, 2021

onnxruntimecentoscpubuild \
/bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_and_run_tests.sh
/bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_and_run_tests.sh \
--build-directory /build \
Copy link
Contributor

@guoyu-wang guoyu-wang Feb 9, 2021

Choose a reason for hiding this comment

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

Nit, can use --build-directory /build/without_type_reduction
Or clear the build at the end of build_minimal_ort_and_run_tests.sh
#Resolved

Copy link
Contributor Author

@edgchen1 edgchen1 Feb 9, 2021

Choose a reason for hiding this comment

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

i can use a more specific build directory, good idea. i think we need to keep this build directory around for the later upload test results step though #Resolved


- task: CmdLine@2
displayName: Build minimal onnxruntime with exceptions enabled and type reduction enabled and run tests
inputs:
Copy link
Contributor

@skottmckay skottmckay Feb 9, 2021

Choose a reason for hiding this comment

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

nit: Might be easier to grok the steps if 'DISABLED' and 'ENABLED' in the displayName values was all caps. #Resolved

onnxruntimecentoscpubuild \
/bin/bash /onnxruntime_src/tools/ci_build/github/linux/ort_minimal/build_minimal_ort_and_run_tests.sh \
--build-directory /build/with_type_reduction \
--reduced-ops-config /home/onnxruntimedev/.test_data/required_ops_and_types.ort_models.config \
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to throw away the build between having type reduction disabled and enabled, or can we just do an incremental build to save time? Not sure if running via docker supports that though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it should be possible to do an incremental build. however, the test report files will have the same name, so need to upload them twice or somehow not overwrite them. one of these reduced minimal build steps takes about 4 minutes, so the time savings would not be huge.
IMO, i'd prefer doing a clean build for simplicity. unless we specifically want to test switching the type reduction on with an existing build directory/repo.


In reply to: 573278739 [](ancestors = 573278739)

# Perform a minimal build with required ops and run ORT minimal build UTs
python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator Ninja \
--build_dir ${BUILD_DIR} --cmake_generator Ninja \
Copy link
Contributor

@skottmckay skottmckay Feb 9, 2021

Choose a reason for hiding this comment

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

Can we add something to echo the size of libonnxruntime.so post-build so that it's captured in the CI output? Will help if we ever need to manually check that a reduced ops + types build is smaller than just a reduced ops build. #Resolved

Copy link
Contributor

@skottmckay skottmckay left a comment

Choose a reason for hiding this comment

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

:shipit:

@snnn
Copy link
Contributor

snnn commented Feb 10, 2021

/azp run Windows CPU CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@edgchen1
Copy link
Contributor Author

/azp run Windows CPU CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@snnn
Copy link
Contributor

snnn commented Feb 10, 2021

/azp run orttraining-win-ci-pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@edgchen1 edgchen1 merged commit e59cb94 into master Feb 10, 2021
@edgchen1 edgchen1 deleted the edgchen1/type_reduction_ci branch February 10, 2021 21:31
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.

5 participants