Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LayerNormalization without bias throws segfault #18967

Closed
ex3ndr opened this issue Dec 31, 2023 · 1 comment
Closed

LayerNormalization without bias throws segfault #18967

ex3ndr opened this issue Dec 31, 2023 · 1 comment
Labels
ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider

Comments

@ex3ndr
Copy link

ex3ndr commented Dec 31, 2023

Describe the issue

LayerNormalization without bias throws segfault after exporting from PyTorch, all tools report correct graphs and it looks like the bug is in runtime

To reproduce

import torch
from torch import nn
class ONNXBug(nn.Module):
    def __init__(self):
        super().__init__()
        self.ln = nn.LayerNorm(10, bias=False)
    def forward(self, x):
        return self.ln(x)
model = ONNXBug()
dummy = torch.zeros(10).unsqueeze(0)
torch.onnx.export(model, dummy, "test.onnx", export_params=True, input_names = ['input'], output_names = ['output'])
import onnxruntime as rt
sess = rt.InferenceSession("./test.onnx")

Urgency

No response

Platform

Mac

OS Version

14.2.1

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

I have tried most recent versions starting from 1.15

ONNX Runtime API

Python

Architecture

X64

Execution Provider

Default CPU, CUDA, TensorRT

Execution Provider Library Version

12.1

@github-actions github-actions bot added ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider labels Dec 31, 2023
@wschin
Copy link
Contributor

wschin commented Jan 3, 2024

This should have fixed in latest main commit. I run you script and hit no error. Please install nightly from https://onnxruntime.ai/docs/install/. Please feel free to re-open if the error still exists.

@wschin wschin closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ep:CUDA issues related to the CUDA execution provider ep:TensorRT issues related to TensorRT execution provider
Projects
None yet
Development

No branches or pull requests

2 participants