| शीर्षक | pytorch pytorch (in torch.jit.jit_module_from_flatbuffer) torch 2.6.0 Memory Leak |
|---|
| विवरण | I encountered a Segmentation fault when running a simple PyTorch script that uses torch.jit.script along with Flatbuffer serialization. The issue occurs when loading the saved model from the Flatbuffer file and passing an input tensor to it.
# Code to Reproduce
```
import torch
from torch import nn
simple_model = nn.Sequential(
nn.Linear(10, 20),
nn.BatchNorm2d(5),
nn.ReLU()
)
scripted_model = torch.jit.script(simple_model)
torch.jit.save_jit_module_to_flatbuffer(scripted_model, 'model.ff')
loaded_model = torch.jit.jit_module_from_flatbuffer('model.ff')
sample_input = torch.rand(1, 5, 3, 10)
_ = loaded_model(sample_input)
```
|
|---|
| स्रोत | ⚠️ https://github.com/pytorch/pytorch/issues/149800 |
|---|
| उपयोगकर्ता | Default436352 (UID 81891) |
|---|
| सबमिशन | 22/03/2025 10:08 AM (2 साल पहले) |
|---|
| संयम | 02/04/2025 03:35 PM (11 days later) |
|---|
| स्थिति | स्वीकृत |
|---|
| VulDB प्रविष्टि | 303012 [PyTorch 2.6.0 torch.jit.jit_module_from_flatbuffer बफ़र ओवरफ़्लो] |
|---|
| अंक | 20 |
|---|