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

Do NOT expose the concept Executor #9422

Closed
wangkuiyi opened this issue Mar 27, 2018 · 1 comment
Closed

Do NOT expose the concept Executor #9422

wangkuiyi opened this issue Mar 27, 2018 · 1 comment
Labels
User 用于标记用户问题

Comments

@wangkuiyi
Copy link
Collaborator

Fluid was designed a trail towards a new DL programming language. It doesn't make sense for users to write a Python program that calls the Python interpreter. However, this is what we are doing right now:

exe = fluid.Executor(place)

Let us remove the expose of Executor, and follow the design #7464.

@wangkuiyi
Copy link
Collaborator Author

The correct solution is to use the standard package atexit:

  • When we import paddle.fluid, we run the initialization module of Fluid, which should call atexit.register(run_fluid_program).
  • When the Python interpret runs the Fluid application program, it generates a ProgramDesc message.
  • When the application completes, Python calls run_fluid_program, which should call the C++ class Executor run interpret and run the generated ProgramDesc message.

@wangkuiyi wangkuiyi added the User 用于标记用户问题 label Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User 用于标记用户问题
Projects
None yet
Development

No branches or pull requests

2 participants