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

Add option to force generic algorithms on x86 #22917

Merged

Conversation

AlekseiNikiforovIBM
Copy link
Contributor

@AlekseiNikiforovIBM AlekseiNikiforovIBM commented Nov 21, 2024

Option is named onnxruntime_FORCE_GENERIC_ALGORITHMS

Follow up to #22125.

Description

This change adds compile-time option to disable optimized algorithms and use generic algorithms (exclude AVX* and SSE etc in GEMM) on x86. This new option is intended only for testing these algorithms, not for production use.

Following build command on linux x86_64 builds onnxruntime with new option enabled:
./build.sh --parallel --cmake_extra_defines onnxruntime_FORCE_GENERIC_ALGORITHMS=1

Motivation and Context

This change allows testing generic algorithms. This may be needed for platforms which don't have optimized implementations available, like in #22125.

Option is named onnxruntime_FORCE_GENERIC_ALGORITHMS
@AlekseiNikiforovIBM AlekseiNikiforovIBM requested a review from a team as a code owner November 21, 2024 15:28
@AlekseiNikiforovIBM
Copy link
Contributor Author

@tianleiwu @amarin16 , could you please take a look at this PR?

I've implemented this change as was requested in #22125. Sorry, I didn't finish this change before it was merged.

This change allows to build onnxruntime for testing those generic algorithms. If in addition to that #22125 is reverted, test failures mentioned in #22125 could be reproduced.

@tianleiwu
Copy link
Contributor

/azp run Windows ARM64 QNN CI Pipeline,Windows x64 QNN CI Pipeline,Windows CPU CI Pipeline,Windows GPU CUDA CI Pipeline,Windows GPU DML CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows GPU TensorRT CI Pipeline,ONNX Runtime Web CI Pipeline,Linux CPU CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline

@tianleiwu
Copy link
Contributor

/azp run Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,Linux OpenVINO CI Pipeline,Linux QNN CI Pipeline,MacOS CI Pipeline,orttraining-linux-ci-pipeline,orttraining-linux-gpu-ci-pipeline,onnxruntime-binary-size-checks-ci-pipeline,Big Models,Linux Android Emulator QNN CI Pipeline

@tianleiwu
Copy link
Contributor

/azp run Android CI Pipeline,iOS CI Pipeline,ONNX Runtime React Native CI Pipeline,CoreML CI Pipeline,Linux DNNL CI Pipeline,Linux MIGraphX CI Pipeline,Linux ROCm CI Pipeline

Copy link

Azure Pipelines successfully started running 7 pipeline(s).

Copy link

Azure Pipelines successfully started running 8 pipeline(s).

Copy link

Azure Pipelines successfully started running 10 pipeline(s).

@tianleiwu tianleiwu merged commit f6e1d44 into microsoft:main Nov 21, 2024
91 checks passed
mszhanyi pushed a commit that referenced this pull request Nov 22, 2024
Option is named onnxruntime_FORCE_GENERIC_ALGORITHMS

Follow up to #22125.

### Description
This change adds compile-time option to disable optimized algorithms and
use generic algorithms (exclude AVX* and SSE etc in GEMM) on x86. This
new option is intended only for testing these algorithms, not for
production use.

Following build command on linux x86_64 builds onnxruntime with new
option enabled:
`./build.sh --parallel --cmake_extra_defines
onnxruntime_FORCE_GENERIC_ALGORITHMS=1`

### Motivation and Context
This change allows testing generic algorithms. This may be needed for
platforms which don't have optimized implementations available, like in
#22125.
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