Oneflow-Inc / one-fx

A toolkit for developers to simplify the transformation of nn.Module instances. It's now corresponding to Pytorch.fx.
Other
13 stars 1 forks source link

无法对类型转换这种情况进行wrap #4

Closed AsakusaRinne closed 1 year ago

AsakusaRinne commented 1 year ago

例如,forward代码中出现y = int(x)这种写法,在外部无论是对int还是int.__new__进行wrap,都不能正常代理。

BBuf commented 1 year ago

pytorch可以正常代理这种情况么

AsakusaRinne commented 1 year ago

这个后来发现其实pytorch.fx和one-fx都是可以代理这个的,当时其实是因为fx.wrap没有写在模型所在的模块这里,我误以为是int类型没法wrap,我把这个issue先关一下。