api.yaml 4.1 KB
Newer Older
1
- api : add
Z
zyfncg 已提交
2
  args : (Tensor x, Tensor y)
3
  output : Tensor
4
  infer_meta :
5 6
    func : ElementwiseInferMeta
  kernel :
Y
YuanRisheng 已提交
7
    func : add
8 9

- api : cast
Z
zyfncg 已提交
10
  args : (Tensor x, DataType out_dtype)
11
  output : Tensor
12
  infer_meta :
13 14 15
    func : CastInferMeta
  kernel :
    func : cast
16
    param : [x, out_dtype]
17 18
    data_type : x

19 20

- api : concat
Z
zyfncg 已提交
21
  args : (Tensor[] x, Scalar axis)
22 23 24
  output : Tensor
  infer_meta :
    func : ConcatInferMeta
25
    param : [x, axis]
26 27 28
  kernel :
    func : concat

29
- api : conj
Z
zyfncg 已提交
30
  args : (Tensor x)
31 32 33 34 35 36
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : conj

37 38 39 40 41
- api : copy_to
  args : (Tensor x, Backend backend, bool blocking)
  output : Tensor
  invoke : copy_to_impl(x, backend, blocking)

42
- api : divide
Z
zyfncg 已提交
43
  args : (Tensor x, Tensor y)
44
  output : Tensor
45
  infer_meta :
46 47
    func : ElementwiseInferMeta
  kernel :
Y
YuanRisheng 已提交
48
    func : divide
49 50

- api : dot
Z
zyfncg 已提交
51
  args : (Tensor x, Tensor y)
52
  output : Tensor
53
  infer_meta :
54
    func : DotInferMeta
55
  kernel :
56 57
    func : dot

58
- api : empty
59
  args : (ScalarArray shape, DataType dtype=DataType::FLOAT32, Backend place=Backend::CPU)
60
  output: Tensor
61
  infer_meta :
62
    func : CreateInferMeta
63
    param : [shape, dtype]
64
  kernel :
65
    func : empty
66
    param : [shape, dtype]
67 68
    data_type : dtype
    backend : place
69

70
- api : empty_like
71
  args : (Tensor x, DataType dtype = DataType::UNDEFINED, Backend place = Backend::UNDEFINED)
72
  output: Tensor
73
  infer_meta :
74
    func : CreateLikeInferMeta
75
    param : [x, dtype]
76
  kernel :
77
    func : empty_like
78
    param : [x, dtype]
79 80 81
    data_type : dtype > x
    backend : place > x

82
- api : flatten
Z
zyfncg 已提交
83
  args : (Tensor x, int start_axis, int stop_axis)
84
  output : Tensor
85
  infer_meta :
86
    func : FlattenInferMeta
87
  kernel :
Y
YuanRisheng 已提交
88
    func : flatten
89 90

- api : full
91
  args : (ScalarArray shape, Scalar value, DataType dtype=DataType::FLOAT32, Backend place=Backend::CPU)
92
  output: Tensor
93
  infer_meta :
Z
zyfncg 已提交
94
    func : CreateInferMeta
95
    param : [shape, dtype]
96
  kernel :
Y
YuanRisheng 已提交
97
    func : full
98
    param : [shape, value, dtype]
99 100
    data_type : dtype
    backend : place
101

102
- api : full_like
103
  args : (Tensor x, Scalar value, DataType dtype = DataType::UNDEFINED, Backend place = Backend::UNDEFINED)
104
  output: Tensor
105
  infer_meta :
Z
zyfncg 已提交
106
    func : CreateLikeInferMeta
107
    param : [x, dtype]
108
  kernel :
Y
YuanRisheng 已提交
109
    func : full_like
110
    param : [x, value, dtype]
111 112 113 114
    data_type : dtype > x
    backend : place > x

- api : matmul
Z
zyfncg 已提交
115
  args : (Tensor x, Tensor y, bool transpose_x = false, bool transpose_y = false)
116
  output : Tensor
117
  infer_meta :
118
    func : MatmulInferMeta
119
  kernel :
120
    func : matmul
121
  backward : matmul_grad
122 123

- api : mean
Z
zyfncg 已提交
124
  args : (Tensor x, int64_t[] axis={}, bool keep_dim=false)
125
  output : Tensor
126
  infer_meta :
127
    func : MeanInferMeta
128
  kernel :
Y
YuanRisheng 已提交
129
    func : mean
130 131

- api : multiply
Z
zyfncg 已提交
132
  args : (Tensor x, Tensor y)
133
  output : Tensor
134
  infer_meta :
135 136
    func : ElementwiseInferMeta
  kernel :
Y
YuanRisheng 已提交
137
    func : multiply
138 139

- api : ones_like
140
  args : (Tensor x, DataType dtype=DataType::UNDEFINED, Backend place=Backend::UNDEFINED)
141
  output : Tensor
142
  invoke : full_like(x, 1, dtype, place)
143 144

- api : reshape
Z
zyfncg 已提交
145
  args : (Tensor x, ScalarArray shape)
146
  output : Tensor(out)
147
  infer_meta :
148
    func : ReshapeInferMeta
149
  kernel :
Y
YuanRisheng 已提交
150
    func : reshape
151
  inplace : (x -> out)
152 153

- api : scale
Z
zyfncg 已提交
154
  args : (Tensor x, Scalar scale, float bias, bool bias_after_scale)
155
  output : Tensor
156
  infer_meta :
157 158 159
    func : UnchangedInferMeta
    param : [x]
  kernel :
160
    func : scale, scale_sr
161

162
- api : sign
Z
zyfncg 已提交
163
  args : (Tensor x)
164 165 166 167 168 169
  output : Tensor
  infer_meta :
    func : UnchangedInferMeta
  kernel :
    func : sign

170 171 172 173 174
- api : split
  args : (Tensor x, ScalarArray num_or_sections, Scalar axis)
  output : Tensor[]
  invoke : split_impl(x, num_or_sections, axis)

175
- api : subtract
Z
zyfncg 已提交
176
  args : (Tensor x, Tensor y)
177
  output : Tensor
178
  infer_meta :
179 180
    func : ElementwiseInferMeta
  kernel :
Y
YuanRisheng 已提交
181
    func : subtract
182 183

- api : sum
Z
zyfncg 已提交
184
  args : (Tensor x, int64_t[] axis={}, DataType dtype=DataType::UNDEFINED, bool keep_dim=false)
185
  output : Tensor
186
  infer_meta :
187
    func : SumInferMeta
188
  kernel :
Y
YuanRisheng 已提交
189
    func : sum
190
    data_type : x
191 192

- api : zeros_like
193
  args : (Tensor x, DataType dtype=DataType::UNDEFINED, Backend place=Backend::UNDEFINED)
194
  output : Tensor
195
  invoke : full_like(x, 0, dtype, place)