-
Notifications
You must be signed in to change notification settings - Fork 332
Description
I found that the Instance segmentation result is not correct when running the official maskrcnn sample in this library. The reason looks like the torch.nn.functional.pad function is not working properly. I made a simple test to reproduce this error. The code shows as below:
import torch
import torch_directml
tensor = torch.tensor([[[[1]]]])
tensor_pad = torch.nn.functional.pad(tensor, (1,) * 4)
tensor_pad_dml = torch.nn.functional.pad(tensor.to(torch_directml.device(0)), (1,) * 4)
And the result shows as follows:

It looks like when run torch.nn.functional.pad function in dml device, the result becomes a tensor of all zeros. I run this test in both amd rx480 and Intel Iris Plus Graphics, the result is same. Does torch_directml support torch.nn.functional.pad function?
Environment
Python 3.8.10
torch 1.13.1
torch-directml 0.1.13.1.dev230119
AMD Radeon RX 480
AMD Software: Adrenalin Edition 22.11.2