diff --git a/libdevice/complex_wrapper.cpp b/libdevice/complex_wrapper.cpp index f01872fb6aee1..5cddc34ea31ea 100644 --- a/libdevice/complex_wrapper.cpp +++ b/libdevice/complex_wrapper.cpp @@ -8,7 +8,8 @@ #include "device_complex.h" -#if defined(__SPIR__) || defined(__SPIRV__) +#if defined(__SPIR__) || defined(__SPIRV__) || defined(__NVPTX__) || \ + defined(__AMDGCN__) DEVICE_EXTERN_C_INLINE float cimagf(float __complex__ z) { return __devicelib_cimagf(z); } diff --git a/libdevice/complex_wrapper_fp64.cpp b/libdevice/complex_wrapper_fp64.cpp index d3f42face5ec3..030309b536845 100644 --- a/libdevice/complex_wrapper_fp64.cpp +++ b/libdevice/complex_wrapper_fp64.cpp @@ -9,7 +9,8 @@ #include "device_complex.h" -#if defined(__SPIR__) || defined(__SPIRV__) +#if defined(__SPIR__) || defined(__SPIRV__) || defined(__NVPTX__) || \ + defined(__AMDGCN__) DEVICE_EXTERN_C_INLINE double cimag(double __complex__ z) { return __devicelib_cimag(z); } diff --git a/libdevice/device_complex.h b/libdevice/device_complex.h index 6fa4254ff2025..9dd444c1c97c7 100644 --- a/libdevice/device_complex.h +++ b/libdevice/device_complex.h @@ -10,7 +10,8 @@ #include "device.h" -#if defined(__SPIR__) || defined(__SPIRV__) +#if defined(__SPIR__) || defined(__SPIRV__) || defined(__NVPTX__) || \ + defined(__AMDGCN__) // TODO: This needs to be more robust. // clang doesn't recognize the c11 CMPLX macro, but it does have diff --git a/libdevice/fallback-complex-fp64.cpp b/libdevice/fallback-complex-fp64.cpp index 28a5be8ab4a48..31339ff520436 100644 --- a/libdevice/fallback-complex-fp64.cpp +++ b/libdevice/fallback-complex-fp64.cpp @@ -9,7 +9,8 @@ #include "device_complex.h" -#if defined(__SPIR__) || defined(__SPIRV__) +#if defined(__SPIR__) || defined(__SPIRV__) || defined(__NVPTX__) || \ + defined(__AMDGCN__) #include // To support fallback device libraries on-demand loading, please update the diff --git a/libdevice/fallback-complex.cpp b/libdevice/fallback-complex.cpp index 9f94195a3a407..704105ee57aeb 100644 --- a/libdevice/fallback-complex.cpp +++ b/libdevice/fallback-complex.cpp @@ -8,7 +8,8 @@ #include "device_complex.h" -#if defined(__SPIR__) || defined(__SPIRV__) +#if defined(__SPIR__) || defined(__SPIRV__) || defined(__NVPTX__) || \ + defined(__AMDGCN__) #include // To support fallback device libraries on-demand loading, please update the diff --git a/sycl/test-e2e/DeviceLib/std_complex_math_fp64_test.cpp b/sycl/test-e2e/DeviceLib/std_complex_math_fp64_test.cpp index 2a55331a2c107..18abb3c1418f8 100644 --- a/sycl/test-e2e/DeviceLib/std_complex_math_fp64_test.cpp +++ b/sycl/test-e2e/DeviceLib/std_complex_math_fp64_test.cpp @@ -1,5 +1,4 @@ // REQUIRES: aspect-fp64 -// UNSUPPORTED: target-amd || target-nvidia // XFAIL: windows && arch-intel_gpu_bmg_g21 // XFAIL-TRACKER: https://github.com/intel/llvm/issues/17165 // RUN: %{build} -o %t1.out diff --git a/sycl/test-e2e/DeviceLib/std_complex_math_test.cpp b/sycl/test-e2e/DeviceLib/std_complex_math_test.cpp index 1ab49e7c89087..de10eea19c117 100644 --- a/sycl/test-e2e/DeviceLib/std_complex_math_test.cpp +++ b/sycl/test-e2e/DeviceLib/std_complex_math_test.cpp @@ -1,5 +1,4 @@ // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%} -// UNSUPPORTED: target-amd || target-nvidia // RUN: %{build} %{mathflags} -o %t1.out // RUN: %{run} %t1.out diff --git a/sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp b/sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp index 854402105bf9a..eda2920b3b9d2 100644 --- a/sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp +++ b/sycl/test/e2e_test_requirements/no-unsupported-without-info.cpp @@ -54,7 +54,7 @@ // tests to match the required format and in that case you should just update // (i.e. reduce) the number and the list below. // -// NUMBER-OF-UNSUPPORTED-WITHOUT-INFO: 257 +// NUMBER-OF-UNSUPPORTED-WITHOUT-INFO: 255 // // List of improperly UNSUPPORTED tests. // Remove the CHECK once the test has been properly UNSUPPORTED. @@ -117,8 +117,6 @@ // CHECK-NEXT: DeviceLib/imf_simd_emulate_test.cpp // CHECK-NEXT: DeviceLib/rand_test.cpp // CHECK-NEXT: DeviceLib/separate_compile_test.cpp -// CHECK-NEXT: DeviceLib/std_complex_math_fp64_test.cpp -// CHECK-NEXT: DeviceLib/std_complex_math_test.cpp // CHECK-NEXT: ESIMD/PerformanceTests/BitonicSortK.cpp // CHECK-NEXT: ESIMD/PerformanceTests/BitonicSortKv2.cpp // CHECK-NEXT: ESIMD/PerformanceTests/Stencil.cpp