1#ifndef INFINI_OPS_BASE_ZEROS_INFINILM_H_
2#define INFINI_OPS_BASE_ZEROS_INFINILM_H_
13 "Migrate to an open-source-aligned operator when available.")]]
17 : input_shape_{input.shape()},
18 input_strides_{input.strides()},
19 input_type_{input.dtype()},
20 out_shape_{out.shape()},
21 out_strides_{out.strides()},
22 out_type_{out.dtype()},
23 output_size_{out.numel()},
25 is_out_contiguous_{out.IsContiguous()},
26 device_index_{out.device().index()} {
27 assert(input_shape_ == out_shape_ &&
28 "`ZerosInfinilm` input and output shapes must match");
29 assert(input_type_ == out_type_ &&
30 "`ZerosInfinilm` input and output dtypes must match");
31 assert(!out.HasBroadcastDim() &&
32 "`ZerosInfinilm` output must not have broadcasted dimensions");
50 Tensor::Size output_size_{0};
52 Tensor::Size ndim_{0};
54 bool is_out_contiguous_{
false};
Definition generated/include/operator.h:282
Definition zeros_infinilm.h:14
DataType out_type_
Definition zeros_infinilm.h:48
Tensor::Strides input_strides_
Definition zeros_infinilm.h:40
Tensor::Shape input_shape_
Definition zeros_infinilm.h:38
ZerosInfinilm(const Tensor input, Tensor out)
Definition zeros_infinilm.h:16
DataType input_type_
Definition zeros_infinilm.h:42
Tensor::Strides out_strides_
Definition zeros_infinilm.h:46
Tensor::Shape out_shape_
Definition zeros_infinilm.h:44
virtual void operator()(const Tensor input, Tensor out) const =0
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8