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

Segmentation Fault When Using Decord and TorchVision Together #329

Open
johannukrow opened this issue Dec 5, 2024 · 2 comments
Open

Segmentation Fault When Using Decord and TorchVision Together #329

johannukrow opened this issue Dec 5, 2024 · 2 comments

Comments

@johannukrow
Copy link

First of all, I'd like to express my admiration for this project! It’s been incredibly helpful in my work, and I truly appreciate all the effort that has gone into building and maintaining it.
However, I’ve encountered an issue that seems to indicate an incompatibility between decord and torchvision. Here’s a minimal reproducible example:

from decord import VideoReader
from torchvision import models

models.segmentation.fcn_resnet50().cuda()

Error Encountered:

Segmentation fault (core dumped)

Environment Details:

torch: 2.3.1
torchmetrics: 1.6.0
torchvision: 0.18.1
decord: 0.6.0
Python: 3.11.10
@cryonox
Copy link

cryonox commented Dec 15, 2024

maybe try swiching the import order. I found sometimes it work. like this, instead of importing decord first.

from torchvision import models
from decord import VideoReader

@ziyannchen
Copy link

ziyannchen commented Dec 30, 2024

Replicated the same error just using simple codes here

import os
import decord
import torch

device = torch.device('cuda')
mean_tensor = torch.tensor([[[[104.]], [[117.]], [[123.]]]], device=device)
print(mean_tensor)

Running the script got sgementation fault (core dumped) error.
Just comment import decord or switch import torch before import decord, the error will be gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants