Skip to content
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ This release drops support for Python 3.10, making Python 3.11 the minimum requi
* Fixed the example of handling duplicate indices in the `dpnp.tensor.put` docstring, which imported `dpctl.tensor`, did not parse and lost writes when `x` is longer than `indices` [#3165](https://github.com/IntelPython/dpnp/pull/3165)
* Fixed a segfault when setting `writable` on a `Flags` object created without an array [#3168](https://github.com/IntelPython/dpnp/pull/3168)
* Fixed a crash of the OpenCL CPU compiler in `dpnp.sort`, `dpnp.argsort`, `dpnp.tensor.sort` and `dpnp.tensor.argsort` by radix sort of rows of 2049 to 16384 elements [#3191](https://github.com/IntelPython/dpnp/pull/3191)
* Fixed a random segfault of the OpenCL CPU runtime in coverage builds by instrumenting only host code [#3193](https://github.com/IntelPython/dpnp/pull/3193)

### Security

Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,12 @@ mark_as_advanced(
)

if(DPNP_GENERATE_COVERAGE)
# Host only: device counters become device globals in every kernel image of
# their module, which crash the OpenCL CPU runtime, and never reach the profile
string(
CONCAT PROFILE_FLAGS
"-fprofile-instr-generate "
"-fcoverage-mapping "
"-Xarch_host -fprofile-instr-generate "
"-Xarch_host -fcoverage-mapping "
"-fno-sycl-use-footer "
# "-save-temps=obj "
)
Expand Down
4 changes: 1 addition & 3 deletions dpnp/cmake/tensor_build_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ endif()
# Remove global coverage flags for tensor
# use link-time only approach like dpctl
if(DPNP_GENERATE_COVERAGE)
string(REPLACE "-fprofile-instr-generate " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "-fcoverage-mapping " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "-fno-sycl-use-footer " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "${PROFILE_FLAGS}" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()

# Tensor-specific debug flags
Expand Down
7 changes: 6 additions & 1 deletion dpnp/libtensor/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,12 @@ foreach(_src_fn ${_dpnp_sources})
"${_clang_prefix}-fno-finite-math-only"
)
if(DPNP_GENERATE_COVERAGE)
# host only, as PROFILE_FLAGS in the top-level CMakeLists.txt
list(
APPEND _combined_options_prop
-Xarch_host
-fprofile-instr-generate
-Xarch_host
-fcoverage-mapping
-fno-sycl-use-footer
)
Expand Down Expand Up @@ -413,7 +416,9 @@ foreach(python_module_name ${_py_trgts})
if(DPNP_TENSOR_GENERATE_COVERAGE_FOR_PYBIND11_EXTENSIONS)
target_compile_options(
${python_module_name}
PRIVATE -fprofile-instr-generate -fcoverage-mapping
PRIVATE
"SHELL:-Xarch_host -fprofile-instr-generate"
"SHELL:-Xarch_host -fcoverage-mapping"
)
endif()
target_link_options(
Expand Down
Loading