InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
qr.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_QR_H_
2#define INFINI_OPS_BASE_QR_H_
3
4#include "operator.h"
5
6namespace infini::ops {
7
8class Qr : public Operator<Qr> {
9 public:
10 Qr(const Tensor input, const bool some, Tensor Q, Tensor R)
11 : input_shape_{input.shape()},
12 input_strides_{input.strides()},
13 input_type_{input.dtype()},
14 Q_shape_{Q.shape()},
15 Q_strides_{Q.strides()},
16 Q_type_{Q.dtype()},
17 R_shape_{R.shape()},
18 R_strides_{R.strides()},
19 R_type_{R.dtype()},
20 some_{some},
21 device_index_{Q.device().index()} {}
22
23 virtual void operator()(const Tensor input, const bool some, Tensor Q,
24 Tensor R) const = 0;
25
26 protected:
27 Tensor::Shape input_shape_;
28
29 Tensor::Strides input_strides_;
30
31 DataType input_type_;
32
33 Tensor::Shape Q_shape_;
34
35 Tensor::Strides Q_strides_;
36
37 DataType Q_type_;
38
39 Tensor::Shape R_shape_;
40
41 Tensor::Strides R_strides_;
42
43 DataType R_type_;
44
45 bool some_{};
46
48};
49
50} // namespace infini::ops
51
52#endif
Definition generated/include/operator.h:282
Definition qr.h:8
int device_index_
Definition qr.h:47
Qr(const Tensor input, const bool some, Tensor Q, Tensor R)
Definition qr.h:10
Tensor::Shape Q_shape_
Definition qr.h:33
Tensor::Strides R_strides_
Definition qr.h:41
DataType Q_type_
Definition qr.h:37
Tensor::Shape R_shape_
Definition qr.h:39
Tensor::Shape input_shape_
Definition qr.h:27
DataType input_type_
Definition qr.h:31
virtual void operator()(const Tensor input, const bool some, Tensor Q, Tensor R) const =0
Tensor::Strides input_strides_
Definition qr.h:29
DataType R_type_
Definition qr.h:43
Tensor::Strides Q_strides_
Definition qr.h:35
bool some_
Definition qr.h:45
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8