sparse_bw_api.yaml 2.6 KB
Newer Older
1
- backward_api : conv3d_grad
Z
zhangkaihuo 已提交
2 3
  forward : conv3d (Tensor x, Tensor kernel, int[] paddings, int[] dilations, int[] strides, int groups, bool subm) -> Tensor(out@SparseCooTensor), Tensor(rulebook@DenseTensor)
  args : (Tensor x, Tensor kernel, Tensor rulebook, Tensor out_grad, int[] paddings, int[] dilations, int[] strides, int groups, bool subm)
4
  output : Tensor(x_grad), Tensor(kernel_grad)
5
  kernel :
6
    func : sparse_conv3d_grad{sparse_coo, dense, dense, sparse_coo -> sparse_coo, dense}
Z
zhangkaihuo 已提交
7

8
- backward_api : coo_to_dense_grad
9
  forward : coo_to_dense(Tensor x) -> Tensor(out)
10
  args : (Tensor x, Tensor out_grad)
11
  output : Tensor(x_grad)
12
  kernel :
13
    func : sparse_coo_to_dense_grad{sparse_coo, dense-> sparse_coo}
14

15
- backward_api : create_sparse_coo_tensor_grad
16
  forward : create_sparse_coo_tensor(Tensor values, Tensor indices, IntArray dense_shape) -> Tensor(out)
17
  args : (Tensor indices, Tensor out_grad)
18
  output : Tensor(values_grad)
19
  kernel :
20
    func : sparse_coo_tensor_grad{dense, sparse_coo -> dense}
21

22
- backward_api : dense_to_coo_grad
23
  forward : dense_to_coo(Tensor x, int64_t sparse_dim) -> Tensor(out)
24
  args : (Tensor out_grad)
25
  output : Tensor(x_grad)
26 27
  invoke : to_dense_impl(out_grad)

28 29
- backward_api : relu_grad
  forward : relu(Tensor x) -> Tensor(out)
30
  args : (Tensor out, Tensor out_grad)
31
  output : Tensor(x_grad)
Z
zhangkaihuo 已提交
32
  kernel :
33
    func : sparse_coo_relu_grad {sparse_coo, sparse_coo -> sparse_coo}
Z
zhangkaihuo 已提交
34

35 36
- backward_api : sin_grad
  forward : sin(Tensor x) -> Tensor(out)
Z
zhangkaihuo 已提交
37
  args : (Tensor x, Tensor out_grad)
38 39 40 41 42 43 44 45
  output : Tensor(x_grad)
  kernel :
    func : sparse_coo_sin_grad {sparse_coo, sparse_coo -> sparse_coo}

- backward_api : sparse_maxpool_grad
  forward : sparse_maxpool(Tensor x, int[] kernel_sizes, int[] paddings, int[] dilations, int[] strides) -> Tensor(out), Tensor(rulebook)
  args : (Tensor x, Tensor rulebook, Tensor out, Tensor out_grad, int[] kernel_sizes)
  output : Tensor(x_grad)
Z
zyfncg 已提交
46
  kernel :
47
    func : sparse_maxpool_grad {sparse_coo, dense, sparse_coo, sparse_coo -> sparse_coo}
48

49 50
- backward_api : sqrt_grad
  forward : sqrt(Tensor x) -> Tensor(out)
51
  args : (Tensor out, Tensor out_grad)
52
  output : Tensor(x_grad)
53
  kernel :
54
    func : sparse_coo_sqrt_grad {sparse_coo, sparse_coo -> sparse_coo}
55

56 57
- backward_api : tanh_grad
  forward : tanh(Tensor x) -> Tensor(out)
58
  args : (Tensor out, Tensor out_grad)
59
  output : Tensor(x_grad)
60
  kernel :
61
    func : sparse_coo_tanh_grad {sparse_coo, sparse_coo -> sparse_coo}
62

63 64 65 66
- backward_api : values_grad
  forward : coo_values(Tensor x) -> Tensor(out)
  args : (Tensor x, Tensor out_grad)
  output : Tensor(x_grad)
67
  kernel :
68
    func : coo_values_grad{sparse_coo, dense-> sparse_coo}