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 2021/02/05 02:34:41 UTC

[GitHub] [tvm] Beya2019 commented on pull request #7405: [TIR][Printer] Fix SelectNode TIRTextPrinter bracket mismatch

Beya2019 commented on pull request #7405:
URL: https://github.com/apache/tvm/pull/7405#issuecomment-773741386


   > Nice catch! Is it possible to add unit test to avoid this?
   
   There are ready-made test cases in tvm, tests/python/unittest/test_target_codegen_opencl.py->test_opencl_ternary_expression()->check_select(), we only need add a print message in L51-L52:
   `print(tvm.lower(s, [A, C]))`
   
   Capture part of the printed information:
   ```
   primfn(A_1: handle, C_1: handle) -> ()
     attr = {"global_symbol": "main", "tir.noalias": True}
     buffers = {C: Buffer(C_2: Pointer(int16), int16, [1], []),
                A: Buffer(A_2: Pointer(int16), int16, [1], [])}
     buffer_map = {A_1: A, C_1: C} {
     C_2[0] = max(2i16, select((0 < cast(int32, (int16*)A_2[0])), 1i16, 3i16))
   }
   ```
   Because this change does not affect the results of the operation, so few people usually pay attention.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org