blas.oprdecl 2.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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)')

16 17 18 19 20
decl_opr('MatrixMul',
         inputs=['opr0', 'opr1'],
         params=[('param', 'MatrixMul'),
                 ('execution_polity', 'ExecutionPolicy')],
         desc='matrix multiplication',
21
         version=2, has_out_dtype=True)
22 23 24 25 26 27 28 29 30

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)',
31
         version=2, has_out_dtype=True)
32

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
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]``.')

51 52 53 54 55
decl_opr('Cross',
         inputs=['A', 'B'],
         params='Cross',
         desc='computes the cross product of two (arrays of) vectors.')

56
# vim: ft=python