gemini-code-assist[bot] commented on code in PR #18757:
URL: https://github.com/apache/tvm/pull/18757#discussion_r2794940426


##########
python/tvm/s_tir/sblock_dependence_info.py:
##########
@@ -60,8 +60,8 @@ def get_sref(self, block: SBlock) -> Optional[StmtSRef]:
 
         Parameters
         ----------
-        stmt : Block
-            The block for which the sref is to be retrived
+        block : SBlock
+            The block for which the sref is to be retrieved

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Thanks for fixing the docstring. For completeness, it would be helpful to 
also clarify what is returned when the block is not found, since the function 
signature suggests it returns `None` in that case.



##########
docker/bash.sh:
##########
@@ -323,7 +323,8 @@ fi
 if [[ ${COMMAND[@]+"${COMMAND[@]}"} = bash ]]; then
     INTERACTIVE=true
     TTY=true
-    USE_NET_HOST=true
+    # default to net host off unless --net=host is explicitly set
+    USE_NET_HOST=false

Review Comment:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   This change introduces a bug where `USE_NET_HOST` is always set to `false` 
for interactive `bash` sessions, even when `--net=host` is explicitly passed. 
This contradicts the intention described in the comment.
   
   To fix this, you can remove these lines. This will make interactive `bash` 
sessions behave like any other command regarding network settings: `--net=host` 
will be disabled by default (as `USE_NET_HOST` is initialized to `false`), but 
can be enabled by passing the `--net=host` flag. This is simpler and achieves 
the desired behavior.



##########
python/tvm/s_tir/sblock_dependence_info.py:
##########
@@ -80,7 +80,7 @@ def get_sblock_scope(self, block_sref: StmtSRef) -> 
SBlockScope:
 
         Returns
         -------
-        scope : StmtSRef
+        scope : SBlockScope

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Thanks for fixing the return type. It would also be helpful to clarify the 
behavior when the `block_sref` is not found. Based on the implementation, it 
seems an error is raised. Documenting this would be valuable for users.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to