You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/03/05 21:55:38 UTC

[GitHub] [tvm] kparzysz-quic commented on pull request #10493: [CMAKE,HEXAGON] Only use hexagon specific logging when building for hexagon

kparzysz-quic commented on pull request #10493:
URL: https://github.com/apache/tvm/pull/10493#issuecomment-1059837014


   There is a place in `Hexagon.cmake` where the 3 Hexagon files are added to the compilation when nothing Hexagon-specific is requested.  This is really only done because some C++ unit tests test this code, and should probably be replaced with on-target tests (now that Hexagon builder is in CI).
   ```
    94 if(NOT USE_HEXAGON_DEVICE AND NOT USE_HEXAGON_RPC AND NOT BUILD_FOR_HEXAGON)
    95   # If nothing related to Hexagon is enabled, add phony Hexagon codegen,
    96   # and some stuff needed by cpptests (this part is a temporary workaround
    97   # until e2e support for Hexagon is enabled).
    98   if(BUILD_FOR_HOST)
    99     list(APPEND COMPILER_SRCS src/target/opt/build_hexagon_off.cc)
   100   endif()
   101   list(APPEND RUNTIME_SRCS src/runtime/hexagon/hexagon/hexagon_buffer.cc)
   102   list(APPEND RUNTIME_SRCS src/runtime/hexagon/hexagon/hexagon_common.cc)
   103   list(APPEND RUNTIME_SRCS src/runtime/hexagon/hexagon/hexagon_user_dma.cc)
   104   return()
   105 endif()
   ```
   
   Instead of making these changes, could you add a compile flag (via `add_definitions` between lines 100-101, for example), like -DHEXAGON_DONT_REALLY_DO_CUSTOM_LOG or something like that, and guard the `#define TVM_LOG_CUSTOMIZE 1` with that new flag?  This would be a workaround until these 3 files can be removed from non-Hexagon compilations...


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org