Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ repos:
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
rev: v3.22.0
hooks:
- id: pyupgrade
- repo: https://github.com/codespell-project/codespell
Expand All @@ -63,7 +63,7 @@ repos:
additional_dependencies:
- tomli
- repo: https://github.com/psf/black
rev: 26.5.1
rev: 26.10.1
hooks:
- id: black
exclude: "dpnp/_version.py"
Expand All @@ -88,7 +88,7 @@ repos:
- flake8-docstrings==1.7.0
- flake8-bugbear==26.9.30
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v23.1.2
rev: v23.1.3
hooks:
- id: clang-format
args: ["-i"]
Expand Down Expand Up @@ -133,7 +133,7 @@ repos:
exclude: "dpnp/backend/cmake/Modules/"
args: ["-i", "-l", "88", "--no-warn-about-unknown-commands"]
- repo: https://github.com/MarcoGorelli/cython-lint
rev: v0.21.1
rev: v0.22.0
hooks:
- id: cython-lint
- id: double-quote-cython-strings
4 changes: 1 addition & 3 deletions dpnp/dpnp_algo/dpnp_algo.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ cdef extern from "dpnp_iface_fptr.hpp":
) except +


"""
Internal functions
"""
# Internal functions
cdef DPNPFuncType dpnp_dtype_to_DPNPFuncType(dtype)
cdef dpnp_DPNPFuncType_to_dtype(size_t type)
35 changes: 13 additions & 22 deletions dpnp/dpnp_utils/dpnp_algo_utils.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,24 @@ from dpnp.dpnp_algo cimport shape_type_c
from dpnp.dpnp_algo.dpnp_algo cimport DPNPFuncType


# Throw exception ValueError if 'param' is not 'expected'
cpdef checker_throw_value_error(function_name, param_name, param, expected)
""" Throw exception ValueError if 'param' is not 'expected'

"""


# Throw exception TypeError if 'given_type' type is not supported
cpdef checker_throw_type_error(function_name, given_type)
""" Throw exception TypeError if 'given_type' type is not supported

"""


# This function needs to redirect particular computation cases to original
# backend
#
# Parameters:
# input1: One of the input parameter of the API function
# compute_size: Some amount of total compute size of the task
# Return:
# True - computations are better to be executed on original backend
# False - it is better to use this SW to compute
cpdef cpp_bool use_origin_backend(input1=*, size_t compute_size=*)
"""
This function needs to redirect particular computation cases to original backend

Parameters:
input1: One of the input parameter of the API function
compute_size: Some amount of total compute size of the task
Return:
True - computations are better to be executed on original backend
False - it is better to use this SW to compute
"""


cpdef tuple _object_to_tuple(object obj)
Expand All @@ -73,17 +68,13 @@ cdef class dpnp_descriptor:

cdef void * get_data(self)

# Create output dpnp_descriptor based on shape, type and 'out' parameters
cdef dpnp_descriptor create_output_descriptor(shape_type_c output_shape,
DPNPFuncType c_type,
dpnp_descriptor requested_out,
device=*,
usm_type=*,
sycl_queue=*)
"""
Create output dpnp_descriptor based on shape, type and 'out' parameters
"""

# Get common USM allocation in the form of (sycl_device, usm_type, sycl_queue)
cdef tuple get_common_usm_allocation(dpnp_descriptor x1, dpnp_descriptor x2)
"""
Get common USM allocation in the form of (sycl_device, usm_type, sycl_queue)
"""
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ def test_histogramdd(self, xp, dtype):
)
return [
y,
] + [e for e in bin_edges]
] + [*bin_edges]


class TestHistogramddErrors(unittest.TestCase):
Expand Down
Loading