Skip to content

RuntimeError: unsupported Storage type for xpu tensor #158

Closed
@leonardozcm

Description

@leonardozcm

hi, when I attempt to store my xpu tensor in my code like:

import torch
import torch.nn as nn

# Import Extension
import intel_pytorch_extension as ipex

class Model(nn.Module):
    def __init__(self):
        super(Model, self).__init__()
        self.linear = nn.Linear(4, 5)

    def forward(self, input):
        return self.linear(input)

# Convert the input tensor to the Extension device
input = torch.randn(2, 4).to(ipex.DEVICE)
# Convert the model to the Extension device
model = Model().to(ipex.DEVICE)

res = model(input)

# print(res.cpu())
res.storage()

it will rasie RuntimeError:

RuntimeError: unsupported Storage type

I realized this may related to #35 , i wonder is there any new progress or how can i avoid it? thanks a lot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions