Skip to content

Pytorch bilinear interpolate wrong result #482

@NicerWang

Description

@NicerWang

Problem

in_cpu = torch.rand((1, 32, 512, 512), device='cpu', dtype=torch.float32)
in_dml = torch.tensor(in_cpu, device=torch_directml.device())

out_cpu = F.interpolate(in_cpu, scale_factor=2, mode='bilinear')
out_dml = F.interpolate(in_dml, scale_factor=2, mode='bilinear')

out_cpu and out_dml is not the same, and have a great difference:

image

The problem may relate to operator upsample_bilinear2d.

Versions

torch 2.0.0
torch-directml 0.2.0.dev230426
torchvision 0.15.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    pytorch-directmlIssues in PyTorch when using its DirectML backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions