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


##########
python/tvm/te/tensor.py:
##########
@@ -151,11 +141,6 @@ class ComputeOp(BaseComputeOp):
 class ScanOp(Operation):
     """Scan operation."""

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Similar to `BaseComputeOp`, it would be helpful to add a docstring to 
`ScanOp` to clarify that the `scan_axis` attribute is exposed via the FFI. This 
improves discoverability and maintainability.
   
   ```suggestion
   class ScanOp(Operation):
       """Scan operation.
   
       The `scan_axis` attribute is automatically exposed by the FFI.
       """
   ```



##########
python/tvm/te/tensor.py:
##########
@@ -131,16 +131,6 @@ class PlaceholderOp(Operation):
 class BaseComputeOp(Operation):
     """Compute operation."""

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   While removing the broken properties is correct, it would be beneficial for 
code readability and maintainability to add a docstring explaining that `axis` 
and `reduce_axis` are automatically exposed by the FFI, as you mentioned in the 
PR description. This helps future developers understand where these attributes 
come from without having to trace back to the C++ FFI registration.
   
   How about updating the class docstring?
   
   ```suggestion
   class BaseComputeOp(Operation):
       """Compute operation.
   
       The `axis` and `reduce_axis` attributes are automatically exposed by the 
FFI.
       """
   ```



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