module testing.experimental_c

Short summary

module mlprodict.testing.experimental_c

C++ experimental implementations.

source on GitHub

Documentation

C++ experimental implementations.

mlprodict.testing.experimental_c.BroadcastMatrixAddLeftInplaceDouble(arg0: numpy.ndarray[numpy.float64], arg1: numpy.ndarray[numpy.float64]) None

Inplace addition, does X += Y. The function only allows broadcast in one way.

mlprodict.testing.experimental_c.BroadcastMatrixAddLeftInplaceFloat(arg0: numpy.ndarray[numpy.float32], arg1: numpy.ndarray[numpy.float32]) None

Inplace addition, does X += Y. The function only allows broadcast in one way.

mlprodict.testing.experimental_c.BroadcastMatrixAddLeftInplaceInt64(arg0: numpy.ndarray[numpy.int64], arg1: numpy.ndarray[numpy.int64]) None

Inplace addition, does X += Y. The function only allows broadcast in one way.

mlprodict.testing.experimental_c.code_optimisation() str

Returns a string giving some insights about optimisations.

mlprodict.testing.experimental_c.custom_einsum_double(equation: str, x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], nthread: int = 0) numpy.ndarray[numpy.float64]

Custom C++ implementation of operator einsum with double. The function only works with contiguous arrays. It does not any explicit transposes. It does not support diagonal operator (repetition of the same letter). See python’s version custom_einsum.

mlprodict.testing.experimental_c.custom_einsum_float(equation: str, x: numpy.ndarray[numpy.float32], y: numpy.ndarray[numpy.float32], nthread: int = 0) numpy.ndarray[numpy.float32]

Custom C++ implementation of operator einsum with float. The function only works with contiguous arrays. It does not any explicit transposes. It does not support diagonal operator (repetition of the same letter). See python’s version custom_einsum.

mlprodict.testing.experimental_c.custom_einsum_int32(equation: str, x: numpy.ndarray[numpy.int32], y: numpy.ndarray[numpy.int32], nthread: int = 0) numpy.ndarray[numpy.int32]

Custom C++ implementation of operator einsum with int32. The function only works with contiguous arrays. It does not any explicit transposes. It does not support diagonal operator (repetition of the same letter). See python’s version custom_einsum.

mlprodict.testing.experimental_c.custom_einsum_int64(equation: str, x: numpy.ndarray[numpy.int64], y: numpy.ndarray[numpy.int64], nthread: int = 0) numpy.ndarray[numpy.int64]

Custom C++ implementation of operator einsum with int64. The function only works with contiguous arrays. It does not any explicit transposes. It does not support diagonal operator (repetition of the same letter). See python’s version custom_einsum.

mlprodict.testing.experimental_c.custom_reducesum_rk_double(x: numpy.ndarray[numpy.float64], nthread: int = 0) numpy.ndarray[numpy.float64]

Custom C++ implementation of operator ReduceSum with double when the reduced matrix has two dimensions and the reduced axis is the first one. x is the reduced matrix. nthread specifies the number of threads used to distribute. Negative means OMP default values.

mlprodict.testing.experimental_c.custom_reducesum_rk_float(x: numpy.ndarray[numpy.float32], nthread: int = 0) numpy.ndarray[numpy.float32]

Custom C++ implementation of operator ReduceSum with float when the reduced matrix has two dimensions and the reduced axis is the first one. x is the reduced matrix. nthread specifies the number of threads used to distribute. Negative means OMP default values.

mlprodict.testing.experimental_c.experimental_ut_add() None

C++ unit test for add

mlprodict.testing.experimental_c.experimental_ut_einsum() None

C++ unit test for einsum

mlprodict.testing.experimental_c.experimental_ut_reduce() None

C++ unit test for reduce