<!--- Licensed to the Apache Software Foundation (ASF) under one -->
<!--- or more contributor license agreements. See the NOTICE file -->
<!--- distributed with this work for additional information -->
<!--- regarding copyright ownership. The ASF licenses this file -->
<!--- to you under the Apache License, Version 2.0 (the -->
<!--- "License"); you may not use this file except in compliance -->
<!--- with the License. You may obtain a copy of the License at -->
<!--- http://www.apache.org/licenses/LICENSE-2.0 -->
<!--- Unless required by applicable law or agreed to in writing, -->
<!--- software distributed under the License is distributed on an -->
<!--- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -->
<!--- KIND, either express or implied. See the License for the -->
<!--- specific language governing permissions and limitations -->
<!--- under the License. -->
# Hexagon backend runtime
The Hexagon runtime is a part of the TVM runtime that facilitates communication between a host and a Hexagon device. There are two types of host/device arrangements that are supported:
- X86/Linux host running Hexagon simulator,
- Android/AArch64 host running on a physical device containing a Hexagon module (i.e. CSDP or ADSP).
The TVM runtime that contains Hexagon runtime is the one executing on host. In either case, there will need to be a separate TVM runtime (i.e. the `libtvm_runtime.so` library) compiled for execution on Hexagon.
The prerequisite is to have Hexagon SDK installed, preferably version 3.5.0 or later. The Hexagon SDK can be downloaded from https://developer.qualcomm.com/software/hexagon-dsp-sdk.
It is also recommended to use as recent version of LLVM as possible, version 7.0.0 being the minimum (based on community feedback).
### Compiling TVM runtime for x86
This will use Hexagon simulator, which is provided in the Hexagon SDK.
When configuring TVM (cmake), set the following variables:
```
USE_LLVM=llvm-config
USE_HEXAGON_DEVICE=sim
USE_HEXAGON_SDK=/path/to/sdk
```
You can then build the entire TVM with the usual command (e.g. `make`).
### Compiling TVM runtime for Android
This will use FastRPC mechanism to communicate between the AArch64 host and Hexagon.
When configuring TVM (cmake), set the following variables:
```
USE_LLVM=llvm-config
USE_HEXAGON_DEVICE=device
USE_HEXAGON_SDK=/path/to/sdk
```
You will need Android clang toolchain to compile the runtime. It is provided in Android NDK r19 or newer.
Set the C/C++ compiler to the Android clang for aarch64, and pass `-DCMAKE_CXX_FLAGS='-stdlib=libc++'` to the cmake command.
Only build the `runtime` component of TVM (e.g. `make runtime`), building the entire TVM will not work.
### Compiling TVM runtime for Hexagon
The TVM runtime executing on Hexagon does not need to have support for Hexagon device in it (as it is only for communication between host and Hexagon device). In fact, it's only needed for basic services (like thread control), and so it should not contain support for any devices.
When configuring TVM (cmake), set the following variables:
```
USE_RPC=OFF
USE_LLVM=OFF
USE_HEXAGON_DEVICE=OFF
USE_HEXAGON_SDK=/path/to/sdk
```
Please note that while suport for a Hexagon device is disabled, the Hexagon SDK is still needed and the path to it needs to be passed to cmake.
Set the C/C++ compiler to `hexagon-clang` (included in the Hexagon SDK), and set `CMAKE_CXX_FLAGS='-stdlib=libc++'`.
As in the case of Android, only build the `runtime` component (e.g. `make runtime`).
没有合适的资源?快使用搜索试试~ 我知道了~
神经网络推理代码优化搜索演示,基于tvm编译开源模型centerface,并使用autoTVM搜索最优推理代码….zip
共233个文件
cc:109个
h:83个
c:9个
需积分: 5 0 下载量 72 浏览量
2024-02-07
15:13:32
上传
评论
收藏 14.24MB ZIP 举报
温馨提示
美食推荐【探索人工智能的宝藏之地】 无论您是计算机相关专业的在校学生、老师,还是企业界的探索者,这个项目都是为您量身打造的。无论您是初入此领域的小白,还是寻求更高层次进阶的资深人士,这里都有您需要的宝藏。不仅如此,它还可以作为毕设项目、课程设计、作业、甚至项目初期的立项演示。 【人工智能的深度探索】 人工智能——模拟人类智能的技术和理论,使其在计算机上展现出类似人类的思考、判断、决策、学习和交流能力。这不仅是一门技术,更是一种前沿的科学探索。 【实战项目与源码分享】 我们深入探讨了深度学习的基本原理、神经网络的应用、自然语言处理、语言模型、文本分类、信息检索等领域。更有深度学习、机器学习、自然语言处理和计算机视觉的实战项目源码,助您从理论走向实践,如果您已有一定基础,您可以基于这些源码进行修改和扩展,实现更多功能。 【期待与您同行】 我们真诚地邀请您下载并使用这些资源,与我们一起在人工智能的海洋中航行。同时,我们也期待与您的沟通交流,共同学习,共同进步。让我们在这个充满挑战和机遇的领域中共同探索未来!
资源推荐
资源详情
资源评论
收起资源包目录
神经网络推理代码优化搜索演示,基于tvm编译开源模型centerface,并使用autoTVM搜索最优推理代码….zip (233个子文件)
graph_executor.c 41KB
crt_runtime_api.c 18KB
load_json.c 14KB
memory.c 12KB
graph_executor_module.c 8KB
func_registry.c 5KB
ndarray.c 5KB
packed_func.c 4KB
crt_backend_api.c 2KB
tensorrt_ops.cc 51KB
vulkan.cc 48KB
hexagon_device_sim.cc 44KB
rpc_endpoint.cc 35KB
executable.cc 30KB
bnns_json_runtime.cc 24KB
acl_runtime.cc 23KB
vm.cc 22KB
c_runtime_api.cc 21KB
stackvm.cc 21KB
bytecode.cc 20KB
graph_executor.cc 20KB
sim_device.cc 20KB
hexagon_module.cc 19KB
hexagon_device_target.cc 18KB
dnnl_json_runtime.cc 18KB
rpc_module.cc 18KB
sort.cc 16KB
cublas.cc 16KB
micro_session.cc 15KB
conv_forward.cc 15KB
utvm_graph_executor.cc 13KB
tensorrt_runtime.cc 13KB
thread_pool.cc 13KB
tvm_remote_nd_imp.cc 13KB
graph_executor_debug.cc 13KB
framing.cc 13KB
profiling.cc 12KB
ndarray.cc 11KB
cpp_deploy.cc 11KB
convolution.cc 11KB
dnnl.cc 10KB
tensorrt_builder.cc 10KB
opencl_device_api.cc 10KB
cuda_module.cc 10KB
cuda_device_api.cc 10KB
object.cc 9KB
opencl_module.cc 9KB
threading_backend.cc 9KB
conv_forward.cc 9KB
tvm_remote_imp.cc 9KB
rpc_server.cc 9KB
session.cc 9KB
fake_pthread.cc 9KB
rocm_module.cc 8KB
rocm_device_api.cc 8KB
metadata_module.cc 8KB
graph_executor_factory.cc 8KB
vitis_ai_runtime.cc 8KB
mkl.cc 7KB
library_module.cc 7KB
file_utils.cc 7KB
tflite_runtime.cc 7KB
ethosn_device.cc 7KB
memory_manager.cc 6KB
module.cc 6KB
container.cc 6KB
acl_utils.cc 6KB
cblas.cc 6KB
rocblas.cc 6KB
hexagon_device_api.cc 5KB
mt_random_engine.cc 5KB
tvm_hvx.cc 5KB
rpc_device_api.cc 5KB
main.cc 5KB
verilator_runtime.cc 5KB
graph_runtime_cuda_graph.cc 5KB
logging.cc 5KB
workspace_pool.cc 5KB
rpc_local_session.cc 5KB
stackvm_module.cc 5KB
cudnn_utils.cc 5KB
rpc_socket_impl.cc 5KB
registry.cc 5KB
random.cc 5KB
ethosn_runtime.cc 4KB
rpc_session.cc 4KB
vm.cc 4KB
rpc_pipe_impl.cc 3KB
cpu_device_api.cc 3KB
softmax.cc 3KB
tvm_runtime_pack.cc 3KB
miopen_utils.cc 3KB
hexagon_stubapi.cc 3KB
tvm_wrap_pthread.cc 3KB
onnx_module.cc 3KB
dso_library.cc 3KB
sdaccel_module.cc 3KB
hexagon_dsprpcapi.cc 3KB
edgetpu_runtime.cc 3KB
acl_allocator.cc 3KB
共 233 条
- 1
- 2
- 3
资源评论
妄北y
- 粉丝: 2w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 【岗位说明】行政人事岗位职责.doc
- 【岗位说明】行政人事专员岗位职责.doc
- 【岗位说明】行政人资部部门职责说明书.doc
- 【岗位说明】行政人员岗位职责.doc
- 【岗位说明】行政文员岗位职责.doc
- 【岗位说明】行政文员岗位职责和任职要求.doc
- 【岗位说明】行政助理岗位职责.doc
- 【岗位说明】行政助理.doc
- 【岗位说明】行政中心岗位职责.doc
- 【岗位说明】行政总监岗位职责(全面).doc
- 【岗位说明】后勤组长岗位说明书.doc
- 【岗位说明】行政专员岗位职责说明书.doc
- 【岗位说明】行政总监岗位说明书.doc
- 【岗位说明】绩效考核主管.doc
- 【岗位说明】会计主管岗位说明.doc
- 【岗位说明】化验室主任岗位说明书.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功