Skip to content

[SYCL] Add sycl wrappers for fp conversions. #9431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d8062ff
add float2bfloat16 wrappers
jinge90 May 10, 2023
0b0a793
Add wrappers for unsigned integral to bfloat16 convert
jinge90 May 10, 2023
1161d82
add wrappers for int/short to bfloat16
jinge90 May 10, 2023
61eda52
add wrappers for long long to bfloat16
jinge90 May 11, 2023
ab9618d
move fp conversions into a separate file
jinge90 May 11, 2023
822024b
add wrappers for double2bfloat16
jinge90 May 11, 2023
4125c87
add bfloat16 to integral value wrappers
jinge90 May 11, 2023
c1fb391
add ushort_as_bf16, bf16_as_ushort wrappers
jinge90 May 11, 2023
d8e703f
Merge remote-tracking branch 'upstream/sycl' into add_sycl_wrappers_f…
jinge90 May 12, 2023
02dce01
Merge remote-tracking branch 'upstream/sycl' into add_sycl_wrappers_f…
jinge90 May 16, 2023
9c9a1f7
fix clang format issue
jinge90 May 16, 2023
a8d23b8
add wrappers for float to integral convert
jinge90 May 16, 2023
2c131c3
fix clang format
jinge90 May 16, 2023
416687c
add half to integral type conversion
jinge90 May 18, 2023
9125a04
Merge remote-tracking branch 'upstream/sycl' into add_sycl_wrappers_f…
jinge90 May 18, 2023
0a95689
add int2half wrappers
jinge90 May 18, 2023
f94f440
add short2half
jinge90 May 18, 2023
0062a28
add ll2half
jinge90 May 19, 2023
9e377e6
add ull2half
jinge90 May 19, 2023
a5c1690
Merge remote-tracking branch 'upstream/sycl' into add_sycl_wrappers_f…
jinge90 May 22, 2023
b92cd49
Merge remote-tracking branch 'origin/sycl' into add_sycl_wrappers_for…
jinge90 Jun 1, 2023
3f7fbee
remove unnecessary fp conversion utils
jinge90 Aug 8, 2023
256e932
Merge remote-tracking branch 'upstream/sycl' into add_sycl_wrappers_f…
jinge90 Aug 8, 2023
a3485c9
fix inline _V1 namespace break
jinge90 Aug 8, 2023
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
15 changes: 9 additions & 6 deletions sycl/include/sycl/ext/intel/math.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//==------------- math.hpp - Intel specific math API -----------------------==//
//==-------------- math.hpp - Intel specific math API ----------------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -9,11 +9,6 @@
//===----------------------------------------------------------------------===//

#pragma once
#include <sycl/builtins.hpp>
#include <sycl/ext/intel/math/imf_half_trivial.hpp>
#include <sycl/ext/intel/math/imf_simd.hpp>
#include <sycl/half_type.hpp>
#include <type_traits>

// _iml_half_internal is internal representation for fp16 type used in intel
// math device library. The definition here should align with definition in
Expand All @@ -24,6 +19,14 @@ using _iml_half_internal = _Float16;
using _iml_half_internal = uint16_t;
#endif

#include <sycl/builtins.hpp>
#include <sycl/ext/intel/math/imf_fp_conversions.hpp>
#include <sycl/ext/intel/math/imf_half_trivial.hpp>
#include <sycl/ext/intel/math/imf_simd.hpp>
#include <sycl/ext/oneapi/bfloat16.hpp>
#include <sycl/half_type.hpp>
#include <type_traits>

extern "C" {
float __imf_saturatef(float);
float __imf_copysignf(float, float);
Expand Down
Loading