Skip to content

Spelling fixes pointed out by codespell #1581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 10, 2023
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
2 changes: 1 addition & 1 deletion doc/docstring_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def func(a, b=None, c=True):
-----------
Some limitations in comparison to baseline, ex:
Input array data types are limited by supported DPNP :ref:`Data types`.
Parameter ``c`` is supported only with default value ``True``.
Parameter `c` is supported only with default value ``True``.
Otherwise the function will be executed sequentially on CPU.

See Also
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/cmake/Modules/MKLConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ if(GNU_C_COMPILER OR GNU_Fortran_COMPILER)
endif()
endif()

# Additonal compiler & linker options
# Additional compiler & linker options
if(CXX_COMPILER_NAME STREQUAL "icpx" OR CXX_COMPILER_NAME STREQUAL "icx.exe")
list(APPEND MKL_DPCPP_COPT "-fsycl")
list(APPEND MKL_DPCPP_LOPT "-fsycl")
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/examples/example8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int main(int, char **)

dpnp_argsort_c<double, long>(array, result, size);

std::cout << "array with 'sorted' indeces" << std::endl;
std::cout << "array with 'sorted' indices" << std::endl;
for (size_t i = 0; i < size; ++i) {
std::cout << result[i] << ", ";
}
Expand Down
7 changes: 4 additions & 3 deletions dpnp/backend/extensions/lapack/heevd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static sycl::event heevd_impl(sycl::queue exec_q,
info = -1;
}

