Skip to content

Conversation

@mehrdadh
Copy link
Member

@mehrdadh mehrdadh commented Feb 18, 2022

This PR:

  • adds hexagon tests to pipeline
  • cleans up hexagon tests

import pytest


def pytest_addoption(parser):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we still have this option, but not mandatory? It might be helpful to have a flag to override the serial number.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does exporting ANDROID_SERIAL_NUMBER work for you?
The reason that I removed it from pytest parameters is that it forces all other tests in this directory to have this parameter in the their method description.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to use serial number to distinguish running it on target (where it's a serial number of an actual device), and on simulator, where it would be a string "simulator". ANDROID_SERIAL_NUMBER has multiple users.

If you have a better mechanism in mind for setting simulator as the execution platform, let me know. I'd like to be able to run the same test.py on either hardware or simulator without manual editing, so some parts of HexagonLauncher will need to be modified a bit (to hide the internals a bit more).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't have to happen in this PR, so if it's ready to merge, then go ahead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kparzysz-quic that's a good point. we can use something like board where it specifies the dev board(HDK, etc) or phone type(OPPO, etc). One of the boards could behexagon-simulator for running on the simulator.
board is used at HexagonLauncher level and it could also map to the correct tvm target that is passed to compiler. Something similar to microtvm here: https://github.com/apache/tvm/blob/main/python/tvm/target/target.py#L330

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In microtvm we go from board to model and model specifies the full target for TVM. Here we could have a direct mapping from board to tvm target or we can use both board and cpu_version to build the tvm target. Not sure if need the latter since it seems unnecessarily complicated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really a fan of the "board" approach for Hexagon, I don't think it's a useful abstraction for our situation. Moreover, the TVM target will be the same for both hardware and simulator, so we need something else to indicate where the code needs to be executed by the launcher. This is specific to launcher and nothing else.

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@areusch areusch merged commit dcebd4d into apache:main Feb 23, 2022
@mehrdadh mehrdadh deleted the hexagon/ci_testing branch February 23, 2022 15:31
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
* Add hexagon tests to CI Hexagon

* Fix CRT libs

* cleanup and fix Jenkins

* Address @areusch comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants