Skip to content

Commit a4f86b5

Browse files
committed
Add erfcx implementation for non-Intel devices
1 parent a84a5a4 commit a4f86b5

File tree

4 files changed

+1702
-5
lines changed

4 files changed

+1702
-5
lines changed

dpnp/backend/kernels/elementwise_functions/erf.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@
3535
/**
3636
* Include <sycl/ext/intel/math.hpp> only when targeting to Intel devices.
3737
*/
38-
#if defined(__INTEL_LLVM_COMPILER)
38+
#if (defined(__SPIR__) || defined(__SPIRV__)) && defined(__INTEL_LLVM_COMPILER)
3939
#define __SYCL_EXT_INTEL_MATH_SUPPORT
4040
#endif
4141

4242
#if defined(__SYCL_EXT_INTEL_MATH_SUPPORT)
4343
#include <sycl/ext/intel/math.hpp>
4444
#else
45-
#include <cmath>
45+
#include "erfcx.hpp"
4646
#endif
4747

4848
namespace dpnp::kernels::erfs
@@ -91,7 +91,7 @@ MACRO_DEFINE_FUNCTOR(
9191
#if defined(__SYCL_EXT_INTEL_MATH_SUPPORT)
9292
sycl::ext::intel::math::erfcx,
9393
#else
94-
std::erfc,
94+
impl::erfcx,
9595
#endif
9696
Erfcx);
9797
} // namespace dpnp::kernels::erfs

0 commit comments

Comments
 (0)