-
Notifications
You must be signed in to change notification settings - Fork 691
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
[BUG] 打开hardsigmoid(nn.functional下)的graph报错(test_functional_hardsigmoid_with_random_data) #7262
Comments
@strint 啸宇哥,这种错误大概是什么原因? |
已经在这个分支修复,你合并下试试: #7254 再打开 ONEFLOW_TEST_VERBOSE 看下 执行状态。 |
我合并之后,这个错误没有了,但是graph result和eager result没有对齐。 |
看下具体哪个case出错了,然后手动复现下 |
错误复现: nn.functional.hardsigmoid在GPU和CPU环境下,inplace版本出现eager和graph不一致的情况,正常版本一致。 进一步判断:nn.functional.hardsigmoid的inplace版本在graph模式下出错。 复现代码:
结果:
|
graph的非Inplace结果也更新下看看 |
这一行,因为是Inplace执行,所以把input给改了,你可以打印下看看。 这个input再给graph时,graph的输入和eager输入已经不一样了。大概率是这个原因。 如果是这个原因,autotest要改下。需要把input deepcopy下。 |
确实是这个原因~ |
问题来源:
在graph模式下跑激活函数的测试,其中nn.functional下的hardsigmoid报错,但是nn.Hardsigmoid()没有报错(可以正常打开graph)。
报错的测试代码:
错误信息:
The text was updated successfully, but these errors were encountered: