blas.oprdecl 2.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
decl_opr('MatrixMul',
         pyname='matrix_mul_v0',
         inputs=['opr0', 'opr1'],
         params='MatrixMulV0',
         desc='matrix multiplication')

decl_opr('BatchedMatrixMul',
         pyname='batched_matrix_mul_v0',
         inputs=['opr0', 'opr1'],
         params='MatrixMulV0',
         desc='batched matrix multiplication: input shapes should be '
         '(n, a, b) and (n, b, c) (assuming transposeA and transeposeB are '
         'False); then :math:`n` independent matrix multiplications would be '
         'performed and output shape is (n, a, c)')

decl_opr('MatrixMul',
17
         pyname='matrix_mul_v2',
18 19 20 21 22 23
         inputs=['opr0', 'opr1'],
         params='MatrixMul',
         desc='matrix multiplication',
         version=2, has_out_dtype=True)

decl_opr('BatchedMatrixMul',
24
         pyname='batched_matrix_mul_v2',
25 26 27 28 29 30 31 32
         inputs=['opr0', 'opr1'],
         params='MatrixMul',
         desc='batched matrix multiplication: input shapes should be '
         '(n, a, b) and (n, b, c) (assuming transposeA and transeposeB are '
         'False); then :math:`n` independent matrix multiplications would be '
         'performed and output shape is (n, a, c)',
         version=2, has_out_dtype=True)

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
decl_opr('MatrixMul',
         inputs=['opr0', 'opr1'],
         params=[('param', 'MatrixMul'),
                 ('execution_polity', 'ExecutionPolicy')],
         desc='matrix multiplication',
         version=3, has_out_dtype=True)

decl_opr('BatchedMatrixMul',
         inputs=['opr0', 'opr1'],
         params=[('param', 'MatrixMul'),
                 ('execution_polity', 'ExecutionPolicy')],
         desc='batched matrix multiplication: input shapes should be '
         '(n, a, b) and (n, b, c) (assuming transposeA and transeposeB are '
         'False); then :math:`n` independent matrix multiplications would be '
         'performed and output shape is (n, a, c)',
         version=3, has_out_dtype=True)

50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
decl_opr('Dot',
         inputs=['opr0', 'opr1'],
         params='Empty',
         desc='dot-product of two vectors; inputs must be 1-dimensional, '
         'and scalar input can be automatically broadcasted')

decl_opr('MatrixInverse',
         inputs=['src'],
         params='Empty',
         desc='inverse a batch of matrices; the input must has shape '
         '``[..., n, n]``')

decl_opr('SVD',
         inputs=['src'],
         params='SVD',
         desc='Computes the singular value decompositions of matrices. '
              'The input must has shape ``[..., M, N]``.')

# vim: ft=python