|
| 1 | +// AUTO-GENERATED by `scripts/generate_torch_ops.py` — DO NOT EDIT. |
| 2 | +#ifndef INFINI_OPS_BASE_MAX_POOL3D_WITH_INDICES_BACKWARD_H_ |
| 3 | +#define INFINI_OPS_BASE_MAX_POOL3D_WITH_INDICES_BACKWARD_H_ |
| 4 | + |
| 5 | +#include "operator.h" |
| 6 | + |
| 7 | +namespace infini::ops { |
| 8 | + |
| 9 | +class MaxPool3dWithIndicesBackward : public Operator<MaxPool3dWithIndicesBackward> { |
| 10 | + public: |
| 11 | + MaxPool3dWithIndicesBackward(const Tensor grad_output, const Tensor input, const std::vector<int64_t> kernel_size, const std::vector<int64_t> stride, const std::vector<int64_t> padding, const std::vector<int64_t> dilation, const bool ceil_mode, const Tensor indices, Tensor grad_input) |
| 12 | + : grad_output_shape_{grad_output.shape()}, |
| 13 | + grad_output_strides_{grad_output.strides()}, |
| 14 | + grad_output_type_{grad_output.dtype()}, |
| 15 | + input_shape_{input.shape()}, |
| 16 | + input_strides_{input.strides()}, |
| 17 | + input_type_{input.dtype()}, |
| 18 | + indices_shape_{indices.shape()}, |
| 19 | + indices_strides_{indices.strides()}, |
| 20 | + indices_type_{indices.dtype()}, |
| 21 | + grad_input_shape_{grad_input.shape()}, |
| 22 | + grad_input_strides_{grad_input.strides()}, |
| 23 | + grad_input_type_{grad_input.dtype()}, |
| 24 | + kernel_size_{kernel_size}, |
| 25 | + stride_{stride}, |
| 26 | + padding_{padding}, |
| 27 | + dilation_{dilation}, |
| 28 | + ceil_mode_{ceil_mode}, |
| 29 | + device_index_{grad_input.device().index()} {} |
| 30 | + |
| 31 | + virtual void operator()(const Tensor grad_output, const Tensor input, const std::vector<int64_t> kernel_size, const std::vector<int64_t> stride, const std::vector<int64_t> padding, const std::vector<int64_t> dilation, const bool ceil_mode, const Tensor indices, Tensor grad_input) const = 0; |
| 32 | + |
| 33 | + protected: |
| 34 | + Tensor::Shape grad_output_shape_; |
| 35 | + |
| 36 | + Tensor::Strides grad_output_strides_; |
| 37 | + |
| 38 | + DataType grad_output_type_; |
| 39 | + |
| 40 | + Tensor::Shape input_shape_; |
| 41 | + |
| 42 | + Tensor::Strides input_strides_; |
| 43 | + |
| 44 | + DataType input_type_; |
| 45 | + |
| 46 | + Tensor::Shape indices_shape_; |
| 47 | + |
| 48 | + Tensor::Strides indices_strides_; |
| 49 | + |
| 50 | + DataType indices_type_; |
| 51 | + |
| 52 | + Tensor::Shape grad_input_shape_; |
| 53 | + |
| 54 | + Tensor::Strides grad_input_strides_; |
| 55 | + |
| 56 | + DataType grad_input_type_; |
| 57 | + |
| 58 | + std::vector<int64_t> kernel_size_{}; |
| 59 | + |
| 60 | + std::vector<int64_t> stride_{}; |
| 61 | + |
| 62 | + std::vector<int64_t> padding_{}; |
| 63 | + |
| 64 | + std::vector<int64_t> dilation_{}; |
| 65 | + |
| 66 | + bool ceil_mode_{}; |
| 67 | + |
| 68 | + int device_index_{0}; |
| 69 | +}; |
| 70 | + |
| 71 | +} // namespace infini::ops |
| 72 | + |
| 73 | +#endif |
0 commit comments