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/09/02 04:27:56 UTC

[GitHub] [tvm] cxx122 commented on issue #12569: [Bug] no divide by zero report while te.floordiv(a, b-b)

cxx122 commented on issue #12569:
URL: https://github.com/apache/tvm/issues/12569#issuecomment-1235054211

   > If that's the case, that seems we need to check the generated code. Because normally if the generated code remains the semantic of div by zero, it should raise a floating-point exception.
   
   Here is the generated code I got from this program, seems to be a problem with T_subtract().
   ```
   primfn(TENSOR_0_1: handle, TENSOR_1_1: handle, TENSOR_2_1: handle) -> ()
     attr = {"from_legacy_te_schedule": True, "global_symbol": "main", "tir.noalias": True}
     buffers = {TENSOR_2: Buffer(TENSOR_2_2: Pointer(int8), int8, [5], []),
                TENSOR_0: Buffer(TENSOR_0_2: Pointer(int8), int8, [], []),
                TENSOR_1: Buffer(TENSOR_1_2: Pointer(int8), int8, [], [])}
     buffer_map = {TENSOR_0_1: TENSOR_0, TENSOR_1_1: TENSOR_1, TENSOR_2_1: TENSOR_2} {
     allocate(T_subtract: Pointer(global int8), int8, [1]), storage_scope = global {
       T_subtract[0] = ((int8*)TENSOR_0_2[0] - (int8*)TENSOR_0_2[0])
       for (fcc: int32, 0, 5) {
         TENSOR_2_2[fcc] = floordiv((int8*)TENSOR_1_2[0], (int8*)T_subtract[0])
       }
     }
   }
   ```


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