You need to sign in or sign up before continuing.
Commit deb763b7 authored by root's avatar root
Browse files

clone code from github

parent 93bf084b
Pipeline #3386 canceled with stages
This diff is collapsed.
from cupy._core._carray cimport shape_t
from cupy._core.core cimport _ndarray_base
cpdef compute_type_to_str(compute_type)
cpdef get_compute_type(dtype)
cpdef _ndarray_base dot(_ndarray_base a, _ndarray_base b, _ndarray_base out=*)
cpdef _ndarray_base tensordot_core(
_ndarray_base a, _ndarray_base b, _ndarray_base out, Py_ssize_t n,
Py_ssize_t m, Py_ssize_t k, const shape_t& ret_shape)
cpdef _ndarray_base matmul(
_ndarray_base a, _ndarray_base b, _ndarray_base out=*)
cpdef enum:
COMPUTE_TYPE_TBD = 0
COMPUTE_TYPE_DEFAULT = 1 # default
COMPUTE_TYPE_PEDANTIC = 2 # disable algorithmic optimizations
COMPUTE_TYPE_FP16 = 3 # allow converting inputs to FP16
COMPUTE_TYPE_FP32 = 4 # allow converting inputs to FP32
COMPUTE_TYPE_FP64 = 5 # allow converting inputs to FP64
COMPUTE_TYPE_BF16 = 6 # allow converting inputs to BF16
COMPUTE_TYPE_TF32 = 7 # allow converting inputs to TF32
This diff is collapsed.
from cupy._core.core cimport _ndarray_base
cdef _ndarray_base _ndarray_all(_ndarray_base self, axis, out, keepdims)
cdef _ndarray_base _ndarray_any(_ndarray_base self, axis, out, keepdims)
cdef _ndarray_base _ndarray_greater(_ndarray_base self, other)
cdef _ndarray_base _ndarray_greater_equal(_ndarray_base self, other)
cdef _ndarray_base _ndarray_less(_ndarray_base self, other)
cdef _ndarray_base _ndarray_less_equal(_ndarray_base self, other)
cdef _ndarray_base _ndarray_equal(_ndarray_base self, other)
cdef _ndarray_base _ndarray_not_equal(_ndarray_base self, other)
This diff is collapsed.
from libcpp cimport vector
from cupy._core._carray cimport shape_t
from cupy._core._carray cimport strides_t
from cupy._core.core cimport _ndarray_base
cdef class broadcast:
cdef:
readonly tuple values
readonly tuple shape
readonly Py_ssize_t size
readonly Py_ssize_t nd
cdef _ndarray_shape_setter(_ndarray_base self, newshape)
cdef _ndarray_base _ndarray_reshape(_ndarray_base self, tuple shape, order)
cdef _ndarray_base _ndarray_transpose(_ndarray_base self, tuple axes)
cdef _ndarray_base _ndarray_swapaxes(
_ndarray_base self, Py_ssize_t axis1, Py_ssize_t axis2)
cdef _ndarray_base _ndarray_flatten(_ndarray_base self, order)
cdef _ndarray_base _ndarray_ravel(_ndarray_base self, order)
cdef _ndarray_base _ndarray_squeeze(_ndarray_base self, axis)
cdef _ndarray_base _ndarray_repeat(_ndarray_base self, repeats, axis)
cpdef _ndarray_base _expand_dims(_ndarray_base a, tuple axis)
cpdef _ndarray_base moveaxis(_ndarray_base a, source, destination)
cpdef _ndarray_base _move_single_axis(
_ndarray_base a, Py_ssize_t source, Py_ssize_t destination)
cpdef _ndarray_base rollaxis(
_ndarray_base a, Py_ssize_t axis, Py_ssize_t start=*)
cpdef _ndarray_base broadcast_to(_ndarray_base array, shape)
cpdef _ndarray_base _reshape(_ndarray_base self, const shape_t &shape_spec)
cpdef _ndarray_base _T(_ndarray_base self)
cpdef _ndarray_base _transpose(
_ndarray_base self, const vector.vector[Py_ssize_t] &axes)
cpdef _ndarray_base _concatenate(
list arrays, Py_ssize_t axis, tuple shape, _ndarray_base out, str casting)
cpdef _ndarray_base concatenate_method(
tup, int axis, _ndarray_base out=*, dtype=*, casting=*)
This diff is collapsed.
from cupy._core.core cimport _ndarray_base
cdef _ndarray_base _ndarray_conj(_ndarray_base self)
cdef _ndarray_base _ndarray_real_getter(_ndarray_base self)
cdef _ndarray_base _ndarray_real_setter(_ndarray_base self, value)
cdef _ndarray_base _ndarray_imag_getter(_ndarray_base self)
cdef _ndarray_base _ndarray_imag_setter(_ndarray_base self, value)
cdef _ndarray_base _ndarray_prod(
_ndarray_base self, axis, dtype, out, keepdims)
cdef _ndarray_base _ndarray_sum(_ndarray_base self, axis, dtype, out, keepdims)
cdef _ndarray_base _ndarray_cumsum(_ndarray_base self, axis, dtype, out)
cdef _ndarray_base _ndarray_cumprod(_ndarray_base self, axis, dtype, out)
cdef _ndarray_base _ndarray_clip(_ndarray_base self, a_min, a_max, out)
cpdef _ndarray_base _nansum(_ndarray_base a, axis, dtype, out, keepdims)
cpdef _ndarray_base _nanprod(_ndarray_base a, axis, dtype, out, keepdims)
cpdef enum scan_op:
SCAN_SUM = 0
SCAN_PROD = 1
cdef _ndarray_base scan(_ndarray_base a, op, dtype=*, _ndarray_base out=*,
incomplete=*, chunk_size=*)
cdef object _sum_auto_dtype
cdef object _add
cdef object _conj
cdef object _angle
cdef object _positive
cdef object _negative
cdef object _multiply
cdef object _divide
cdef object _power
cdef object _subtract
cdef object _true_divide
cdef object _floor_divide
cdef object _remainder
cdef object _absolute
cdef object _sqrt
This diff is collapsed.
from cupy._core.core cimport _ndarray_base
cdef _ndarray_sort(_ndarray_base self, int axis)
cdef _ndarray_base _ndarray_argsort(_ndarray_base self, axis)
cdef _ndarray_partition(_ndarray_base self, kth, int axis)
cdef _ndarray_base _ndarray_argpartition(self, kth, axis)
This diff is collapsed.
from cupy._core.core cimport _ndarray_base
# TODO(niboshi): Move {nan,}arg{min,max} to sorting
cdef _ndarray_base _ndarray_max(_ndarray_base self, axis, out, dtype, keepdims)
cdef _ndarray_base _ndarray_min(_ndarray_base self, axis, out, dtype, keepdims)
cdef _ndarray_base _ndarray_ptp(_ndarray_base self, axis, out, keepdims)
cdef _ndarray_base _ndarray_argmax(
_ndarray_base self, axis, out, dtype, keepdims)
cdef _ndarray_base _ndarray_argmin(
_ndarray_base self, axis, out, dtype, keepdims)
cdef _ndarray_base _ndarray_mean(
_ndarray_base self, axis, dtype, out, keepdims)
cdef _ndarray_base _ndarray_var(
_ndarray_base self, axis, dtype, out, ddof, keepdims)
cdef _ndarray_base _ndarray_std(
_ndarray_base self, axis, dtype, out, ddof, keepdims)
cpdef _ndarray_base _median(
_ndarray_base a, axis, out, overwrite_input, keepdims)
cpdef _ndarray_base _nanmean(_ndarray_base a, axis, dtype, out, keepdims)
cpdef _ndarray_base _nanvar(_ndarray_base a, axis, dtype, out, ddof, keepdims)
cpdef _ndarray_base _nanstd(_ndarray_base a, axis, dtype, out, ddof, keepdims)
cpdef _ndarray_base _nanargmin(_ndarray_base a, axis, out, dtype, keepdims)
cpdef _ndarray_base _nanargmax(_ndarray_base a, axis, out, dtype, keepdims)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
from cupy._core._kernel import create_ufunc
elementwise_copy = create_ufunc(
'cupy_copy',
('?->?', 'b->b', 'B->B', 'h->h', 'H->H', 'i->i', 'I->I', 'l->l', 'L->L',
'q->q', 'Q->Q', 'e->e', 'f->f', 'd->d', 'F->F', 'D->D'),
'out0 = in0',
default_casting='unsafe')
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment