Skip to content
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

[Hexagon] Refactor Hexagon.cmake #10227

Merged
merged 1 commit into from
Feb 14, 2022
Merged

[Hexagon] Refactor Hexagon.cmake #10227

merged 1 commit into from
Feb 14, 2022

Conversation

kparzysz-quic
Copy link
Contributor

This file is included every time TVM is build, regardless of whether any support for Hexagon is enabled or not. This refactoring is meant to remove underlying assumptions about what features are enabled and what the compilation targets are. Now, when there is nothing needed from Hexagon, the script exits early (although it doesn't need to), and the rest of it is (and should remain) safe to execute regardless of build configuration.

Disable "runtime.module.loadfile_hexagon" from the offload runtime, since it conflicts with device_api.hexagon.v2. It was only used with offload on Android, which is being deprecated.

@masahi
Copy link
Member

masahi commented Feb 13, 2022

I think we can drop

if(SDK_VERSION_STRING MATCHES "^3\.[0-9]+\.[0-9]+")
# SDK 3.x.y
if(HEXAGON_ARCH MATCHES "v6[7-9]|v[7-9][0-9]")
message(SEND_ERROR
"Hexagon SDK ${SDK_VERSION_STRING} does not support ${HEXAGON_ARCH}")
endif()
set_parent(HEXAGON_SDK_INCLUDES
"${HEXAGON_SDK_ROOT}/incs"
"${HEXAGON_SDK_ROOT}/incs/a1std"
"${HEXAGON_SDK_ROOT}/incs/qlist"
"${HEXAGON_SDK_ROOT}/incs/stddef")
set_parent(HEXAGON_QURT_INCLUDES
"${HEXAGON_SDK_ROOT}/libs/common/qurt/${HEXARCH_DIR}/include/posix"
"${HEXAGON_SDK_ROOT}/libs/common/qurt/${HEXARCH_DIR}/include/qurt")
set_parent(HEXAGON_QURT_LIBS
"${HEXAGON_SDK_ROOT}/libs/common/qurt/${HEXARCH_DIR}/lib")
set_parent(HEXAGON_RPCMEM_ROOT "${HEXAGON_SDK_ROOT}/libs/common/rpcmem")
set_parent(HEXAGON_REMOTE_ROOT
"${HEXAGON_SDK_ROOT}/libs/common/remote/ship/android_Release_aarch64")
set_parent(HEXAGON_QAIC_EXE "${HEXAGON_SDK_ROOT}/tools/qaic/bin/qaic")

since I don't think we support SDK v3 anymore.

This file is included every time TVM is build, regardless of whether
any support for Hexagon is enabled or not. This refactoring is meant
to remove underlying assumptions about what features are enabled and
what the compilation targets are. Now, when there is nothing needed
from Hexagon, the script exits early (although it doesn't need to),
and the rest of it is (and should remain) safe to execute regardless
of build configuration.

Disable "runtime.module.loadfile_hexagon" from the offload runtime,
since it conflicts with device_api.hexagon.v2.
It was only used with offload on Android, which is being deprecated.
@kparzysz-quic
Copy link
Contributor Author

I think that v65 and v66 should still work, and you'd need SDK 3.x for v65. Having said that, I'm ok with dropping SDK 3.x, but I ask around before doing that.

I rebased the current commit as it is. If we decide to drop 3.x, we could probably do it in another commit (since it's in a different .cmake file).

@kparzysz-quic kparzysz-quic merged commit 2a840a3 into apache:main Feb 14, 2022
@kparzysz-quic kparzysz-quic deleted the refactor-hexagon-cmake branch February 14, 2022 14:31
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
This file is included every time TVM is build, regardless of whether
any support for Hexagon is enabled or not. This refactoring is meant
to remove underlying assumptions about what features are enabled and
what the compilation targets are. Now, when there is nothing needed
from Hexagon, the script exits early (although it doesn't need to),
and the rest of it is (and should remain) safe to execute regardless
of build configuration.

Disable "runtime.module.loadfile_hexagon" from the offload runtime,
since it conflicts with device_api.hexagon.v2.
It was only used with offload on Android, which is being deprecated.
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
This file is included every time TVM is build, regardless of whether
any support for Hexagon is enabled or not. This refactoring is meant
to remove underlying assumptions about what features are enabled and
what the compilation targets are. Now, when there is nothing needed
from Hexagon, the script exits early (although it doesn't need to),
and the rest of it is (and should remain) safe to execute regardless
of build configuration.

Disable "runtime.module.loadfile_hexagon" from the offload runtime,
since it conflicts with device_api.hexagon.v2.
It was only used with offload on Android, which is being deprecated.
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.

2 participants