trevor-m commented on pull request #6395:
URL: https://github.com/apache/incubator-tvm/pull/6395#issuecomment-693018923


   There appears to be an inconsistency in the CI between 
`tests/lint/cpplint.sh` and `tests/lint/clang_format.sh` for this macro 
definition:
   ```
   #define TRT_VERSION_GE(major, minor, patch)                                  
                  \
     ((NV_TENSORRT_MAJOR > major) || (NV_TENSORRT_MAJOR == major && 
NV_TENSORRT_MINOR > minor) || \
      (NV_TENSORRT_MAJOR == major && NV_TENSORRT_MINOR == minor && 
NV_TENSORRT_PATCH >= patch))
   ```
   
   `tests/lint/cpplint.sh` will complain about the 3 spaces indent on the 3rd 
line:
   ```
   src/runtime/contrib/tensorrt/tensorrt_utils.h:35:  Weird number of spaces at 
line-start.  Are you using a 2-space indent?  [whitespace/indent] [3]
   ```
   
   If I change it to 2 spaces, the cpplint passes but the clang-format checker 
fails:
   ```
   ---------clang-format log----------
   diff --git a/src/runtime/contrib/tensorrt/tensorrt_utils.h 
b/src/runtime/contrib/tensorrt/tensorrt_utils.h
   index 6d664e47d..746726fc1 100644
   --- a/src/runtime/contrib/tensorrt/tensorrt_utils.h
   +++ b/src/runtime/contrib/tensorrt/tensorrt_utils.h
   @@ -32,7 +32,7 @@
   
    #define TRT_VERSION_GE(major, minor, patch)                                 
                   \
      ((NV_TENSORRT_MAJOR > major) || (NV_TENSORRT_MAJOR == major && 
NV_TENSORRT_MINOR > minor) || \
   -  (NV_TENSORRT_MAJOR == major && NV_TENSORRT_MINOR == minor && 
NV_TENSORRT_PATCH >= patch))
   +   (NV_TENSORRT_MAJOR == major && NV_TENSORRT_MINOR == minor && 
NV_TENSORRT_PATCH >= patch))
   
    namespace tvm {
    namespace runtime {
   
   clang-format lint error found. Consider running clang-format-10 on these 
files to fix them.
   script returned exit code 1
   ```
   
   Is there a reason we have both of these checks? They appear to do the same 
thing but want different things. Is there a way to override one of them?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to