Skip to content

Commit

Permalink
Fixed Python-C AutoCodeGen issues (#39897)
Browse files Browse the repository at this point in the history
  • Loading branch information
jim19930609 authored Feb 25, 2022
1 parent b8cf8ca commit b56ac35
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def GeneratePythonCFunction(fwd_api_name, forward_inputs_position_map,
fwd_api_name, fwd_api_name, get_eager_tensor_str, parse_attributes_str,
GetForwardFunctionName(fwd_api_name), dygraph_function_call_str)

python_c_function_reg_str = f"{{\"final_state_{fwd_api_name}\", (PyCFunction)(void(*)(void))eager_final_state_api_{fwd_api_name}, METH_VARARGS | METH_KEYWORDS, \"C++ interface function for {fwd_api_name} in dygraph.\"}},\n"
python_c_function_reg_str = f"{{\"final_state_{fwd_api_name}\", (PyCFunction)(void(*)(void))eager_final_state_api_{fwd_api_name}, METH_VARARGS | METH_KEYWORDS, \"C++ interface function for {fwd_api_name} in dygraph.\"}}\n"

return python_c_function_str, python_c_function_reg_str

Expand Down Expand Up @@ -197,7 +197,7 @@ def GenerateCoreOpsInfoMap():
"""

core_ops_infos_registry = """
{\"get_final_state_core_ops_args_info\",
,{\"get_final_state_core_ops_args_info\",
(PyCFunction)(void(*)(void))eager_get_final_state_core_ops_args_info, METH_NOARGS,
\"C++ interface function for eager_get_final_state_core_ops_args_info.\"},
{\"get_final_state_core_ops_args_type_info\",
Expand Down

0 comments on commit b56ac35

Please sign in to comment.