File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #ifndef INFINI_OPS_BASE_QR_H_
2+ #define INFINI_OPS_BASE_QR_H_
3+
4+ #include " operator.h"
5+
6+ namespace infini ::ops {
7+
8+ class 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+
47+ int device_index_{0 };
48+ };
49+
50+ } // namespace infini::ops
51+
52+ #endif
You can’t perform that action at this time.
0 commit comments