DispatchKeyFunctions_inl.h 824 B

12345678910111213141516171819202122
  1. #pragma once
  2. // ${generated_comment}
  3. // NB: The implementing C++ file is RegisterDispatchKey.cpp
  4. // The only #includes we need are for custom classes that have defaults in the C++ API
  5. #include <c10/core/MemoryFormat.h>
  6. #include <c10/core/Scalar.h>
  7. #include <ATen/core/Reduction.h>
  8. #if defined(AT_PER_OPERATOR_HEADERS) && defined(TORCH_ASSERT_ONLY_METHOD_OPERATORS)
  9. #error This change adds a dependency on all pytorch operators, meaning the \
  10. file will need to be re-compiled every time an operator is changed or added. \
  11. Consider including a specific operator from \
  12. <ATen/ops/{my_operator}_${dispatch_namespace}_dispatch.h>. \
  13. See NOTE [TORCH_ASSERT_ONLY_METHOD_OPERATORS].
  14. #endif
  15. ${DispatchKeyFunctions_inl_includes}
  16. ${dispatch_namespaced_declarations}