srkreddy1238 commented on code in PR #17599:
URL: https://github.com/apache/tvm/pull/17599#discussion_r1930064138


##########
src/script/printer/relax/utils.h:
##########
@@ -141,7 +141,7 @@ inline int FindVDeviceIndexByTargetKind(const VDevice& 
vdevice, const IRDocsifie
   int kind_index = 0;
   for (size_t i = 0; i < vdevices.size(); ++i) {
     auto vdev = Downcast<VDevice>(vdevices[i]);
-    if (vdev.same_as(vdevice)) {
+    if (vdev == vdevice) {

Review Comment:
   @tqchen have made changes to maintain ptr equality for the pass 
(AnnotateCustomMemoryScope). But, we have an issue as detailed below.
   
   The vdevices GlobalInfo is populated from the pass 
(AnnotateCustomMemoryScope). Now, when the mod is printed in python after this 
pass the ptr equality fails, i.e vdevice id printed as -1 ( 
``vdevice="opencl:-1:global"``). Additionally, printing mod just before 
returning ```AnnotateCustomMemoryScope``` or  while in next pass (cpp) works 
fine.
   
   Also, if the vdevices are populated from python (text cases) and accessed in 
cpp seem to be working fine.
   
   Functionally, I can proceed here as further pipeline is in cpp. Pls advice.



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