Skip to content
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

[SYCL][libdevice] Add bfloat16 imf utils. #6999

Merged
merged 16 commits into from
Nov 22, 2022

Conversation

jinge90
Copy link
Contributor

@jinge90 jinge90 commented Oct 8, 2022

Signed-off-by: jinge90 ge.jin@intel.com
This PR adds a new SYCL device library for bf16 type. Some bf16 util functions will be supported via this new added device library. This patch includes fundamental changes to add this bf16 device library and provide necessary conversion functions between fp32 and bf16 types, some trival math functions are also provided.
Currently, we use fp32 to emulate all those fb16 functions, so the bf16 sycl device library doesn't need native bf16 support.

@jinge90 jinge90 requested review from a team as code owners October 8, 2022 07:54
@jinge90 jinge90 requested a review from cperkinsintel October 8, 2022 07:54
@jinge90 jinge90 marked this pull request as draft October 8, 2022 07:54
Signed-off-by: jinge90 <ge.jin@intel.com>
Signed-off-by: jinge90 <ge.jin@intel.com>
Signed-off-by: jinge90 <ge.jin@intel.com>
Signed-off-by: jinge90 <ge.jin@intel.com>
Signed-off-by: jinge90 <ge.jin@intel.com>
Signed-off-by: jinge90 <ge.jin@intel.com>
@jinge90
Copy link
Contributor Author

jinge90 commented Oct 12, 2022

Hi, @zettai-reido and @akolesov-intel
Although this patch is a draft, I'd like to invite you to take a rough look to see if it meets our requirement to implement bf16 functions based on fp32. If it meets our requirement, I will proceed to add more bf16 inline trivial functions and develop corresponding tests.

Thanks very much.

Signed-off-by: jinge90 <ge.jin@intel.com>
@akolesov-nv
Copy link

The draft looks good for me so far, thank you!

@jinge90 jinge90 marked this pull request as ready for review November 7, 2022 06:31
@jinge90
Copy link
Contributor Author

jinge90 commented Nov 7, 2022

Hi, @intel/dpcpp-clang-driver-reviewers , @intel/dpcpp-tools-reviewers , @intel/llvm-reviewers-runtime
Could you help review this patch?

Thanks very much.

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runtime changes LGTM!

@jinge90
Copy link
Contributor Author

jinge90 commented Nov 8, 2022

/verify with intel/llvm-test-suite#1364

@jinge90
Copy link
Contributor Author

jinge90 commented Nov 8, 2022

Hi, @intel/dpcpp-tools-reviewers
Could you take a look at this patch?

Thanks very much.

@jinge90
Copy link
Contributor Author

jinge90 commented Nov 9, 2022

Hi, @asudarsa
Could you take a look at this patch?

Thanks very much.

@jinge90
Copy link
Contributor Author

jinge90 commented Nov 10, 2022

Hi, @pvchupin @intel/dpcpp-tools-reviewers
Could you take a look at this patch?

Thanks very much.

@jinge90
Copy link
Contributor Author

jinge90 commented Nov 11, 2022

Hi, @pvchupin and @intel/dpcpp-tools-reviewers
Kind ping~

Thanks very much.

Copy link
Contributor

@asudarsa asudarsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me. There are some empty .o and .obj files in test/Driver directory. Can you please check and comment if they need to be removed?
Thanks

@jinge90
Copy link
Contributor Author

jinge90 commented Nov 21, 2022

Looks ok to me. There are some empty .o and .obj files in test/Driver directory. Can you please check and comment if they need to be removed? Thanks

Hi, @asudarsa
This empty files are required by clang lit test. Those tests aim to test behavior of linking libdevice files as expected, we must build both clang and libdevice to run those clang lit tests if without those empty files, otherwise, error such as "no such file" will be reported by clang and lead to lit test failure.

Thanks very much for the review.

@jinge90 jinge90 requested a review from asudarsa November 22, 2022 00:18
Copy link
Contributor

@asudarsa asudarsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarification. LGTM.

@jinge90 jinge90 requested a review from pvchupin November 22, 2022 15:09
@jinge90
Copy link
Contributor Author

jinge90 commented Nov 22, 2022

Hi, @pvchupin
Could you help merge this patch?
Thanks very much.

@pvchupin pvchupin merged commit fc136d6 into intel:sycl Nov 22, 2022
@jinge90 jinge90 deleted the bf16_libdevice_enable branch December 8, 2022 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants