InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
lu_solve.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_LU_SOLVE_H_
2#define INFINI_OPS_BASE_LU_SOLVE_H_
3
4#include "operator.h"
5
6namespace infini::ops {
7
8class LuSolve : public Operator<LuSolve> {
9 public:
10 LuSolve(const Tensor input, const Tensor LU_data, const Tensor LU_pivots,
11 Tensor out)
12 : input_shape_{input.shape()},
13 input_strides_{input.strides()},
14 input_type_{input.dtype()},
15 LU_data_shape_{LU_data.shape()},
16 LU_data_strides_{LU_data.strides()},
17 LU_data_type_{LU_data.dtype()},
18 LU_pivots_shape_{LU_pivots.shape()},
19 LU_pivots_strides_{LU_pivots.strides()},
20 LU_pivots_type_{LU_pivots.dtype()},
21 out_shape_{out.shape()},
22 out_strides_{out.strides()},
23 out_type_{out.dtype()},
24 device_index_{out.device().index()} {}
25
26 virtual void operator()(const Tensor input, const Tensor LU_data,
27 const Tensor LU_pivots, Tensor out) 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 LU_data_shape_;
37
38 Tensor::Strides LU_data_strides_;
39
40 DataType LU_data_type_;
41
42 Tensor::Shape LU_pivots_shape_;
43
44 Tensor::Strides LU_pivots_strides_;
45
47
48 Tensor::Shape out_shape_;
49
50 Tensor::Strides out_strides_;
51
52 DataType out_type_;
53
55};
56
57} // namespace infini::ops
58
59#endif
Definition lu_solve.h:8
Tensor::Strides LU_pivots_strides_
Definition lu_solve.h:44
DataType input_type_
Definition lu_solve.h:34
DataType LU_pivots_type_
Definition lu_solve.h:46
Tensor::Strides input_strides_
Definition lu_solve.h:32
virtual void operator()(const Tensor input, const Tensor LU_data, const Tensor LU_pivots, Tensor out) const =0
Tensor::Strides LU_data_strides_
Definition lu_solve.h:38
Tensor::Shape input_shape_
Definition lu_solve.h:30
DataType out_type_
Definition lu_solve.h:52
Tensor::Strides out_strides_
Definition lu_solve.h:50
DataType LU_data_type_
Definition lu_solve.h:40
Tensor::Shape out_shape_
Definition lu_solve.h:48
int device_index_
Definition lu_solve.h:54
LuSolve(const Tensor input, const Tensor LU_data, const Tensor LU_pivots, Tensor out)
Definition lu_solve.h:10
Tensor::Shape LU_data_shape_
Definition lu_solve.h:36
Tensor::Shape LU_pivots_shape_
Definition lu_solve.h:42
Definition generated/include/operator.h:282
Definition generated/include/operator.h:28
infini::rt::TensorView Tensor
Definition tensor.h:8