I have a custom op for which I implemented a cuda kernel (following the instructions in https://pytorch.org/tutorials/advanced/cpp_extension.html 4).
Now I want to have a CPU implementation of the same op:

The tutorial shows how to call methods of Tensor from c++, but my op cannot be decomposed into built-in functions (need the equivalent of a cuda kernel on cpu).
Can I still use tensor.packed_accessor<...>() and AT_DISPATCH_FLOATING_TYPES, and then just call my own c++ function instead of invoking a cuda kernel?
Are there any macros/helper functions for vectorization / multi-threading? or should i just use OpenMP or similar myself?
Any other docs, resources, or examples in the codebase that would be helpful?