Skip to content

Commit

Permalink
Merge 504a8ce into e43b050
Browse files Browse the repository at this point in the history
  • Loading branch information
vtavana authored Sep 20, 2024
2 parents e43b050 + 504a8ce commit a0f0d32
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CMake build and local install directory
_skbuild
build_cython
cython_debug
dpnp.egg-info

# Byte-compiled / optimized / DLL files
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ In addition, this release completes implementation of `dpnp.fft` module and adds
* Resolved an issue with input array of `usm_ndarray` passed into `dpnp.ix_` [#2047](https://github.com/IntelPython/dpnp/pull/2047)
* Added a workaround to prevent crash in tests on Windows in internal CI/CD (when running on either Lunar Lake or Arrow Lake) [#2062](https://github.com/IntelPython/dpnp/pull/2062)
* Fixed a crash in `dpnp.choose` caused by missing control of releasing temporary allocated device memory [#2063](https://github.com/IntelPython/dpnp/pull/2063)
* Resolve compilation warning and error while building in debug mode [#2066](https://github.com/IntelPython/dpnp/pull/2066)


## [0.15.0] - 05/25/2024
Expand Down
3 changes: 2 additions & 1 deletion dpnp/backend/kernels/dpnp_krnl_random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2553,7 +2553,8 @@ DPCTLSyclEventRef

const _DataType d_zero = 0.0, d_one = 1.0;

assert(0. < kappa <= 1.0);
assert(0. < kappa);
assert(kappa <= 1.0);

r = 1 + sqrt(1 + 4 * kappa * kappa);
rho_over_kappa = (2) / (r + sqrt(2 * r));
Expand Down
25 changes: 24 additions & 1 deletion dpnp/backend/src/queue_sycl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,29 @@
}

#if (not defined(NDEBUG))
[[maybe_unused]] static std::string
device_type_to_str(sycl::info::device_type devTy)
{
std::stringstream ss;
switch (devTy) {
case sycl::info::device_type::cpu:
ss << "cpu";
break;
case sycl::info::device_type::gpu:
ss << "gpu";
break;
case sycl::info::device_type::accelerator:
ss << "accelerator";
break;
case sycl::info::device_type::custom:
ss << "custom";
break;
default:
ss << "unknown";
}
return ss.str();
}

[[maybe_unused]] static void show_available_sycl_devices()
{
const std::vector<sycl::device> devices = sycl::device::get_devices();
Expand All @@ -69,7 +92,7 @@
// it->has(sycl::aspect::usm_shared_allocations) << " "
<< " - id=" << it->get_info<sycl::info::device::vendor_id>()
<< ", type="
<< static_cast<pi_uint64>(
<< device_type_to_str(
it->get_info<sycl::info::device::device_type>())
<< ", gws="
<< it->get_info<sycl::info::device::max_work_group_size>()
Expand Down

0 comments on commit a0f0d32

Please sign in to comment.