Skip to content

Commit ba9fb05

Browse files
authored
[SYCL][FPGA] Add new argument to __spirv_ArbitraryFloatPowNINTEL (#5170)
Signed-off-by: Mikhail Lychkov <[email protected]>
1 parent 6fd6098 commit ba9fb05

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

sycl/include/CL/__spirv/spirv_ops.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -697,13 +697,13 @@ __spirv_ArbitraryFloatPowRINTEL(cl::sycl::detail::ap_int<WA> A, int32_t MA,
697697
int32_t RoundingAccuracy = 0) noexcept;
698698

699699
// PowN built-in calculates `A^B` where `A` is arbitrary precision floating
700-
// point number and `B` is arbitrary precision integer, i.e. its width doesn't
701-
// depend on sum of exponent and mantissa.
700+
// point number and `B` is signed or unsigned arbitrary precision integer,
701+
// i.e. its width doesn't depend on sum of exponent and mantissa.
702702
template <int WA, int WB, int Wout>
703703
extern SYCL_EXTERNAL cl::sycl::detail::ap_int<Wout>
704704
__spirv_ArbitraryFloatPowNINTEL(cl::sycl::detail::ap_int<WA> A, int32_t MA,
705-
cl::sycl::detail::ap_int<WB> B, int32_t Mout,
706-
int32_t EnableSubnormals = 0,
705+
cl::sycl::detail::ap_int<WB> B, bool SignOfB,
706+
int32_t Mout, int32_t EnableSubnormals = 0,
707707
int32_t RoundingMode = 0,
708708
int32_t RoundingAccuracy = 0) noexcept;
709709

sycl/test/check_device_code/fpga_ihs_float.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ constexpr int32_t RndMode = 2;
1616
constexpr int32_t RndAcc = 1;
1717
constexpr bool FromSign = false;
1818
constexpr bool ToSign = true;
19+
constexpr bool SignOfB = false;
1920

2021
template <int EA, int MA, int Eout, int Mout>
2122
void ap_float_cast() {
@@ -390,8 +391,8 @@ void ap_float_pown() {
390391
sycl::detail::ap_int<WB> B;
391392
sycl::detail::ap_int<1 + Eout + Mout> pown_res =
392393
__spirv_ArbitraryFloatPowNINTEL<1 + EA + MA, WB, 1 + Eout + Mout>(
393-
A, MA, B, Mout, Subnorm, RndMode, RndAcc);
394-
// CHECK: call spir_func signext i15 @_Z{{[0-9]+}}__spirv_ArbitraryFloatPowNINTEL{{.*}}(i12 signext {{[%a-z0-9.]+}}, i32 7, i10 signext {{[%a-z0-9.]+}}, i32 9, i32 0, i32 2, i32 1)
394+
A, MA, B, SignOfB, Mout, Subnorm, RndMode, RndAcc);
395+
// CHECK: call spir_func signext i15 @_Z{{[0-9]+}}__spirv_ArbitraryFloatPowNINTEL{{.*}}(i12 signext {{[%a-z0-9.]+}}, i32 7, i10 signext {{[%a-z0-9.]+}}, i1 zeroext false, i32 9, i32 0, i32 2, i32 1)
395396
}
396397

397398
template <typename name, typename Func>

0 commit comments

Comments
 (0)