Skip to content

Crash in torch.tensor(ndarray, dtype=torch.cuda.float32) #5821

@colesbury

Description

@colesbury
  • OS: Linux
  • PyTorch version: 0.4.0a0+eeb90d9
  • Python version: 3.5

The following segfaults:

import torch
import numpy as np
data = np.array([1.0])
torch.tensor(data, dtype=torch.float32)
torch.tensor(data, dtype=torch.cuda.float32)

The first tensor call with dtype=torch.float32 seems necessary to trigger the crash on the second line.

(Reported by @Balandat)

cc @gchanan

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions