-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Build and test TVM under minimal configuration #12178
Conversation
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.
Thanks for tackling this! It's been on the issue list for quiet a while, things mostly lgtm. Can you also follow up to add an ECR repo for ci_minimal
as well? https://github.com/tlc-pack/ci/blob/main/terraform/vars/tvm-ci-prod.auto.tfvars#L79
@@ -199,6 +234,9 @@ stage('Test') { | |||
{{ method_name }}() | |||
}, | |||
{% endfor %} | |||
'unittest: CPU MINIMAL': { |
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.
can you use the m.test_step
macro here instead? That way we don't need to duplicate all the meta-logic (timeout, workspace, etc) just for this test
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.
I'm not sure how to do that. The test_step
inlines the body while in this case, I am calling run_unittest_minimal
. I could try to inline the method and use the macro, but that might not work due to the 64KB bytecode size/method limit in the JVM.
I also guess I could modify the macros.
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.
Ok, I am adding a new macro
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.
I meant something like https://github.com/apache/tvm/blob/main/ci/jenkins/Test.groovy.j2#L202-L218, if you do that it will automatically call the test method
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.
Yes, but I needed a different macro that did not include the step name (eg unittest: CPU MINIMAL
, frontend: aarch64 2 of 2
, unittest: CPU
).
tests/scripts/task_cpp_unittest.sh
Outdated
ninja crttest | ||
popd | ||
# crttest requires USE_MICRO to be enabled. | ||
if grep -Fq "set(USE_MICRO ON)" ${BUILD_DIR}/config.cmake; then |
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.
i really wanted to be able to have you just look this up in CMakeCache.txt, but unfortunately we don't cache these. i wonder if we should be setting this with set(USE_ABC ___ CACHED)
so we can inspect that. what if we modified Summary.cmake to write the options to a file via https://cmake.org/cmake/help/latest/command/file.html#append?
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.
it might also be cleaner to split this out into task_cpp_unittest_micro.sh
or something and just add it as another step everywhere that currently runs the cpp unit tests, that way its easy to run regardless of the specific build options
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.
I went the route of separating the script into two. Let me know your thoughts
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.
Update: It seems that there are crt
tests that get included in the cpp test suite when USE_MICRO
is enabled.
Instead of separating those, I am following @areusch advice and writing to a file all the options used to build TVM.
Adds an ECR repo for `ci_minimal` Required for apache/tvm#12178
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.
lgtm, waiting for approve from @areusch too before merging
ea3c93e
to
b42795f
Compare
a122907
to
4911c17
Compare
@gigiblender looks like just need to resolve the merge conflict |
aa0afb9
to
a8f5af1
Compare
a8f5af1
to
6da7b61
Compare
6da7b61
to
a63c4a6
Compare
@tvm-bot merge |
@tvm-bot merge |
This got out of date after merging apache#12178
This got out of date after merging #12178 Co-authored-by: driazati <[email protected]>
This got out of date after merging apache#12178 Co-authored-by: driazati <[email protected]>
This got out of date after merging apache#12178 Co-authored-by: driazati <[email protected]>
This got out of date after merging apache#12178 Co-authored-by: driazati <[email protected]>
* [skip ci][ci] Fix Jenkinsfile (#12387) This got out of date after merging #12178 Co-authored-by: driazati <[email protected]> * Address comments Co-authored-by: driazati <[email protected]>
This PR builds and tests TVM (running the CPP and unittests) under minimal configuration with some debug flags enabled: - `USE_RELAY_DEBUG=ON` in TVM - `-Wp,-D_GLIBCXX_ASSERTIONS` in TVM - `-DLLVM_ENABLE_ASSERTIONS=ON` in LLVM It also adds this configuration to the CI. `tests/python/unittest/test_meta_schedule_task_scheduler.py::test_meta_schedule_task_scheduler_multiple_gradient_based` results in an array OOB access and a segfault due to `D_GLIBCXX_ASSERTIONS`. I disable this test for now and will open an issue to solve it ASAP. It should fix apache#11932 and address [this discussion](https://discuss.tvm.apache.org/t/pre-rfc-new-ci-container-ci-cpu-asserts/12536/9).
This got out of date after merging apache#12178 Co-authored-by: driazati <[email protected]>
* [skip ci][ci] Fix Jenkinsfile (apache#12387) This got out of date after merging apache#12178 Co-authored-by: driazati <[email protected]> * Address comments Co-authored-by: driazati <[email protected]>
This PR builds and tests TVM (running the CPP and unittests) under minimal configuration with some debug flags enabled: - `USE_RELAY_DEBUG=ON` in TVM - `-Wp,-D_GLIBCXX_ASSERTIONS` in TVM - `-DLLVM_ENABLE_ASSERTIONS=ON` in LLVM It also adds this configuration to the CI. `tests/python/unittest/test_meta_schedule_task_scheduler.py::test_meta_schedule_task_scheduler_multiple_gradient_based` results in an array OOB access and a segfault due to `D_GLIBCXX_ASSERTIONS`. I disable this test for now and will open an issue to solve it ASAP. It should fix apache#11932 and address [this discussion](https://discuss.tvm.apache.org/t/pre-rfc-new-ci-container-ci-cpu-asserts/12536/9).
This got out of date after merging apache#12178 Co-authored-by: driazati <[email protected]>
This PR builds and tests TVM (running the CPP and unittests) under minimal configuration with some debug flags enabled:
USE_RELAY_DEBUG=ON
in TVM-Wp,-D_GLIBCXX_ASSERTIONS
in TVM-DLLVM_ENABLE_ASSERTIONS=ON
in LLVMIt also adds this configuration to the CI.
tests/python/unittest/test_meta_schedule_task_scheduler.py::test_meta_schedule_task_scheduler_multiple_gradient_based
results in an array OOB access and a segfault due toD_GLIBCXX_ASSERTIONS
. I disable this test for now and will open an issue to solve it ASAP.It should fix #11932 and address this discussion.