Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

* Adjusted the `pre-commit` configuration to run autoupdate weekly [#2479](https://github.com/IntelPython/dpnp/pull/2479)
* Improved `--target-hip` handling to accept only gfx-prefixed values and allow disabling HIP build [#2479](https://github.com/IntelPython/dpnp/pull/2479)

### Fixed

Expand Down
18 changes: 12 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,19 @@ if ("x${DPNP_SYCL_TARGETS}" STREQUAL "x")
set(_use_onemkl_interfaces_cuda ON)
endif()

if (NOT "x${HIP_TARGETS}" STREQUAL "x")
set(_use_onemkl_interfaces_hip ON)

if ("x${_dpnp_sycl_targets}" STREQUAL "x")
set(_dpnp_sycl_targets "amd_gpu_${HIP_TARGETS},spir64-unknown-unknown")
if (HIP_TARGETS)
if (HIP_TARGETS MATCHES "^gfx")
if ("x${_dpnp_sycl_targets}" STREQUAL "x")
set(_dpnp_sycl_targets "amd_gpu_${HIP_TARGETS},spir64-unknown-unknown")
else()
set(_dpnp_sycl_targets "amd_gpu_${HIP_TARGETS},${_dpnp_sycl_targets}")
endif()
set(_use_onemkl_interfaces_hip ON)
else()
set(_dpnp_sycl_targets "amd_gpu_${HIP_TARGETS},${_dpnp_sycl_targets}")
message(FATAL_ERROR
"Invalid value for HIP_TARGETS: \"${HIP_TARGETS}\". "
"Expected an architecture name starting with 'gfx', e.g. 'gfx1030'."
)
endif()
endif()
else()
Expand Down
Loading