chayliu-ecarx commented on PR #17169:
URL: https://github.com/apache/tvm/pull/17169#issuecomment-2235693852
According to your suggestions, I update the cmake file with the following
changes:
Adding as you change:
**set(htp_supported_archs "v68" "v69" "v73" "v75")
list(FIND htp_supported_archs "${USE_HEXAGON_ARCH}" supported_arch_index)**
Adding as your change:
**if(${supported_arch_index} EQUAL -1)
list(REMOVE_ITEM RUNTIME_HEXAGON_SRCS
"${TVMRT_SOURCE_DIR}/hexagon/hexagon_user_dma.cc")
endif()**
Adding as your change:
**if(${supported_arch_index} EQUAL -1)
list(REMOVE_ITEM RUNTIME_HEXAGON_SRCS
"${TVMRT_SOURCE_DIR}/hexagon/hexagon_user_dma_tests.cc")
endif()**
Modifying:
**if((USE_HEXAGON_QHL) AND (${supported_arch_index} GREATER -1))
file_glob_append(TVM_QHL_WRAPPER_SRCS
"${TVMRT_SOURCE_DIR}/hexagon/qhl/*.cc"
)
include_directories(
"${USE_HEXAGON_SDK}/libs/qhl_hvx/inc/qhmath_hvx"
"${USE_HEXAGON_SDK}/libs/qhl_hvx/inc/internal/"
"${USE_HEXAGON_SDK}/libs/qhl/inc/qhmath"
"${USE_HEXAGON_SDK}/libs/qhl/src/internal/"
)
set_property(SOURCE ${TVM_QHL_WRAPPER_SRCS} APPEND_STRING PROPERTY
COMPILE_FLAGS "-Wno-narrowing -mhvx -mhvx-length=128B")
list(APPEND TVM_RUNTIME_LINKER_LIBS -Wl,--whole-archive
${USE_HEXAGON_SDK}/libs/qhl_hvx/prebuilt/hexagon_toolv84_v68/libqhmath_hvx.a
-Wl,--no-whole-archive)
list(APPEND TVM_RUNTIME_LINKER_LIBS -Wl,--whole-archive
${USE_HEXAGON_SDK}/libs/qhl/prebuilt/hexagon_toolv84_v68/libqhmath.a
-Wl,--no-whole-archive)
endif()**
Modifying:
**if(${supported_arch_index} GREATER -1)
file_glob_append(RUNTIME_HEXAGON_SRCS
"${TVMRT_SOURCE_DIR}/hexagon/ops/*.cc"
)
include_directories(
"${TVMRT_SOURCE_DIR}/hexagon/ops"
)
set_source_files_properties(
"${TVMRT_SOURCE_DIR}/hexagon/ops/conv2d_quant_hvx.cc"
PROPERTIES COMPILE_FLAGS "-mhvx"
)
set_source_files_properties(
"${TVMRT_SOURCE_DIR}/hexagon/ops/conv2d_fp16_hvx.cc"
PROPERTIES COMPILE_FLAGS "-mhvx"
)
endif()**
after that, building succeed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]