Unfold2d.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. #pragma once
  3. #include <ATen/native/DispatchStub.h>
  4. #include <c10/core/ScalarType.h>
  5. #include <cstdint>
  6. namespace at::native {
  7. using unfold2d_copy_fn = void (*)(
  8. ScalarType dtype,
  9. void *finput,
  10. const void *input,
  11. int64_t kH,
  12. int64_t kW,
  13. int64_t dH,
  14. int64_t dW,
  15. int64_t padH,
  16. int64_t padW,
  17. int64_t n_input_plane,
  18. int64_t input_height,
  19. int64_t input_width,
  20. int64_t output_height,
  21. int64_t output_width,
  22. bool is_channels_last
  23. );
  24. using unfold2d_acc_fn = void (*)(
  25. ScalarType dtype,
  26. void *finput,
  27. void *input,
  28. int64_t kH,
  29. int64_t kW,
  30. int64_t dH,
  31. int64_t dW,
  32. int64_t padH,
  33. int64_t padW,
  34. int64_t n_input_plane,
  35. int64_t input_height,
  36. int64_t input_width,
  37. int64_t output_height,
  38. int64_t output_width,
  39. bool is_channels_last
  40. );
  41. DECLARE_DISPATCH(unfold2d_copy_fn, unfolded2d_copy_stub)
  42. DECLARE_DISPATCH(unfold2d_acc_fn, unfolded2d_acc_stub)
  43. } // namespace at::native
  44. #else
  45. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  46. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)