InfiniOps
Operator Library for Accelerators
Loading...
Searching...
No Matches
internal_linalg_det.h
Go to the documentation of this file.
1#ifndef INFINI_OPS_BASE_INTERNAL_LINALG_DET_H_
2#define INFINI_OPS_BASE_INTERNAL_LINALG_DET_H_
3
4#include "operator.h"
5
7
8class Det : public Operator<Det> {
9 public:
10 Det(const Tensor A, Tensor result, Tensor LU, Tensor pivots)
11 : A_shape_{A.shape()},
12 A_strides_{A.strides()},
13 A_type_{A.dtype()},
14 result_shape_{result.shape()},
15 result_strides_{result.strides()},
16 result_type_{result.dtype()},
17 LU_shape_{LU.shape()},
18 LU_strides_{LU.strides()},
19 LU_type_{LU.dtype()},
20 pivots_shape_{pivots.shape()},
21 pivots_strides_{pivots.strides()},
22 pivots_type_{pivots.dtype()},
23 device_index_{result.device().index()} {}
24
25 virtual void operator()(const Tensor A, Tensor result, Tensor LU,
26 Tensor pivots) const = 0;
27
28 protected:
29 Tensor::Shape A_shape_;
30
31 Tensor::Strides A_strides_;
32
33 DataType A_type_;
34
35 Tensor::Shape result_shape_;
36
37 Tensor::Strides result_strides_;
38
39 DataType result_type_;
40
41 Tensor::Shape LU_shape_;
42
43 Tensor::Strides LU_strides_;
44
45 DataType LU_type_;
46
47 Tensor::Shape pivots_shape_;
48
49 Tensor::Strides pivots_strides_;
50
51 DataType pivots_type_;
52
54};
55
56} // namespace infini::ops::internal::linalg
57
58#endif
Definition generated/include/operator.h:282
Definition internal_linalg_det.h:8
virtual void operator()(const Tensor A, Tensor result, Tensor LU, Tensor pivots) const =0
DataType result_type_
Definition internal_linalg_det.h:39
Tensor::Shape A_shape_
Definition internal_linalg_det.h:29
Tensor::Strides LU_strides_
Definition internal_linalg_det.h:43
Tensor::Shape result_shape_
Definition internal_linalg_det.h:35
Tensor::Shape pivots_shape_
Definition internal_linalg_det.h:47
DataType A_type_
Definition internal_linalg_det.h:33
Det(const Tensor A, Tensor result, Tensor LU, Tensor pivots)
Definition internal_linalg_det.h:10
Tensor::Shape LU_shape_
Definition internal_linalg_det.h:41
DataType LU_type_
Definition internal_linalg_det.h:45
int device_index_
Definition internal_linalg_det.h:53
Tensor::Strides A_strides_
Definition internal_linalg_det.h:31
Tensor::Strides result_strides_
Definition internal_linalg_det.h:37
Tensor::Strides pivots_strides_
Definition internal_linalg_det.h:49
DataType pivots_type_
Definition internal_linalg_det.h:51
Definition internal_linalg_det.h:6
infini::rt::TensorView Tensor
Definition tensor.h:8