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/02/21 18:35:59 UTC

[GitHub] [tvm] spectrometerHBH edited a comment on pull request #10336: [BUGFIX][ARITH] Fix FloorMod Simplifier

spectrometerHBH edited a comment on pull request #10336:
URL: https://github.com/apache/tvm/pull/10336#issuecomment-1047143198


   Thanks for the catch!
   
   I think the comment in Line 987 is wrong
   ```
   //  (x / c1) % c2  =>  (x % (c1 * c2)) / c2
   ```
   should be
   ```
   //  (x / c1) % c2  =>  (x % (c1 * c2)) / c1
   ```
   
   And for this SplitModConst, the rationale should be
   ```
   (index % upper) / lower * scale % cval, given cval = scaled_cval * scale
   = (index % upper) / lower % scaled_cval * scale
   = (index % upper) % (new_upper_factor) / lower * scale
   ```
   
   Would you mind helping fix the comments in this PR to make it clearer?


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