Skip to content

AttributeError: module 'torch.version' has no attribute 'xpu' #163

@zheliuyu

Description

@zheliuyu

Using kernels on XPU with torch<=2.6.0 causes an error. We can upgrade torch to fix it.

On torch==2.5.1
Image

On torch==2.6.0

Image

Perhaps we should consider an alternative approach to retrieve the torch version when using kernels on XPU. (Relevant code: https://github.com/huggingface/kernels/blob/main/src/kernels/utils.py#L57-L59)

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