New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get available devices and set a specific device in Pytorch-DML? #165
Comments
I got the same issue here. Yet their examples work. Once I import the same things as the examples, I can use DML but none of my models appear to be supported. I usually have to freeze the model first so it can run it but I still get: I decided to dive in to their headers to figure out more since they have exposed almost nothing to Python.
|
I'm also getting same errors
|
Hi, We are currently actively developing the next pre-release version of PyTorch-DML, in which we will investigate and fix these issues. We will update you when with more details on the next pre-release shortly. |
Hi, definitely looking forward to more features/DML porting, I've got a similar issue with this new 'Ruclip/RuDalle' AI/ML software for generating photos. Basically, device type DML has the Unknown Tensor Type ID for a few of these PyTorch functions: Traceback (most recent call last): RuntimeError: Could not run 'aten::tril.out' 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::tril.out' 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]. CPU: registered at D:\a_work\1\s\build\aten\src\ATen\RegisterCPU.cpp:5926 [kernel] |
Thank you for reporting these issues. The new release of PyTorch-DirectML has support for selecting a specific device. Check it out here: https://pypi.org/project/pytorch-directml/ |
@Adele101 Thanks, but not all the issues are fixed. such as the line RuntimeError: Could not run 'aten::normal_' 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::normal_' 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]. Could we get a changelog of whats changed/fixed? |
For me,
The package is the latest version |
Hi, please try out masked_select in the latest prerelease: https://pypi.org/project/pytorch-directml/1.8.0a0.dev220506/ I am not sure why the to aten function is failing to move your tensor to directml given the information provided, but please make sure that torch has been uninstalled and pytorch-directml is listed in your environment. Can you share a list of packages in your environment? |
Is there a reason the latest pre-release is 4 versions behind the current torch pre-release? |
Hi, sorry for the inconvenience. normal_ is not implemented yet. |
The current version of pytorch-directml is snapped to PyTorch 1.8, but we understand the pain here given the drift caused by rapid progress and updates made to Torch. We are working on a solution to address this problem. |
Hi,
For accessing available devices in Pytorch we'd normally do :
However, I noticed this fails (
AssertionError: Torch not compiled with CUDA enabled
).I thought the transition would be minimal, and stuff like this would work out of the box! especially so, after noting we cant write:
as it fails with the error :
Apart from this, trying to specify a device using the form "dml:number" fails if number>1!
that is this fails for "dml:1":
it outputs :
and thats it, it doesnt execute when it comes to "dml:1".
also trying to do :
Fails with the following error :
The text was updated successfully, but these errors were encountered: