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

Merge Supervisor Feature inside the DestroyHandler #5976

Closed
3 tasks
ReyhaneAskari opened this issue May 24, 2017 · 2 comments
Closed
3 tasks

Merge Supervisor Feature inside the DestroyHandler #5976

ReyhaneAskari opened this issue May 24, 2017 · 2 comments

Comments

@ReyhaneAskari
Copy link
Member

After the PR on faster toposort, we can continue to make it faster. In the benchmark, the gpu_elemwise_inplace optimization was still the slowest optimization. This is due to the Supervisor that trigger the building of the complex datastructure needed for toposort and cycle detection. But we don't need that strucuture just for the Supervisor.

  • merge the Supervisor class inside the DestroyHandler. Mostly, add the Supervisor init parameter to DestroyHandler. Then merge the Supervisor.validate() inside the DH.validate. Then make sure all works.
  • In the case of faster topo and when the structure isn't build, we can speed up the computation by not building the structure. So in that case, replace the check by this new check that is a subset of building the structure. First, don't test the fgraph.outputs, as they will always be True with the new check.
  • Then, remove the need for building the complex data structure. The new check will start from the protected variables. Check there clients and all there views. If there is one clients of those variables that is a destroy, the check should fail.
@ReyhaneAskari
Copy link
Member Author

New plan :

  1. start over from the faster topo branch
  2. Modify destroyhandler to add a new fgraph.has_destroyers(list) (as fgraph.destroyers) that will return True is any of the variable in the list have a destroyers. (the old Superviser.validate check without the raise)
  3. Make that new fct do the Superviser.validate check when self.algo = cycle.
  4. Make sure all tests still pass
  5. Modify the new method to be faster (don't build the big data structure) when the algo is fast.

@nouiz
Copy link
Member

nouiz commented Aug 15, 2017

The changes needed where done in gh-6000

@nouiz nouiz closed this as completed Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants