You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "MarcelDudek (via GitHub)" <gi...@apache.org> on 2025/08/27 12:47:20 UTC
[I] [Bug] Relax softplus op numerically unstable when loading from ONNX model [tvm]
MarcelDudek opened a new issue, #18241:
URL: https://github.com/apache/tvm/issues/18241
Hi,
I've stumbled upon an issue with relax onnx frontend, when working on a model containing softplus layers which are fed tensors with quite large values. After quick investigation it turns out that current onnx frontend is using "naive" softplus implementation which is numerically unstable.
### Expected behavior
Softplus operator should output numerically stable output for large inputs (e.g. > 200.0 for float32).
### Actual behavior
Currently for large inputs softplus produces inf value.
### Environment
Ubuntu 24.04, TVM main branch, conda enviroment as per "install from source" guide
### Steps to reproduce
Simple one softplus layer ONNX model, which can be exported from this PyTorch model:
```Python
import torch
import torch.nn as nn
class SoftplusModel(nn.Module):
def __init__(self):
super(SoftplusModel, self).__init__()
self.softplus = nn.Softplus()
def forward(self, x):
return self.softplus(x)
```
produces TVM model which is numerically unstable for large inputs.
### Triage
* needs-triage
* frontend:onnx
--
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: commits-unsubscribe@tvm.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Relax softplus op numerically unstable when loading from ONNX model [tvm]
Posted by "tlopex (via GitHub)" <gi...@apache.org>.
tlopex commented on issue #18241:
URL: https://github.com/apache/tvm/issues/18241#issuecomment-3331291357
Closed as resolved.
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] Relax softplus op numerically unstable when loading from ONNX model [tvm]
Posted by "tlopex (via GitHub)" <gi...@apache.org>.
tlopex closed issue #18241: [Bug] Relax softplus op numerically unstable when loading from ONNX model
URL: https://github.com/apache/tvm/issues/18241
--
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org