InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
linalg_solve_ex.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_LINALG_SOLVE_EX_H_
2#define INFINI_OPS_BASE_LINALG_SOLVE_EX_H_
3
4#include "operator.h"
5
6namespace infini::ops::linalg {
7
8class SolveEx : public Operator<SolveEx> {
9 public:
10 SolveEx(const Tensor A, const Tensor B, const bool left,
11 const bool check_errors, Tensor result, Tensor info)
12 : A_shape_{A.shape()},
13 A_strides_{A.strides()},
14 A_type_{A.dtype()},
15 B_shape_{B.shape()},
16 B_strides_{B.strides()},
17 B_type_{B.dtype()},
18 result_shape_{result.shape()},
19 result_strides_{result.strides()},
20 result_type_{result.dtype()},
21 info_shape_{info.shape()},
22 info_strides_{info.strides()},
23 info_type_{info.dtype()},
24 left_{left},
25 check_errors_{check_errors},
26 device_index_{result.device().index()} {}
27
28 virtual void operator()(const Tensor A, const Tensor B, const bool left,
29 const bool check_errors, Tensor result,
30 Tensor info) const = 0;
31
32 protected:
33 Tensor::Shape A_shape_;
34
35 Tensor::Strides A_strides_;
36
37 DataType A_type_;
38
39 Tensor::Shape B_shape_;
40
41 Tensor::Strides B_strides_;
42
43 DataType B_type_;
44
45 Tensor::Shape result_shape_;
46
47 Tensor::Strides result_strides_;
48
49 DataType result_type_;
50
51 Tensor::Shape info_shape_;
52
53 Tensor::Strides info_strides_;
54
55 DataType info_type_;
56
57 bool left_{};
58
60
62};
63
64} // namespace infini::ops::linalg
65
66#endif
Definition generated/include/operator.h:282
Definition linalg_solve_ex.h:8
DataType B_type_
Definition linalg_solve_ex.h:43
Tensor::Strides A_strides_
Definition linalg_solve_ex.h:35
Tensor::Shape info_shape_
Definition linalg_solve_ex.h:51
SolveEx(const Tensor A, const Tensor B, const bool left, const bool check_errors, Tensor result, Tensor info)
Definition linalg_solve_ex.h:10
Tensor::Strides result_strides_
Definition linalg_solve_ex.h:47
bool left_
Definition linalg_solve_ex.h:57
Tensor::Shape result_shape_
Definition linalg_solve_ex.h:45
Tensor::Shape B_shape_
Definition linalg_solve_ex.h:39
virtual void operator()(const Tensor A, const Tensor B, const bool left, const bool check_errors, Tensor result, Tensor info) const =0
DataType info_type_
Definition linalg_solve_ex.h:55
int device_index_
Definition linalg_solve_ex.h:61
Tensor::Strides B_strides_
Definition linalg_solve_ex.h:41
bool check_errors_
Definition linalg_solve_ex.h:59
Tensor::Shape A_shape_
Definition linalg_solve_ex.h:33
DataType A_type_
Definition linalg_solve_ex.h:37
DataType result_type_
Definition linalg_solve_ex.h:49
Tensor::Strides info_strides_
Definition linalg_solve_ex.h:53
Definition linalg_cholesky.h:6
infini::rt::TensorView Tensor
Definition tensor.h:8