Skip to content

Add a CPU Fuser (single core)#3961

Merged
zdevito merged 3 commits intopytorch:masterfrom
zdevito:pr/cpu_fuser
Dec 4, 2017
Merged

Add a CPU Fuser (single core)#3961
zdevito merged 3 commits intopytorch:masterfrom
zdevito:pr/cpu_fuser

Conversation

@zdevito
Copy link
Contributor

@zdevito zdevito commented Dec 1, 2017

This adds a simple fusion backend for the CPU.

  • Refactors CompiledFusionFunction to have two subclasses that handle
    the compilation details of each backend.
  • emit-compile-link-run cycle for the CPU
  • simple single core loop to run the operation
  • lift CUDA-only restrictions in the fuser, checks that fusion groups
    are only on a single backend.

Perf tests need to be done to see if this is a lot slower than current CPU maps.
We need some reasonable way to do threading for parallelization (pthreads, tbb, openmp, etc.), but that can be a different commit.

@pytorchbot
Copy link
Collaborator

@zdevito, thanks for your PR! We identified @zdevito to be a potential reviewer.

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweeeeeeet

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@zdevito
Copy link
Contributor Author

zdevito commented Dec 1, 2017

@pytorchbot retest this please

Copy link
Contributor

@apaszke apaszke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I added a few minor comments, but feel free to ignore them.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This adds a simple fusion backend for the CPU.
* Refactors CompiledFusionFunction to have two subclasses that handle
  the compilation details of each backend.
* emit-compile-link-run cycle for the CPU
* simple single core loop to run the operation
* lift CUDA-only restrictions in the fuser, checks that fusion groups
  are only on a single backend.
Relax the amount of file syncing for cpp file.
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

Successfully merging this pull request may close these issues.

4 participants