-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[CMake] Add missing dependency #108461
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
[CMake] Add missing dependency #108461
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-mlir Author: Erick Ochoa (efferifick) ChangesThe if(MLIR_ENABLE_EXECUTION_ENGINE)
_add_capi_test_executable(mlir-capi-execution-engine-test
execution_engine.c
LINK_LIBS PRIVATE
MLIRCAPIConversion
MLIRCAPIExecutionEngine
MLIRCAPIRegisterEverything
)
endif() is run by lit tests, but it is not properly listed as a dependency. It is added in places conditionally across the file # The native target may not be enabled, in this case we won't
# run tests that involves executing on the host: do not build
# useless binaries.
if(LLVM_ENABLE_PIC AND TARGET ${LLVM_NATIVE_ARCH})
list(APPEND MLIR_TEST_DEPENDS
mlir-cpu-runner
llc
mlir_async_runtime
mlir-capi-execution-engine-test
mlir_c_runner_utils
mlir_runner_utils
mlir_float16_utils
)
endif() But this condition is not the same as the one where the test executable is added. It has been reported on discord that the following error occurred:
This error will not be deterministic and is dependent on the order in which tools are built. If by any chance, This patch adds the Happy to make changes like:
set(MLIR_TEST_DEPENDS
FileCheck count not split-file
mlir-capi-ir-test
mlir-capi-irdl-test
mlir-capi-llvm-test
mlir-capi-pass-test
mlir-capi-quant-test
mlir-capi-rewrite-test
mlir-capi-sparse-tensor-test
mlir-capi-transform-test
mlir-capi-transform-interpreter-test
mlir-capi-translation-test
mlir-linalg-ods-yaml-gen
mlir-lsp-server
mlir-opt
mlir-query
mlir-reduce
mlir-tblgen
mlir-translate
tblgen-lsp-server
tblgen-to-irdl
)
set(MLIR_TEST_DEPENDS ${MLIR_TEST_DEPENDS}
mlir-capi-pdl-test
mlir-pdll-lsp-server
mlir-pdll
) Full diff: https://github.com/llvm/llvm-project/pull/108461.diff 1 Files Affected:
diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
index df95e5db11f1e0..4d2d738b734ec6 100644
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -150,6 +150,10 @@ if(MLIR_ENABLE_CUDA_RUNNER)
list(APPEND MLIR_TEST_DEPENDS mlir_cuda_runtime)
endif()
+if(MLIR_ENABLE_EXECUTION_ENGINE)
+ list(APPEND MLIR_TEST_DEPENDS mlir-capi-execution-engine-test)
+endif()
+
if(MLIR_ENABLE_ROCM_RUNNER)
list(APPEND MLIR_TEST_DEPENDS mlir_rocm_runtime)
endif()
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@efferifick Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
Thanks for the patch, it solved the issue for me. Do you want to backport this to the llvm 19 branch as well? |
The
mlir-capi-execution-engine-test
test executableis run by lit tests, but it is not properly listed as a dependency. It is added in places conditionally across the file
tests/CMakeLists.txt
But this condition is not the same as the one where the test executable is added. It has been reported on discord that the following error occurred:
This error will not be deterministic and is dependent on the order in which tools are built. If by any chance,
mlir-capi-execution-engine-test
is built before the lit tests run, then nothing will happen. But lit tests can be run beforemlir-capi-execution-engine-test
is built.This patch adds the
mlir-capi-execution-engine
to theMLIR_TEST_DEPENDS
list when theMLIR_ENABLE_EXECUTION_ENGINE
flag is present.Happy to make changes like:
mlir-capi-execution-engine-test
from the other place where it is included in the tests