New operator registration MVP (#18161)
authorSebastian Messmer <messmer@fb.com>
Sat, 30 Mar 2019 07:03:43 +0000 (00:03 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 30 Mar 2019 07:07:16 +0000 (00:07 -0700)
commit9abc8a5b47d116342a5c277c62cfce81fd9dd331
tree896ecd6bbe4c8ee828e42a92183832e2064c20fe
parent6095814229b2354d4445bd7083e7d13d37f772aa
New operator registration MVP (#18161)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18161

This introduces version 0 for the new operator registration.

For now, it only works with kernels that are defined as stack-based functions.
This is actually not the intended public API for defining kernels, but it's the basis which is going to be used to define the public APIs (see diffs on top for them),
and it's also the API used for exposing caffe2 operators.

This diff also switches the mechanism for exposing caffe2 operators to the new mechanism.

Reviewed By: dzhulgakov

Differential Revision: D14514231

fbshipit-source-id: 454ab7b5b46a10203aa27b175400d23f818dd1df
aten/src/ATen/core/dispatch/README.md
aten/src/ATen/core/op_registration/base.h [new file with mode: 0644]
aten/src/ATen/core/op_registration/dispatch_key.h [new file with mode: 0644]
aten/src/ATen/core/op_registration/kernel_stackbased.h [new file with mode: 0644]
aten/src/ATen/core/op_registration/kernel_stackbased_test.cpp [new file with mode: 0644]
aten/src/ATen/core/op_registration/op_registration.cpp [new file with mode: 0644]
aten/src/ATen/core/op_registration/op_registration.h [new file with mode: 0644]
aten/src/ATen/core/op_registration/test_helpers.h [new file with mode: 0644]
caffe2/core/c10_operator.h