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