@@ -78,15 +78,12 @@ option(DPNP_USE_ONEMKL_INTERFACES
7878set (HIP_TARGETS "" CACHE STRING "HIP architecture for target" )
7979
8080set (_dpnp_sycl_targets)
81- set (_dpnp_amd_targets)
8281set (_use_onemkl_interfaces OFF )
8382set (_use_onemkl_interfaces_cuda OFF )
8483set (_use_onemkl_interfaces_hip OFF )
8584
8685set (_dpnp_sycl_target_compile_options)
8786set (_dpnp_sycl_target_link_options)
88- set (_dpnp_sycl_mkl_target_compile_options)
89- set (_dpnp_sycl_mkl_target_link_options)
9087
9188if ("x${DPNP_SYCL_TARGETS} " STREQUAL "x" )
9289 if (DPNP_TARGET_CUDA)
@@ -95,53 +92,43 @@ if ("x${DPNP_SYCL_TARGETS}" STREQUAL "x")
9592 endif ()
9693
9794 if (NOT "x${HIP_TARGETS} " STREQUAL "x" )
98- set (_dpnp_amd_targets ${HIP_TARGETS} )
9995 set (_use_onemkl_interfaces_hip ON )
10096
10197 if ("x${_dpnp_sycl_targets} " STREQUAL "x" )
102- set (_dpnp_sycl_targets "amdgcn-amd-amdhsa ,spir64-unknown-unknown" )
98+ set (_dpnp_sycl_targets "amd_gpu_ ${HIP_TARGETS} ,spir64-unknown-unknown" )
10399 else ()
104- set (_dpnp_sycl_targets "amdgcn-amd-amdhsa ,${_dpnp_sycl_targets} " )
100+ set (_dpnp_sycl_targets "amd_gpu_ ${HIP_TARGETS} ,${_dpnp_sycl_targets} " )
105101 endif ()
106102 endif ()
107103else ()
108104 set (_dpnp_sycl_targets ${DPNP_SYCL_TARGETS} )
109105
110- if (${DPNP_SYCL_TARGETS} MATCHES "nvptx64-nvidia-cuda" )
106+ if (" ${DPNP_SYCL_TARGETS} " MATCHES "nvptx64-nvidia-cuda" )
111107 set (_use_onemkl_interfaces ON )
112108 set (_use_onemkl_interfaces_cuda ON )
113109 endif ()
114110
115- if (${DPNP_SYCL_TARGETS} MATCHES "amdgcn-amd-amdhsa " )
111+ if (" ${DPNP_SYCL_TARGETS} " MATCHES "amd_gpu_ " )
116112 set (_use_onemkl_interfaces ON )
117113 set (_use_onemkl_interfaces_hip ON )
118114
119- if (NOT "x${HIP_TARGETS} " STREQUAL "x" )
120- set (_dpnp_amd_targets ${HIP_TARGETS} )
121- else ()
115+ if ("x${HIP_TARGETS} " STREQUAL "x" )
122116 message (FATAL_ERROR "HIP_TARGETS must be specified when using HIP backend" )
123117 endif ()
124118 endif ()
119+
120+ if ("${DPNP_SYCL_TARGETS} " MATCHES "amdgcn-amd-amdhsa" )
121+ message (FATAL_ERROR
122+ "Legacy target 'amdgcn-amd-amdhsa' is not supported. "
123+ "Use alias form 'amd_gpu_<arch>' instead"
124+ )
125+ endif ()
125126endif ()
126127
127128if (_dpnp_sycl_targets)
128129 message (STATUS "Compiling for -fsycl-targets=${_dpnp_sycl_targets} " )
129130 list (APPEND _dpnp_sycl_target_compile_options -fsycl-targets=${_dpnp_sycl_targets} )
130131 list (APPEND _dpnp_sycl_target_link_options -fsycl-targets=${_dpnp_sycl_targets} )
131- list (APPEND _dpnp_sycl_mkl_target_compile_options -fsycl-targets=${_dpnp_sycl_targets} )
132- list (APPEND _dpnp_sycl_mkl_target_link_options -fsycl-targets=${_dpnp_sycl_targets} )
133- if (_dpnp_amd_targets)
134- set (_dpnp_hip_compile_options -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=${_dpnp_amd_targets} )
135- set (_dpnp_hip_mkl_compile_options -Xsycl-target-backend --offload-arch=${_dpnp_amd_targets} )
136-
137- # Append HIP-specific flags for general SYCL modules
138- list (APPEND _dpnp_sycl_target_compile_options ${_dpnp_hip_compile_options} )
139- list (APPEND _dpnp_sycl_target_link_options ${_dpnp_hip_compile_options} )
140-
141- # Append HIP-specific flags for MKL modules
142- list (APPEND _dpnp_sycl_mkl_target_compile_options -fsycl-unnamed-lambda ${_dpnp_hip_mkl_compile_options} )
143- list (APPEND _dpnp_sycl_mkl_target_link_options ${_dpnp_hip_mkl_compile_options} )
144- endif ()
145132endif ()
146133
147134if (DPNP_USE_ONEMKL_INTERFACES)
0 commit comments