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

autotest_add_graph_log #7126

Merged
merged 3 commits into from
Dec 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def GetDualObject(name, pytorch, oneflow):
"__str__",
"__repr__",
]
verbose = os.getenv("ONEFLOW_TEST_VERBOSE") is not None
pytorch_methods = dir(pytorch)
if hasattr(pytorch, "__call__") and "__call__" not in pytorch_methods:
pytorch_methods.append("__call__")
Expand Down Expand Up @@ -291,6 +292,9 @@ def build(self, *args):
return self.test_module(*args)

test_g = TestGraphOfModule()
if verbose:
print("Run graph of module: ", repr(oneflow))
test_g.debug(2)
test_g_res = test_g(*oneflow_args)
elif oneflow.__name__ in ignore_apis_list:
find_check_module_func = False
Expand All @@ -317,6 +321,9 @@ def build(self):
)

test_g = TestGraphOfFunctional()
if verbose:
print("Run graph of function: ", oneflow)
test_g.debug(2)
test_g_res = test_g()
if find_check_module_func:
if isinstance(test_g_res, tuple):
Expand Down Expand Up @@ -373,6 +380,9 @@ def build(self):
)

test_g = TestGraphOfTensorMethod()
if verbose:
print("Run graph of method: ", oneflow_method)
test_g.debug(2)
test_g_res = test_g()
if isinstance(test_g_res, tuple):
for idx, g_res in enumerate(test_g_res):
Expand Down