-
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
[MicroTVM][PyTest] Explicitly skip MicroTVM unittests. #9335
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.
LGTM with a few suggestions but otherwise always happy to see pytest being given more information about the tests 😸
|
||
class BaseTestHandler(project_api.server.ProjectAPIHandler): | ||
class BaseTestHandler(project_api.server.ProjectAPIHandler): |
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.
Unsure about the name shadowing here, but this is neat.
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.
Thank you. Most of the time I would try to move the possibly-missing imports into the test itself, but here it wasn't possible without moving the entire class definition as well. Good point on the name shadowing, and I've updated the inner class definition to be "BaseTestHandler_Impl" instead.
@@ -26,8 +26,7 @@ | |||
import tvm.testing | |||
|
|||
|
|||
@tvm.testing.requires_micro | |||
class TransportLoggerTests(unittest.TestCase): | |||
def test_transport_class(): |
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.
This would be nice as a fixture as above.
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.
Good point, I hadn't done so initially because this file was written with unittest
instead of pytest
. I've refactored this entire file to use pytest
, and to split out the different tests of functionality into different test cases, with the class definition now included in a fixture.
90384ea
to
9211c71
Compare
Refactor unit tests so they will show as skipped if `USE_MICRO=OFF`.
- Updated to avoid name shadowing of BaseTestHandler - Updated test_micro_transport to use fixture for setup. Ended up needing to refactor to use pytest instead of unittest, split up test functionality during refactor.
9211c71
to
8ce1e74
Compare
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 @Lunderberg , this is a neat trick!
* main: (119 commits) [Topi][Op][PyTorch][Vitas] Fix inconsistent kernel layout conventions for conv2d_transpose (apache#9336) Fix repository URL in ubuntu_install_rocm.sh (apache#9425) Add LLVM-13 installation to Docker setup (apache#9498) [Relay] Use target_host determined at Relay level instead of recalculating it (apache#9499) Arm(R) Ethos(TM)-U NPU BinaryElementwise operators support (apache#9442) [COMMUNITY] Junru's and Wuwei's PGP key for ASF release (apache#9488) Add default for split op (apache#9489) [HOTFIX][TARGET] Change LOG in compilation config to DLOG (apache#9486) Fixed some warnings about lambda's closures that are bigger than necessary (apache#9481) [Support] Add libinfo into the runtime build (apache#9310) Change Call with TIRCallAttrs to call_lowered op (apache#9312) [ETHOSN] Streamline Ethos(TM)-N cross-compile rpc usage (apache#9477) [CMSIS-NN] Assert correct amount of CMSIS-NN artifacts in MLF (apache#9480) [MicroTVM][PyTest] Explicitly skip MicroTVM unittests. (apache#9335) [microNPU] Replace ICHECK with diagnostic context in type inference (apache#9470) Better host handling in CompilationConfig & debug printing (apache#9460) [AOT][Tests] Use pre-built libraries in Reference System tests (apache#9271) [TIR] Add type hint for TIR (apache#9432) [TVMC] Add test for quantized pytorch model (apache#9467) [CMSIS-NN] Convert CMSIS-NN to use Target Hooks (apache#9397) ...
* [MicroTVM][PyTest] Explicitly skip MicroTVM unittests. Refactor unit tests so they will show as skipped if `USE_MICRO=OFF`. * Updates following PR review. - Updated to avoid name shadowing of BaseTestHandler - Updated test_micro_transport to use fixture for setup. Ended up needing to refactor to use pytest instead of unittest, split up test functionality during refactor.
* [MicroTVM][PyTest] Explicitly skip MicroTVM unittests. Refactor unit tests so they will show as skipped if `USE_MICRO=OFF`. * Updates following PR review. - Updated to avoid name shadowing of BaseTestHandler - Updated test_micro_transport to use fixture for setup. Ended up needing to refactor to use pytest instead of unittest, split up test functionality during refactor.
* [MicroTVM][PyTest] Explicitly skip MicroTVM unittests. Refactor unit tests so they will show as skipped if `USE_MICRO=OFF`. * Updates following PR review. - Updated to avoid name shadowing of BaseTestHandler - Updated test_micro_transport to use fixture for setup. Ended up needing to refactor to use pytest instead of unittest, split up test functionality during refactor.
* [MicroTVM][PyTest] Explicitly skip MicroTVM unittests. Refactor unit tests so they will show as skipped if `USE_MICRO=OFF`. * Updates following PR review. - Updated to avoid name shadowing of BaseTestHandler - Updated test_micro_transport to use fixture for setup. Ended up needing to refactor to use pytest instead of unittest, split up test functionality during refactor.
* [MicroTVM][PyTest] Explicitly skip MicroTVM unittests. Refactor unit tests so they will show as skipped if `USE_MICRO=OFF`. * Updates following PR review. - Updated to avoid name shadowing of BaseTestHandler - Updated test_micro_transport to use fixture for setup. Ended up needing to refactor to use pytest instead of unittest, split up test functionality during refactor.
Refactor unit tests so they will show as skipped if
USE_MICRO=OFF
.