-
Notifications
You must be signed in to change notification settings - Fork 658
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
oneflow backend 对接 torch compile ,运行 faster rcnn #10438
Comments
首先遇到第一大问题,oneflow 编译前端传递的计算图失败了
通过调试发现,原因是
在 torch 模型转 oneflow 模型的过程中,对 |
然后出现了另外一个问题,在编译完成后,模型推理过程中,产生了 conv TypeError 如下:
经过检查发现这个 conv 是一个普通的 torch.nn.Conv2d, 打印 stride ,padding ,dialtion 都是正常的,并且同样形式的 conv 在前面可以通过检查,
这个问题卡了很久,依然没有头绪。。. |
This comment was marked as off-topic.
This comment was marked as off-topic.
经过调试发现,原来是 oneflow backend 在处理输出时,将 oneflow.Tensor 转为 torch.Tensor 的过程中漏判了输出为 flow._oneflow_internal.TensorTuple 的情况,导致将 oneflow.Tensor 传入 torch 执行导致了错误。通过添加对 flow._oneflow_internal.TensorTuple 的处理解决了这个问题。现在 faster rcnn 在关闭动态 shape 的情况下能跑通了。 |
这个报出的错误看起来和产生的原因差的有点远,后面在提PR修这个问题的时候,check一下如果不是tensor/tuple/将要增加的dict类型的话就显式抛出一个异常以便于完善 |
好的,我给添加一下。 |
Description
记录开发调试过程和遇到的问题。
The text was updated successfully, but these errors were encountered: