HGboda opened a new issue, #17742:
URL: https://github.com/apache/tvm/issues/17742

   Thanks for participating in the TVM community! We use https://discuss.tvm.ai 
for any general usage questions and discussions. The issue tracker is used for 
actionable items such as feature proposals discussion, roadmaps, and bug 
tracking.  You are always welcomed to post on the forum first :smile_cat:
   
   Issues that are inactive for a period of time may get closed. We adopt this 
policy so that we won't lose track of actionable issues that may fall at the 
bottom of the pile. Feel free to reopen a new one if you feel there is an 
additional problem that needs attention when an old one gets closed.
   
   ### Expected behavior
   
   The OpenCL example in the cross-compilation and RPC tutorial should use the 
correct variable names and properly bind loops to GPU thread hierarchy. 
Specifically, after getting the loop variable x and splitting it into xo and 
xi, the code should use these variables correctly in subsequent operations.
   
   ### Actual behavior
   
   The tutorial code contains variable name errors and incorrect loop binding:
   
   Line 237 uses an undefined variable i in sch.split(i, [None, 32]) instead of 
using the previously defined variable x.
   Lines 238-239 incorrectly bind the same variable x to both "blockIdx.x" and 
"threadIdx.x", instead of binding the outer loop xo to "blockIdx.x" and the 
inner loop xi to "threadIdx.x".
   
   ### Environment
   
   TVM from GitHub repository (latest main branch)
   Operating System: Linux
   
   ### Steps to reproduce
   
   Open the tutorial file at docs/how_to/tutorials/cross_compilation_and_rpc.py
   Look at the run_opencl() function around line 236-239:
   
   (x,) = sch.get_loops(block=sch.get_block("B"))
   xo, xi = sch.split(i, [None, 32])  # Error: 'i' is undefined
   sch.bind(x, "blockIdx.x")          # Error: should use 'xo'
   sch.bind(x, "threadIdx.x")         # Error: should use 'xi'
   
   ### Triage
   
   Please refer to the list of label tags 
[here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the 
relevant tags and add them below in a bullet format (example below).
   
   * needs-triage
   


-- 
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: [email protected]

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

Reply via email to