cmake: add XLA source fallback for EIGEN_ASYNC - #5562
Open
cfRod wants to merge 1 commit into
Open
Conversation
dzarukin
approved these changes
Jul 10, 2026
|
|
||
| For example: | ||
| ~~~sh | ||
| $ cmake -DONEDNN_CPU_RUNTIME=THREADPOOL -D_ONEDNN_TEST_THREADPOOL_IMPL=EIGEN -DCMAKE_PREFIX_PATH="/path/to/eigen/share/eigen3/cmake;/path/to/absl/lib64/cmake" .. |
Contributor
There was a problem hiding this comment.
Please update this one, too.
Suggested change
| $ cmake -DONEDNN_CPU_RUNTIME=THREADPOOL -D_ONEDNN_TEST_THREADPOOL_IMPL=EIGEN -DCMAKE_PREFIX_PATH="/path/to/eigen/share/eigen3/cmake;/path/to/absl/lib64/cmake" .. | |
| $ cmake -DONEDNN_CPU_RUNTIME=THREADPOOL -D_DNNL_TEST_THREADPOOL_IMPL=EIGEN -DCMAKE_PREFIX_PATH="/path/to/eigen/share/eigen3/cmake;/path/to/absl/lib64/cmake" .. |
| @@ -1,5 +1,6 @@ | |||
| #=============================================================================== | |||
| # Copyright 2018 Intel Corporation | |||
| # Copyright 2026 Arm Ltd. and affiliates | |||
Contributor
There was a problem hiding this comment.
Minor: can be probably discarded.
Contributor
Author
There was a problem hiding this comment.
I kept it since we have touched a new file
vpirogov
reviewed
Jul 10, 2026
Comment on lines
+323
to
+327
| onednn_option(XLA_SOURCE_DIR "" | ||
| "Path to an OpenXLA/XLA source tree used to build the minimal XLA async | ||
| runtime subset for _DNNL_TEST_THREADPOOL_IMPL=EIGEN_ASYNC when no XLA | ||
| CMake package is available.") | ||
|
|
Contributor
There was a problem hiding this comment.
This one belongs in validation options. Preferably somewhere near _DNNL_TEST_THREADPOOL_IMPL
Contributor
There was a problem hiding this comment.
_DNNL_TEST_THREADPOOL_IMPL is right above. :)
Contributor
There was a problem hiding this comment.
Oh, looks like I misplaced _DNNL_TEST_THREADPOOL_IMPL...
Contributor
Author
There was a problem hiding this comment.
Apologies, I was on leave - but is this one still required? I have addressed the other comment
cfRod
force-pushed
the
eigen_async_xla_build
branch
from
July 27, 2026 13:59
bafdfdb to
4f8b98a
Compare
Signed-off-by: Crefeda Rodrigues <crefeda.rodrigues@arm.com>
cfRod
force-pushed
the
eigen_async_xla_build
branch
from
July 27, 2026 16:14
4f8b98a to
1fbe367
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change adds an optional source-tree fallback for building the XLA async runtime pieces required by
_DNNL_TEST_THREADPOOL_IMPL=EIGEN_ASYNC.Today the EIGEN_ASYNC test threadpool path requires an XLA CMake package discoverable through
find_package(xla CONFIG).This is difficult to reproduce in open-source development because XLA does not currently provide a documented build or install export for the subset of headers and
libxla.aneeded by oneDNN’s async Eigen threadpool validation.The new behavior keeps the existing packaged XLA flow as the preferred path.
If that package is found, oneDNN continues to use the imported xla target.
If no XLA package is found and ONEDNN_XLA_SOURCE_DIR is provided.
This also documents the new build option in the threadpool validation build instructions.
Fixes #5499
Validation
Tested on AArch64 with ACL and Eigen async threadpool enabled.
Configure included:
-DONEDNN_AARCH64_USE_ACL=ON
-DONEDNN_CPU_RUNTIME=THREADPOOL
-D_DNNL_TEST_THREADPOOL_IMPL=EIGEN_ASYNC
-DONEDNN_XLA_SOURCE_DIR=/path/to/xla
-DEigen3_DIR=/tmp/eigen-xla-install/share/eigen3/cmake
-Dabsl_DIR=/tmp/absl-xla-install/lib/cmake/absl
The build produced the fallback libxla.a from:
xla/tsl/platform/logging.cc.o
xla/tsl/concurrency/async_value.cc.o
xla/tsl/concurrency/async_value_ref.cc.o
Also verified the resulting test_reorder binary contains XLA/TSL async symbols such as:
tsl::AsyncValue
tsl::BlockUntilReady
xla::cpu::Worker::Parallelize
Checklist
General
Performance improvements
New features
fallback.
Bug fixes
Have you included information on how to reproduce the issue (either in a github issue or in this PR)?
Have you added relevant regression tests?
RFC (https://github.com/uxlfoundation/oneDNN/tree/rfcs) PR
(https://github.com/uxlfoundation/oneDNN/blob/rfcs/rfcs/template.md#onednn-design-document-rfc)?