You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "MasterJH5574 (via GitHub)" <gi...@apache.org> on 2026/06/28 22:24:29 UTC

[PR] [Relax] Fix int64 row index cast in GPU multinomial sampling [tvm]

MasterJH5574 opened a new pull request, #19902:
URL: https://github.com/apache/tvm/pull/19902

   After the tirx refactor, a `T.let` binding no longer implicitly casts
   its right-hand side to the annotated dtype. In
   `gpu_multinomial_from_uniform`, `row_idx` is annotated `int64` but is
   loaded from the `row_indices` buffer, whose dtype is the configurable
   `sample_indices_dtype` and may be `int32`. Relying on the let annotation
   to widen the value is no longer valid and yields a dtype mismatch.
   
   Wrap the load in an explicit `T.Cast("int64", ...)` so the row index is
   always converted to the annotated int64 type regardless of
   `sample_indices_dtype`.


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org