Skip to content

Merge master into gold/2021 #1315

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 37 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
938a0a6
Complete support of python 3.10 in external CI (#1269)
antonwolfy Jan 16, 2023
12e7bd5
Set minimum required versions & fix debug building (#1270)
antonwolfy Jan 16, 2023
9209351
Add support of NumPy 1.24 (#1276)
antonwolfy Jan 23, 2023
082fb92
Get rid of 'has_aspect_host' property in tests (#1274)
antonwolfy Jan 23, 2023
67e7f87
Add support of dpnp.less_equal() (#1275)
antonwolfy Jan 24, 2023
09a387a
Add support of comparison operations (#1278)
antonwolfy Jan 25, 2023
20defc5
Use eye() function from dpctl.tensor. (#1271)
npolina4 Jan 31, 2023
733b32c
Get rid of unsupported types in array creation tests (#1283)
antonwolfy Jan 31, 2023
744a3f2
Add support of logical comparison operations (#1280)
antonwolfy Feb 1, 2023
351c6a6
Add device and sycl_queue keyword arguments to random calls (#1277)
antonwolfy Feb 3, 2023
3228470
add __repr__
vtavana Jan 23, 2023
333b4fc
add __str__
vtavana Jan 24, 2023
67d5cb1
reviewer's comments
vtavana Feb 1, 2023
cb3421c
Fixed gh-1272 (#1287)
npolina4 Feb 7, 2023
9308f64
Support high=None in dpnp.randint() (#1284)
antonwolfy Feb 8, 2023
30d3ada
linter changes applied
oleksandr-pavlyk Feb 8, 2023
06533eb
Add operation __index__ and __complex__ (#1285)
antonwolfy Feb 9, 2023
e327dfb
Update tests with proper call of dpctl.SyclQueue() (#1290)
antonwolfy Feb 9, 2023
5018352
Merge branch 'master' into print_dpnp_array
oleksandr-pavlyk Feb 9, 2023
d1acfaf
Update minimum required versions of dependent components. (#1289)
antonwolfy Feb 9, 2023
0189d6b
Merge branch 'master' into print_dpnp_array
oleksandr-pavlyk Feb 9, 2023
863f587
dpnp.add() doesn't work properly with a scalar (#1288)
antonwolfy Feb 11, 2023
0f7420e
Merge pull request #1279 from IntelPython/print_dpnp_array
oleksandr-pavlyk Feb 13, 2023
03450eb
Add dlpack support with tests and docstrings
vlad-perevezentsev Feb 14, 2023
75695ce
Add a test for dlpack with dpt
vlad-perevezentsev Feb 14, 2023
4c158da
Fix remarks, add _create_from_usm_ndarray func and move tests to test…
vlad-perevezentsev Feb 15, 2023
439f2b5
Use tril() and triu() function from dpctl.tensor (#1286)
npolina4 Feb 16, 2023
103eb88
Merge branch 'master' into dlpack_support
antonwolfy Feb 16, 2023
a516f1c
dpnp.subtract() doesn't work properly with a scalar (#1292)
antonwolfy Feb 16, 2023
6640e9e
Merge pull request #1296 from vlad-perevezentsev/dlpack_support
oleksandr-pavlyk Feb 16, 2023
19715de
dpnp.divide() doesn't work properly with a scalar (#1295)
antonwolfy Feb 16, 2023
d22214c
Updae example3 building from debug build script (#1298)
antonwolfy Feb 17, 2023
7bddfbe
Remove temporary solution accepting CFD with equal SYCL context inste…
antonwolfy Feb 17, 2023
d7219e2
Intel LLVM is to use conda's gcc toolchain, sysroot and target librar…
antonwolfy Feb 18, 2023
4012c98
Tests are crashing if no default device (#1311)
antonwolfy Feb 21, 2023
307fceb
Setting version to 0.11.1 (#1308)
antonwolfy Feb 23, 2023
82040a5
Merge master into gold/2021
antonwolfy Feb 23, 2023
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
11 changes: 4 additions & 7 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ jobs:

strategy:
matrix:
python: ['3.8', '3.9']
python: ['3.8', '3.9', '3.10']
os: [ubuntu-20.04, windows-latest]
include:
- python: '3.10'
os: ubuntu-20.04

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -110,7 +107,7 @@ jobs:

strategy:
matrix:
python: ['3.8', '3.9']
python: ['3.8', '3.9', '3.10']
os: [ubuntu-20.04, ubuntu-latest]

experimental: [false]
Expand Down Expand Up @@ -215,7 +212,7 @@ jobs:

strategy:
matrix:
python: ['3.8', '3.9']
python: ['3.8', '3.9', '3.10']
experimental: [false]

continue-on-error: ${{ matrix.experimental }}
Expand Down Expand Up @@ -384,7 +381,7 @@ jobs:

strategy:
matrix:
python: ['3.8', '3.9']
python: ['3.8', '3.9', '3.10']
os: [ubuntu-20.04, windows-latest]

runs-on: ${{ matrix.os }}
Expand Down
13 changes: 11 additions & 2 deletions 0.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ THEDIR=$(dirname $(readlink -e ${BASH_SOURCE[0]}))
# . ${THEDIR}/0.env.sh
cd ${THEDIR}

# Assign $TMP env variable to a directory where the script locates.
# The env variable is used by compiler as a path to temporary folder,
# where it can store a temporary files generated during compilation and linkage phases.
# By default the compiler uses /tmp folder, but it is limited by the size and
# there might be not enough space to temporary keep all generated data.
export TMP=${THEDIR}


export DPNP_DEBUG=1

python setup.py clean
Expand All @@ -17,7 +25,8 @@ CC=icpx python setup.py build_ext --inplace

echo
echo =========example3==============
icpx -fsycl -g -fPIC dpnp/backend/examples/example3.cpp -Idpnp -Idpnp/backend/include -Ldpnp -Wl,-rpath='$ORIGIN'/dpnp -ldpnp_backend_c -o example3
DPCTL_INCLUDES=$(python -m dpctl --includes)
icpx -fsycl -g -O0 -ggdb3 -fPIC dpnp/backend/examples/example3.cpp $DPCTL_INCLUDES -Idpnp -Idpnp/backend/include -Ldpnp -Wl,-rpath='$ORIGIN'/dpnp -ldpnp_backend_c -o example3
# LD_DEBUG=libs,bindings,symbols ./example3
./example3

Expand All @@ -39,7 +48,7 @@ icpx -fsycl -g -fPIC dpnp/backend/examples/example3.cpp -Idpnp -Idpnp/backend/in
# strings /usr/share/miniconda/envs/dpnp*/lib/libstdc++.so | grep GLIBCXX | sort -n


# echo
echo
echo =========example1==============
# LD_DEBUG=libs,bindings,symbols python examples/example1.py
# LD_DEBUG=libs python examples/example1.py
Expand Down
5 changes: 5 additions & 0 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ fi
export CFLAGS="-Wl,-rpath,\$ORIGIN/../dpctl,-rpath,\$ORIGIN $CFLAGS"
export LDFLAGS="-Wl,-rpath,\$ORIGIN/../dpctl,-rpath,\$ORIGIN $LDFLAGS"

# Intel LLVM must cooperate with compiler and sysroot from conda
echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icpx_for_conda.cfg
export ICPXCFG="$(pwd)/icpx_for_conda.cfg"
export ICXCFG="$(pwd)/icpx_for_conda.cfg"

$PYTHON setup.py build_clib
$PYTHON setup.py build_ext install

Expand Down
8 changes: 4 additions & 4 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ requirements:
- numpy 1.19
- cython
- cmake >=3.19
- dpctl >=0.13
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2021.1.1') }}
- dpctl >=0.14
- mkl-devel-dpcpp {{ environ.get('MKL_VER', '>=2023.0.0') }}
- onedpl-devel
- tbb-devel
- wheel
build:
- {{ compiler('cxx') }}
- {{ compiler('dpcpp') }} >=2022.1 # [not osx]
- {{ compiler('dpcpp') }} >=2023.0 # [not osx]
run:
- python
- dpctl >=0.13
- dpctl >=0.14
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('mkl-dpcpp', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x') }}
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# The short X.Y version
version = '0.11'
# The full version, including alpha/beta/rc tags
release = '0.11.0'
release = '0.11.1'


# -- General configuration ---------------------------------------------------
Expand Down
23 changes: 15 additions & 8 deletions dpnp/backend/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# *****************************************************************************
# Copyright (c) 2016-2022, Intel Corporation
# Copyright (c) 2016-2023, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -27,7 +27,7 @@

cmake_minimum_required(VERSION 3.10 FATAL_ERROR)

# set(DPNP_VERSION 0.11.0)
# set(DPNP_VERSION 0.11.1)
# set(DPNP_API_VERSION 0.11)

# set directory where the custom finders live
Expand Down Expand Up @@ -93,6 +93,7 @@ string(CONCAT COMMON_COMPILE_FLAGS
"-fsycl "
"-fsycl-device-code-split=per_kernel "
"-fno-approx-func "
"-fno-finite-math-only "
)
string(CONCAT COMMON_LINK_FLAGS
"-fsycl "
Expand All @@ -111,7 +112,7 @@ elseif(WIN32)
# set(CMAKE_RANLIB "llvm-ranlib")
# set(CMAKE_CXX_FLAGS "/EHsc")

string(APPEND COMMON_COMPILER_FLAGS
string(APPEND COMMON_COMPILE_FLAGS
"/EHsc "
# "/Ox "
# "/W3 "
Expand All @@ -133,23 +134,29 @@ string(CONCAT DPNP_WARNING_FLAGS
"-Wextra "
"-Wshadow "
"-Wall "
"-Wstring-prototypes "
"-Wstrict-prototypes "
"-Wformat "
"-Wformat-security "
)
string(APPEND COMMON_COMPILER_FLAGS
string(APPEND COMMON_COMPILE_FLAGS
"${DPNP_WARNING_FLAGS}"
)

# debug/release compile definitions
if(DPNP_DEBUG_ENABLE)
set(CMAKE_BUILD_TYPE "Debug")
string(APPEND COMMON_COMPILER_FLAGS
string(APPEND COMMON_COMPILE_FLAGS
"-O0 "
"-ggdb3 "
)
string(APPEND COMMON_LINK_FLAGS
"-O0 "
"-ggdb3 "
"-fsycl-link-huge-device-code "
)
else()
set(CMAKE_BUILD_TYPE "Release")
string(APPEND COMMON_COMPILER_FLAGS
string(APPEND COMMON_COMPILE_FLAGS
"-O3 "
)
endif()
Expand All @@ -162,7 +169,7 @@ string(CONCAT DPNP_DEFS
"-D_FORTIFY_SOURCE=2 "
)
if(NOT WIN32)
string(APPEND COMMON_COMPILER_FLAGS
string(APPEND COMMON_COMPILE_FLAGS
"-fno-delete-null-pointer-checks "
"-fstack-protector-strong "
"-fno-strict-overflow "
Expand Down
2 changes: 1 addition & 1 deletion dpnp/backend/doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "DPNP C++ backend kernel library"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.11.0
PROJECT_NUMBER = 0.11.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
69 changes: 63 additions & 6 deletions dpnp/backend/include/dpnp_gen_1arg_1type_tbl.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//*****************************************************************************
// Copyright (c) 2016-2020, Intel Corporation
// Copyright (c) 2016-2023, Intel Corporation
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand All @@ -23,6 +23,8 @@
// THE POSSIBILITY OF SUCH DAMAGE.
//*****************************************************************************

#if defined(MACRO_1ARG_1TYPE_OP)

/*
* This header file contains single argument element wise functions definitions
*
Expand All @@ -35,10 +37,6 @@
*
*/

#ifndef MACRO_1ARG_1TYPE_OP
#error "MACRO_1ARG_1TYPE_OP is not defined"
#endif

#ifdef _SECTION_DOCUMENTATION_GENERATION_

#define MACRO_1ARG_1TYPE_OP(__name__, __operation1__, __operation2__) \
Expand Down Expand Up @@ -88,7 +86,7 @@
const shape_elem_type* input1_strides, \
const size_t* where);

#endif
#endif // _SECTION_DOCUMENTATION_GENERATION_

MACRO_1ARG_1TYPE_OP(dpnp_conjugate_c, std::conj(input_elem), q.submit(kernel_func))
MACRO_1ARG_1TYPE_OP(dpnp_copy_c, input_elem, q.submit(kernel_func))
Expand All @@ -107,3 +105,62 @@ MACRO_1ARG_1TYPE_OP(dpnp_square_c,
oneapi::mkl::vm::sqr(q, input1_size, input1_data, result))

#undef MACRO_1ARG_1TYPE_OP

#elif defined(MACRO_1ARG_1TYPE_LOGIC_OP)

/*
* This header file contains single argument element wise functions definitions
*
* Macro `MACRO_1ARG_1TYPE_LOGIC_OP` must be defined before usage
*
* Parameters:
* - public name of the function and kernel name
* - operation used to calculate the result
*
*/

#ifdef _SECTION_DOCUMENTATION_GENERATION_

#define MACRO_1ARG_1TYPE_LOGIC_OP(__name__, __operation__) \
/** @ingroup BACKEND_API */ \
/** @brief Per element operation function __name__ */ \
/** */ \
/** Function "__name__" executes operator "__operation__" over corresponding elements of input array */ \
/** */ \
/** @param[in] q_ref Reference to SYCL queue. */ \
/** @param[out] result_out Output array. */ \
/** @param[in] result_size Output array size. */ \
/** @param[in] result_ndim Number of output array dimensions. */ \
/** @param[in] result_shape Output array shape. */ \
/** @param[in] result_strides Output array strides. */ \
/** @param[in] input1_in Input array 1. */ \
/** @param[in] input1_size Input array 1 size. */ \
/** @param[in] input1_ndim Number of input array 1 dimensions. */ \
/** @param[in] input1_shape Input array 1 shape. */ \
/** @param[in] input1_strides Input array 1 strides. */ \
/** @param[in] where Where condition. */ \
/** @param[in] dep_event_vec_ref Reference to vector of SYCL events. */ \
template <typename _DataType_input1> \
DPCTLSyclEventRef __name__(DPCTLSyclQueueRef q_ref, \
void* result_out, \
const size_t result_size, \
const size_t result_ndim, \
const shape_elem_type* result_shape, \
const shape_elem_type* result_strides, \
const void* input1_in, \
const size_t input1_size, \
const size_t input1_ndim, \
const shape_elem_type* input1_shape, \
const shape_elem_type* input1_strides, \
const size_t* where, \
const DPCTLEventVectorRef dep_event_vec_ref);

#endif // _SECTION_DOCUMENTATION_GENERATION_

MACRO_1ARG_1TYPE_LOGIC_OP(dpnp_logical_not_c, !input1_elem)

#undef MACRO_1ARG_1TYPE_LOGIC_OP

#else
#error "MACRO_1ARG_1TYPE_OP or MACRO_1ARG_1TYPE_LOGIC_OP is not defined"
#endif // MACRO_1ARG_1TYPE_OP || MACRO_1ARG_1TYPE_LOGIC_OP
Loading