InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
linalg_cholesky_ex.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_LINALG_CHOLESKY_EX_H_
2#define INFINI_OPS_BASE_LINALG_CHOLESKY_EX_H_
3
4#include "operator.h"
5
6namespace infini::ops::linalg {
7
8class CholeskyEx : public Operator<CholeskyEx> {
9 public:
10 CholeskyEx(const Tensor input, const bool upper, const bool check_errors,
11 Tensor L, Tensor info)
12 : input_shape_{input.shape()},
13 input_strides_{input.strides()},
14 input_type_{input.dtype()},
15 L_shape_{L.shape()},
16 L_strides_{L.strides()},
17 L_type_{L.dtype()},
18 info_shape_{info.shape()},
19 info_strides_{info.strides()},
20 info_type_{info.dtype()},
21 upper_{upper},
22 check_errors_{check_errors},
23 device_index_{L.device().index()} {}
24
25 virtual void operator()(const Tensor input, const bool upper,
26 const bool check_errors, Tensor L,
27 Tensor info) const = 0;
28
29 protected:
30 Tensor::Shape input_shape_;
31
32 Tensor::Strides input_strides_;
33
34 DataType input_type_;
35
36 Tensor::Shape L_shape_;
37
38 Tensor::Strides L_strides_;
39
40 DataType L_type_;
41
42 Tensor::Shape info_shape_;
43
44 Tensor::Strides info_strides_;
45
46 DataType info_type_;
47
48 bool upper_{};
49
51
53};
54
55} // namespace infini::ops::linalg
56
57#endif
Definition generated/include/operator.h:282
Definition linalg_cholesky_ex.h:8
virtual void operator()(const Tensor input, const bool upper, const bool check_errors, Tensor L, Tensor info) const =0
Tensor::Shape L_shape_
Definition linalg_cholesky_ex.h:36
Tensor::Strides info_strides_
Definition linalg_cholesky_ex.h:44
DataType input_type_
Definition linalg_cholesky_ex.h:34
Tensor::Strides L_strides_
Definition linalg_cholesky_ex.h:38
Tensor::Strides input_strides_
Definition linalg_cholesky_ex.h:32
bool upper_
Definition linalg_cholesky_ex.h:48
Tensor::Shape info_shape_
Definition linalg_cholesky_ex.h:42
DataType L_type_
Definition linalg_cholesky_ex.h:40
DataType info_type_
Definition linalg_cholesky_ex.h:46
CholeskyEx(const Tensor input, const bool upper, const bool check_errors, Tensor L, Tensor info)
Definition linalg_cholesky_ex.h:10
bool check_errors_
Definition linalg_cholesky_ex.h:50
Tensor::Shape input_shape_
Definition linalg_cholesky_ex.h:30
int device_index_
Definition linalg_cholesky_ex.h:52
Definition linalg_cholesky.h:6
infini::rt::TensorView Tensor
Definition tensor.h:8