pd_op.yaml 8.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
- name: assign_value
  inputs: []
  attrs:
  - {typename: 'int[]', name: shape}
  - {typename: DataType, name: dtype}
  - {typename: 'Scalar[]', name: values, data_type: 'std::vector<Scalar>'}
  - {typename: Place, name: place, default_value: '{}'}
  outputs:
  - {typename: Tensor, name: out, optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null
  infer_meta:
    func: AssignValueInferMeta
    param: [shape, dtype]
  kernel:
    func: [assign_value]
    param: [shape, dtype, values]
    backend:
      ordered: true
      candidates: [place]
    layout: null
    data_type:
      ordered: false
      candidates: [dtype]
      to_complex_flag: [false]
    dispatch: {assign_value: null}
    force_backend: null
  inplace: null
  view: null
  backward: null

32
- name: feed
K
kangguangli 已提交
33
  inputs: []
34
  attrs:
K
kangguangli 已提交
35
  - {typename: str, name: name}
H
hong 已提交
36
  - {typename: int, name: col}
37 38 39 40 41 42
  outputs:
  - {typename: Tensor, name: out, optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null
  inplace: null
  backward: null
43

44 45 46 47 48 49 50 51
- name: fetch
  inputs:
  - typename: Tensor
    name: x
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs:
K
kangguangli 已提交
52
  - {typename: str, name: name}
H
hong 已提交
53
  - {typename: int, name: col}
H
hong 已提交
54
  outputs:
55
    - {typename: Tensor, name: out, optional: false, intermediate: false}
56 57
  no_need_buffer: null
  data_transform: null
H
hong 已提交
58 59 60 61 62 63 64 65 66 67 68
  infer_meta:
    func: UnchangedInferMeta
    param: [x]
  kernel:
    func: [fetch]
    param: [x]
    backend: null
    layout: null
    data_type: null
    dispatch: {fetch: null}
    force_backend: null
69 70
  inplace: null
  backward: null
71

H
hong 已提交
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
- name: save_combine
  inputs:
  - typename: Tensor[]
    name: X
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs:
  - {typename: str, name: file_path}
  - {typename: bool, name: overwrite}
  - {typename: bool, name: save_as_fp16}
  - {typename: bool, name: save_to_memory}
  outputs:
    - {typename: Tensor, name: out, optional: true, intermediate: false}
  no_need_buffer: null
  data_transform: null
  kernel:
    func: [save_combine_tensor]
    param: [X, file_path, overwrite, save_as_fp16, save_to_memory]
    backend: null
    layout: null
    data_type: null
    dispatch: {fetch: null}
    force_backend: null
  inplace: null
  backward: null

H
hong 已提交
99 100 101 102 103 104 105
- name: load_combine
  inputs: []
  attrs:
  - {typename: str, name: file_path}
  - {typename: bool, name: load_as_fp16}
  - {typename: bool, name: model_from_memory}
  outputs:
106
    - {typename: 'Tensor[]', name: Out, optional: true, intermediate: false}
H
hong 已提交
107 108 109 110 111 112 113 114 115 116 117 118 119
  no_need_buffer: null
  data_transform: null
  kernel:
    func: [load_combine]
    param: [file_path, load_as_fp16, model_from_memory]
    backend: null
    layout: null
    data_type: null
    dispatch: {fetch: null}
    force_backend: null
  inplace: null
  backward: null

120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
- name: share_buffer_
  inputs:
  - typename: Tensor[]
    name: x
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs:
  - {typename: 'bool[]', name: share_dims_and_dtype, default_value: '{}'}
  outputs:
  - {typename: 'Tensor[]', name: out, size: x.size(), optional: false, intermediate: false}
  - {typename: 'Tensor[]', name: xout, size: x.size(), optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null
  inplace: null
  backward: null

- name: assert
  inputs:
  - typename: Tensor
    name: cond
    optional: false
    no_need_buffer: false
    data_transform: {}
  - typename: Tensor[]
    name: data
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs:
  - {typename: 'int64_t', name: summarize, default_value: '-1'}
  outputs: []
  no_need_buffer: null
  data_transform: null
  inplace: null
  backward: null

- name: print
  inputs:
  - typename: Tensor
    name: in
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs:
  - {typename: 'int', name: first_n}
  - {typename: 'str', name: message}
  - {typename: 'int', name: summarize}
  - {typename: 'bool', name: print_tensor_name, default_value: 'true'}
  - {typename: 'bool', name: print_tensor_type, default_value: 'true'}
  - {typename: 'bool', name: print_tensor_shape, default_value: 'true'}
  - {typename: 'bool', name: print_tensor_layout, default_value: 'true'}
  - {typename: 'bool', name: print_tensor_lod, default_value: 'true'}
H
hong 已提交
173
  - {typename: 'str', name: print_phase, default_value: '"BOTH"'}
174 175 176 177 178 179 180
  - {typename: 'bool', name: is_forward, default_value: 'true'}
  outputs:
    - typename: Tensor
      name: out
      optional: false
      no_need_buffer: false
      data_transform: {}
H
hong 已提交
181 182 183 184 185 186 187 188 189 190 191
  infer_meta:
    func: UnchangedInferMeta
    param: [in]
  kernel:
    func: [print_kernel]
    param: [in, first_n, message, summarize, print_tensor_name, print_tensor_type, print_tensor_shape, print_tensor_layout, print_tensor_lod, print_phase, is_forward ]
    backend: null
    layout: null
    data_type: null
    dispatch: {print: null}
    force_backend: null
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
  no_need_buffer: null
  data_transform: null
  inplace: null
  backward: null

- name: add_n_
  inputs:
  - typename: Tensor[]
    name: inputs
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs: []
  outputs:
  - {typename: Tensor, name: out, optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
  infer_meta:
    func: AddNInferMeta
    param: [inputs]
  kernel:
    func: [add_n]
    param: [inputs]
    backend: null
    layout: null
    data_type: null
    dispatch: {fetch: null}
    force_backend: null
  backward: add_n_grad

- name: add_n_with_kernel
  inputs:
  - typename: Tensor[]
    name: inputs
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs: []
  outputs:
  - {typename: Tensor, name: out, optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null
  infer_meta:
    func: AddNInferMeta
    param: [inputs]
  kernel:
    func: [add_n]
    param: [inputs]
    backend: null
    layout: null
    data_type: null
    dispatch: {fetch: null}
    force_backend: null
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
  backward: add_n_grad

- name: write_to_array
  inputs:
  - typename: Tensor
    name: i
    optional: false
    no_need_buffer: false
    data_transform: {}
  - typename: Tensor
    name: x
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs: []
  outputs:
  - {typename: 'Tensor[]', name: out, optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null
  backward: write_to_array_grad

- name: lod_array_length
  inputs:
  - typename: Tensor[]
    name: x
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs: []
  outputs:
  - {typename: 'Tensor', name: out, optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null

279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303
- name: embedding_grad_sparse
  inputs:
  - typename: Tensor
    name: x
    optional: false
    no_need_buffer: false
    data_transform: {}
  - typename: Tensor
    name: weight
    optional: false
    no_need_buffer: false
    data_transform: {}
  - typename: Tensor
    name: out_grad
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs:
  - {typename: int64_t, name: padding_idx, default_value: '-1'}
  - {typename: bool, name: sparse, default_value: 'false'}
  outputs:
  - {typename: SelectedRows, name: weight_grad, optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null
  infer_meta:
H
hong 已提交
304
    func: EmbeddingGradSparseInferMeta
305 306
    param: [weight]
  kernel:
H
hong 已提交
307
    func: [embedding_sparse_grad]
308 309 310 311 312 313 314
    param: [x, weight, out_grad, padding_idx, sparse]
    backend: null
    layout: null
    data_type:
      ordered: false
      candidates: [weight]
      to_complex_flag: [false]
H
hong 已提交
315
    dispatch: {embedding_sparse_grad: null}
316 317 318 319
    force_backend: null
  inplace: null
  view: null
  backward: null
320 321


H
hong 已提交
322
- name: shadow_feed
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337
  inputs:
  - typename: Tensor
    name: x
    optional: false
    no_need_buffer: false
    data_transform: {}
  attrs: []
  outputs:
    - {typename: Tensor, name: out, optional: false, intermediate: false}
  no_need_buffer: null
  data_transform: null
  infer_meta:
    func: UnchangedInferMeta
    param: [x]
  kernel:
H
hong 已提交
338
    func: [shadow_feed]
339 340 341 342 343 344 345 346
    param: [x]
    backend: null
    layout: null
    data_type: null
    dispatch: {fetch: null}
    force_backend: null
  inplace: null
  backward: null