[fx] give warning instead of fatal the program when submod not found during adding get_attr (#65225)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65225
Currently when create get_attr node, if the attribute is in a submodule, we'll fist find the submodule. If the submodule isn't in the owning module we throw an exception.
However, if the attribute can't be found, we give a warning but still allow to create the get_attr node. To align with this behavior, we change the reaction when submod not found from fatal to giving a warning.
Test Plan: CI
Reviewed By: jamesr66a, jfix71
Differential Revision: D31021535
fbshipit-source-id: 4c0b471448c09cc927d0f47b5bf56594f25a8863