question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use pytorch-directml in torch.nn?

See original GitHub issue

I try to use torch.nn.moudle().to("dml"), but there is a problem in my forward function, its said “RuntimeError: bad optional access”, I dont know how it happened.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
Lee-lithiumcommented, Jan 19, 2022

I get some issue on torch.nn aten::replication_pad2d,
I guess this modules also not implemented yet?

RuntimeError: Could not run ‘aten::replication_pad2d’ with arguments from the ‘UNKNOWN_TENSOR_TYPE_ID’ backend. This could be because the operator doesn’t exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. ‘aten::replication_pad2d’ is only available for these backends: [CPU, BackendSelect, Named, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradNestedTensor, UNKNOWN_TENSOR_TYPE_ID, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, Tracer, Autocast, Batched, VmapMode].

Version: pytorch-directml 1.8.0a0.dev211021, python 3.8 System: Windows 10 19042.1415, AMD rx580 8GB

0reactions
Adele101commented, Mar 8, 2022

Thanks for your submission! We are actively adding new operator support to PyTorch-DML, so thank you for your patience and being one of our early users. Please visit the PyTorch-DirectML Operator Roadmap for guidance on current and future support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enable PyTorch with DirectML on Windows
There are many tools that you can use to set up a virtual Python environment—for these ... Install PyTorch and the Torch-DirectML Plugin....
Read more >
pytorch-directml
PyTorch is a Python package that provides two high-level features: Tensor computation (like NumPy) with strong GPU acceleration; Deep neural networks built ...
Read more >
Use DirectML to train PyTorch machine learning models on ...
Microsoft's new tool makes it possible to use your own GPU to work with popular machine learning platforms.
Read more >
Pytorch Direct ML for non-Nvidia GPUs on Windows
Theoretically, you'll be able to use the GPU on Windows with DirectX12 by selecting this backend. This may open up more ways to...
Read more >
Saving and loading models across devices in PyTorch
1. Import necessary libraries for loading our data. For this recipe, we will use torch and its subsidiaries torch.nn ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found