Deivanayaki-S commented on code in PR #17918:
URL: https://github.com/apache/tvm/pull/17918#discussion_r2080869607


##########
python/tvm/relax/frontend/torch/fx_translator.py:
##########
@@ -639,9 +639,7 @@ def create_convert_map(
             nn.LogSoftmax: self._log_softmax_module,
             nn.PReLU: self._prelu_module,
             nn.ReLU: self._unary_op(relax.op.nn.relu),
-            nn.ReLU6: lambda node: self.block_builder.emit(
-                relax.op.clip(self.env[node.args[0]], 0, 6)
-            ),
+            nn.ReLU6: self._unary_op(relax.op.nn.relu6),

Review Comment:
   @Hzfengsy Since the current clip mapping only handled the FX translator’s 
nn.ReLU6, it left other mappings (relu6.default, relu6_.default, and 
functional.relu6 in FX) unaddressed. Therefore, I added ReLU6 as a Relax op to 
unify the implementation.



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