if (info != 0) // an unexected error occurs
if (info != 0) // an unexpected error occurs
{
if (scratchpad != nullptr) {
sycl::free(scratchpad, exec_q);
Expand Down Expand Up @@ -188,8 +188,9 @@ std::pair<sycl::event, sycl::event>
bool is_eig_vecs_f_contig = eig_vecs.is_f_contiguous();
bool is_eig_vals_c_contig = eig_vals.is_c_contiguous();
if (!is_eig_vecs_f_contig) {
throw py::value_error("An array with input matrix / ouput eigenvectors "
"must be F-contiguous");
throw py::value_error(
"An array with input matrix / output eigenvectors "
"must be F-contiguous");
}
else if (!is_eig_vals_c_contig) {
throw py::value_error(
Expand Down
9 changes: 5 additions & 4 deletions dpnp/backend/extensions/lapack/syevd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static sycl::event syevd_impl(sycl::queue exec_q,
info = -1;
}

if (info != 0) // an unexected error occurs
if (info != 0) // an unexpected error occurs
{
if (scratchpad != nullptr) {
sycl::free(scratchpad, exec_q);
Expand Down Expand Up @@ -186,8 +186,9 @@ std::pair<sycl::event, sycl::event>
bool is_eig_vecs_f_contig = eig_vecs.is_f_contiguous();
bool is_eig_vals_c_contig = eig_vals.is_c_contiguous();
if (!is_eig_vecs_f_contig) {
throw py::value_error("An array with input matrix / ouput eigenvectors "
"must be F-contiguous");
throw py::value_error(
"An array with input matrix / output eigenvectors "
"must be F-contiguous");
}
else if (!is_eig_vals_c_contig) {
throw py::value_error(
Expand All @@ -202,7 +203,7 @@ std::pair<sycl::event, sycl::event>

if (eig_vecs_type_id != eig_vals_type_id) {
throw py::value_error(
"Types of eigenvectors and eigenvalues are missmatched");
"Types of eigenvectors and eigenvalues are mismatched");
}

syevd_impl_fn_ptr_t syevd_fn = syevd_dispatch_vector[eig_vecs_type_id];
Expand Down
4 changes: 2 additions & 2 deletions dpnp/backend/extensions/sycl_ext/dispatcher_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ struct CartesianDispatcher

FnT operator()(std::initializer_list<DispatchT> values)
{
// though std::initializer_list::size is constexpr it doesnt work for
// some reson constexpr auto const list_size = values.size();
// though std::initializer_list::size is constexpr it doesn't work for
// some reason constexpr auto const list_size = values.size();
std::array<int, sizeof...(Axis)> idx;
bool found =
coord_in_space<DispatchT, Matcher, std::tuple<Axis...>>::get(
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/extensions/sycl_ext/sum_mean.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool check_limitations(const dpctl::tensor::usm_ndarray &in,
size_t out_full_size = out.get_size() * out.get_elemsize();
if (out_full_size > local_mem_size) {
if (throw_on_fail)
throw py::value_error("Resulting array exceeds local memroy size" +
throw py::value_error("Resulting array exceeds local memory size" +
std::to_string(local_mem_size));

return false;
Expand Down
24 changes: 12 additions & 12 deletions dpnp/backend/extensions/vm/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ std::pair<sycl::event, sycl::event>
return std::make_pair(sycl::event(), sycl::event());
}

// ensure that output is ample enough to accomodate all elements
// ensure that output is ample enough to accommodate all elements
auto dst_offsets = dst.get_minmax_offsets();
// destination must be ample enough to accomodate all elements
// destination must be ample enough to accommodate all elements
{
size_t range =
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
if (range + 1 < src_nelems) {
throw py::value_error(
"Destination array can not accomodate all the elements "
"Destination array can not accommodate all the elements "
"of source array.");
}
}
Expand Down Expand Up @@ -225,15 +225,15 @@ std::pair<sycl::event, sycl::event> binary_ufunc(
return std::make_pair(sycl::event(), sycl::event());
}

// ensure that output is ample enough to accomodate all elements
// ensure that output is ample enough to accommodate all elements
auto dst_offsets = dst.get_minmax_offsets();
// destination must be ample enough to accomodate all elements
// destination must be ample enough to accommodate all elements
{
size_t range =
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
if (range + 1 < src_nelems) {
throw py::value_error(
"Destination array can not accomodate all the "
"Destination array can not accommodate all the "
"elements of source array.");
}
}
Expand Down Expand Up @@ -329,9 +329,9 @@ bool need_to_call_unary_ufunc(sycl::queue exec_q,
return false;
}

// ensure that output is ample enough to accomodate all elements
// ensure that output is ample enough to accommodate all elements
auto dst_offsets = dst.get_minmax_offsets();
// destination must be ample enough to accomodate all elements
// destination must be ample enough to accommodate all elements
{
size_t range =
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
Expand All @@ -346,7 +346,7 @@ bool need_to_call_unary_ufunc(sycl::queue exec_q,
return false;
}

// suppport only contiguous inputs
// support only contiguous inputs
bool is_src_c_contig = src.is_c_contiguous();
bool is_dst_c_contig = dst.is_c_contiguous();

Expand Down Expand Up @@ -425,9 +425,9 @@ bool need_to_call_binary_ufunc(sycl::queue exec_q,
return false;
}

// ensure that output is ample enough to accomodate all elements
// ensure that output is ample enough to accommodate all elements
auto dst_offsets = dst.get_minmax_offsets();
// destination must be ample enough to accomodate all elements
// destination must be ample enough to accommodate all elements
{
size_t range =
static_cast<size_t>(dst_offsets.second - dst_offsets.first);
Expand All @@ -442,7 +442,7 @@ bool need_to_call_binary_ufunc(sycl::queue exec_q,
return false;
}

// suppport only contiguous inputs
// support only contiguous inputs
bool is_src1_c_contig = src1.is_c_contiguous();
bool is_src2_c_contig = src2.is_c_contiguous();
bool is_dst_c_contig = dst.is_c_contiguous();
Expand Down
14 changes: 7 additions & 7 deletions dpnp/backend/include/dpnp_iface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ INP_DLLEXPORT void
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indeces.
* @param [out] result Output array with indices.
* @param [in] size Number of elements in input arrays.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
Expand Down Expand Up @@ -1069,7 +1069,7 @@ INP_DLLEXPORT void dpnp_searchsorted_c(void *result,
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indeces.
* @param [out] result Output array with indices.
* @param [in] size Number of elements in input arrays.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
Expand Down Expand Up @@ -1564,7 +1564,7 @@ INP_DLLEXPORT void dpnp_min_c(void *array,
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indeces.
* @param [out] result Output array with indices.
* @param [in] size Number of elements in input array.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
Expand All @@ -1585,7 +1585,7 @@ INP_DLLEXPORT void dpnp_argmax_c(void *array, void *result, size_t size);
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indeces.
* @param [out] result Output array with indices.
* @param [in] size Number of elements in input array.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
*/
Expand All @@ -1606,7 +1606,7 @@ INP_DLLEXPORT void dpnp_argmin_c(void *array, void *result, size_t size);
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] input_in Input array with data.
* @param [out] result_out Output array with indeces.
* @param [out] result_out Output array with indices.
* @param [in] input_size Number of elements in input arrays.
* @param [in] decimals Number of decimal places to round. Support
* only with default value 0.
Expand All @@ -1633,7 +1633,7 @@ INP_DLLEXPORT void dpnp_around_c(const void *input_in,
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indeces.
* @param [out] result Output array with indices.
* @param [in] shape Shape of input array.
* @param [in] ndim Number of elements in shape.
* @param [in] axis Axis.
Expand Down Expand Up @@ -1819,7 +1819,7 @@ INP_DLLEXPORT void dpnp_triu_c(void *array,
*
* @param [in] q_ref Reference to SYCL queue.
* @param [in] array Input array with data.
* @param [out] result Output array with indeces.
* @param [out] result Output array with indices.
* @param [in] shape Shape of input array.
* @param [in] ndim Number of elements in shape.
* @param [in] axis Axis.
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/include/dpnp_iface_fptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ DPNPFuncData_t get_dpnp_function_ptr(
* @ingroup BACKEND_API
* @brief get runtime pointer to selected function
*
* Same interface function as @ref get_dpnp_function_ptr with a bit diffrent
* Same interface function as @ref get_dpnp_function_ptr with a bit different
* interface
*
* @param [out] result_type Type of the result provided by the backend API
Expand Down
8 changes: 4 additions & 4 deletions dpnp/backend/include/dpnp_iface_random.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ INP_DLLEXPORT void dpnp_rng_gamma_c(void *result,
/**
* @ingroup BACKEND_RANDOM_API
* @brief math library implementation of random number generator (gaussian
* continious distribution)
* continuous distribution)
*
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result Output array.
Expand Down Expand Up @@ -431,7 +431,7 @@ INP_DLLEXPORT void dpnp_rng_multinomial_c(void *result,
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result Output array.
* @param [in] dimen Dimension of output random vectors.
* @param [in] mean_in Mean arry of dimension.
* @param [in] mean_in Mean array of dimension.
* @param [in] mean_size Length of `mean_in`.
* @param [in] cov Variance-covariance matrix.
* @param [in] cov_size Length of `cov_in`.
Expand Down Expand Up @@ -518,7 +518,7 @@ INP_DLLEXPORT void dpnp_rng_noncentral_chisquare_c(void *result,
/**
* @ingroup BACKEND_RANDOM_API
* @brief math library implementation of random number generator (normal
* continious distribution)
* continuous distribution)
*
* @param [in] q_ref Reference to SYCL queue.
* @param [out] result_out Output array.
Expand Down Expand Up @@ -645,7 +645,7 @@ INP_DLLEXPORT void
* @param [in] itemsize Length of `result` array element in bytes.
* @param [in] ndim Number of array dimensions in `result`
* arrays.
* @param [in] high_dim_size Number of elements in `result` arrays higer
* @param [in] high_dim_size Number of elements in `result` arrays higher
* dimension, or len(result).
* @param [in] size Number of elements in `result` arrays.
* @param [in] dep_event_vec_ref Reference to vector of SYCL events.
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/kernels/dpnp_krnl_bitwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ static void func_map_init_bitwise_1arg_1type(func_map_t &fmap)
} \
\
/* memory transfer optimization, use USM-host for temporary speeds \
* up tranfer to device */ \
* up transfer to device */ \
using usm_host_allocatorT = \
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
\
Expand Down
4 changes: 2 additions & 2 deletions dpnp/backend/kernels/dpnp_krnl_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ DPCTLSyclEventRef dpnp_dot_c(DPCTLSyclQueueRef q_ref,
// TODO: rewrite the condition in general case for ndims > 2
// (looks like there are such another cases)
if (ext_input1_ndim == 2 && ext_input2_ndim == 2) {
// OneMKL gemm suports only arrays contiguous on inner dimension,
// OneMKL gemm supports only arrays contiguous on inner dimension,
// so stride for at least one dimension should be equal to 1
if ((ext_input1_strides[0] == 1 || ext_input1_strides[1] == 1) &&
(ext_input2_strides[0] == 1 || ext_input2_strides[1] == 1) &&
Expand Down Expand Up @@ -392,7 +392,7 @@ DPCTLSyclEventRef dpnp_dot_c(DPCTLSyclQueueRef q_ref,
info = -1;
}

if (info != 0) // an unexected error occurs
if (info != 0) // an unexpected error occurs
{
throw std::runtime_error(error_msg.str());
}
Expand Down
6 changes: 3 additions & 3 deletions dpnp/backend/kernels/dpnp_krnl_elemwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
} \
\
/* memory transfer optimization, use USM-host for temporary speeds \
* up tranfer to device */ \
* up transfer to device */ \
using usm_host_allocatorT = \
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
\
Expand Down Expand Up @@ -754,7 +754,7 @@ constexpr auto dispatch_fmod_op(T elem1, T elem2)
} \
\
/* memory transfer optimization, use USM-host for temporary speeds \
* up tranfer to device */ \
* up transfer to device */ \
using usm_host_allocatorT = \
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
\
Expand Down Expand Up @@ -1146,7 +1146,7 @@ static void func_map_init_elemwise_1arg_1type(func_map_t &fmap)
} \
\
/* memory transfer optimization, use USM-host for temporary speeds \
* up tranfer to device */ \
* up transfer to device */ \
using usm_host_allocatorT = \
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
\
Expand Down
4 changes: 2 additions & 2 deletions dpnp/backend/kernels/dpnp_krnl_logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static sycl::event dpnp_allclose(sycl::queue &q,
}
}

// casting integeral to floating type to avoid bad behavior
// casting integral to floating type to avoid bad behavior
// on abs(MIN_INT), which leads to undefined result
using _Arr2Type = std::conditional_t<std::is_integral_v<_DataType2>,
_TolType, _DataType2>;
Expand Down Expand Up @@ -525,7 +525,7 @@ DPCTLSyclEventRef (*dpnp_any_ext_c)(DPCTLSyclQueueRef,
} \
\
/* memory transfer optimization, use USM-host for temporary speeds \
* up tranfer to device */ \
* up transfer to device */ \
using usm_host_allocatorT = \
sycl::usm_allocator<shape_elem_type, sycl::usm::alloc::host>; \
\
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/src/dpnp_fptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct func_type_map_factory_t : public Ps...
};

/**
* A map of the FPTR interface to link Data type enum value with accociated C++
* A map of the FPTR interface to link Data type enum value with associated C++
* type
*/
typedef func_type_map_factory_t<
Expand Down
3 changes: 2 additions & 1 deletion dpnp/backend/src/dpnp_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
* @ingroup BACKEND_UTILS
* @brief Iterator for @ref DPNPC_id type
*
* This type should be used to simplify data iteraton over input with parameters
* This type should be used to simplify data iteration over input with
* parameters
* "[axis|axes]" It is designed to be used in SYCL environment
*
*/
Expand Down
Loading