-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Hexagon] Select qaic executable based on Ubuntu version #10891
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
Conversation
Allow users to override the selection via QAIC_PATH_OVERRIDE environment variable, for example on non-Ubuntu systems that can still run Ubuntu binaries.
mehrdadh
left a comment
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, thanks!
| _qaic_path | ||
| ) | ||
| set_parent(${_output_variable} "${_qaic_path}") | ||
| set(_override $ENV{QAIC_PATH_OVERRIDE}) |
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.
Would it be more idiomatic for QAIC_PATH_OVERRIDE to be a CMake variable, rather than an environment variable?
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.
The motivation for an environment variable is that one can set it and then use cmake as if nothing happened, so to speak. Since cmake calls itself recursively when building various projects, passing of a cmake variable would need to be explicit.
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, that makes sense.
cmake/modules/HexagonSDK.cmake
Outdated
| _check_path_exists("${_qaic_path}" _qaic_path_found) | ||
| if(NOT _qaic_path_found) | ||
| message( | ||
| SEND_ERROR |
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.
Is there a particular reason to use SEND_ERROR instead of FATAL_ERROR?
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.
Changed it to a WARNING---the message is there to inform the user about the override flag.
- Remove repeated call to _check_path_exists. - Return qaic_path-NOTFOUND is qaic is not found. - Change SEND_ERROR to WARNING when qaic is not found, since not finding of other properties is not an error.
|
Thanks @kparzysz-quic ! There might be one last issue, but that's probably all: Now when It looks like that's already happening in some places, for example: tvm/src/runtime/hexagon/android/target/fastrpc/CMakeLists.txt Lines 29 to 39 in 02b2469
But not everywhere that (I think) relies on it being valid:
|
All these checks do is display a warning. In case of a missing qaic, the warning is already shown in the property lookup itself. |
Right. An earlier version of this PR would cause The current version of this PR would only issue a warning during I've been assuming that when possible, we want to trap errors during I'm not aware of TVM having a guideline about this, so if the other reviewers / committers are okay with it, that's fine. |
* [Hexagon] Select qaic executable based on Ubuntu version Allow users to override the selection via QAIC_PATH_OVERRIDE environment variable, for example on non-Ubuntu systems that can still run Ubuntu binaries. * Address review comments - Remove repeated call to _check_path_exists. - Return qaic_path-NOTFOUND is qaic is not found. - Change SEND_ERROR to WARNING when qaic is not found, since not finding of other properties is not an error.
* [Hexagon] Select qaic executable based on Ubuntu version Allow users to override the selection via QAIC_PATH_OVERRIDE environment variable, for example on non-Ubuntu systems that can still run Ubuntu binaries. * Address review comments - Remove repeated call to _check_path_exists. - Return qaic_path-NOTFOUND is qaic is not found. - Change SEND_ERROR to WARNING when qaic is not found, since not finding of other properties is not an error.
* [Hexagon] Select qaic executable based on Ubuntu version Allow users to override the selection via QAIC_PATH_OVERRIDE environment variable, for example on non-Ubuntu systems that can still run Ubuntu binaries. * Address review comments - Remove repeated call to _check_path_exists. - Return qaic_path-NOTFOUND is qaic is not found. - Change SEND_ERROR to WARNING when qaic is not found, since not finding of other properties is not an error.
Allow users to override the selection via
QAIC_PATH_OVERRIDEenvironment variable, for example on non-Ubuntu systems that can still run Ubuntu binaries.