Skip to content
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

dipu mock了 to/empty 等方法,替换为 GetDeviceProxy(xxx),GetDeviceProxy 在 dynamo中trace 会报错。 #261

Open
hellobuilder opened this issue Aug 22, 2023 · 1 comment

Comments

@hellobuilder
Copy link

mock代码:https://github.com/DeepLink-org/DIPU/blob/main/torch_dipu/__init__.py
需求来自唐知毅。

@tangzhiyi11
Copy link
Collaborator

tangzhiyi11 commented Sep 12, 2023

pytorch 主分支已经修复了这个问题,pr: pytorch/pytorch#108116


image
pytorch/torch/_dynamo/variables/torch.py
大概可能的原因是 GetDeviceProxy 里 isinstance 函数的一个参数为 torch.device 的 object,而在dynamo 中,会先把torch.device object 转换为 TorchVariable,但是dynamo里获取python type时候,不支持 torch.device 的object,导致报错,加上之后报错解决。后续需要看下怎么改

LeungChiNan pushed a commit to DeepLink-org/deeplink.framework.dev that referenced this issue Dec 8, 2023
* add_conv_transpose2d
---------

Co-authored-by: duanxiang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants