forked from apache/tvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hexagon] Improved ergonomics of HexagonLauncher in unit tests. (apac…
…he#10581) * [Hexagon] Improved ergonomics of HexagonLauncher in unit tests. The goal of this commit is to reduce/eliminate common code required through unit tests that interact with Hexagon hardware. - New testing fixtures in `tests/python/contrib/test_hexagon`. A test running on hexagon hardware should only need to use the `hexagon_session` fixture. - `rpc_server_port`: Iterates through port numbers, selecting an unused port for each unit test. Avoids needing to explicitly specify unique ports for each unit test. - `tvm_tracker`: Starts a tracker on use, exits after test. Avoids needing to manually start a tracker prior to running the unit test. - `hexagon_launcher`: Starts a `HexagonLauncher` server on use, stops server after test. Avoids needing to call `start_server()` and `stop_server()` in each test. - `hexagon_session`: Starts a hexagon session using `hexagon_laucnehr.start_session()`, exits after test. - Added `Session.upload` function, which delegates to `HexagonLauncher.upload`. Avoids needing to interact with both the launcher and the session. - Allowed `tvm.IRModule` as argument passed to `Session.load_module`, which will automatically save/upload the module, then load it. Avoids needing to handle save/upload of temporary files in each unit test. * Added default port for tracker if not already set. * Pass through None from hexagon_launcher to hexagon_session. * Updated launcher to use external tracker if specified. * Avoid setting up the local tracker unless required. * Declare previous_port as global, instead of list. * Corrected type hints. * Docstring updates
- Loading branch information
1 parent
993ae21
commit fd829c8
Showing
5 changed files
with
290 additions
and
223 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.