Skip to content

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

Merged
pvchupin merged 16 commits into
intel:syclfrom
jinge90:bf16_libdevice_enable
Nov 22, 2022
Merged

[SYCL][libdevice] Add bfloat16 imf utils.#6999
pvchupin merged 16 commits into
intel:syclfrom
jinge90:bf16_libdevice_enable

Conversation

@jinge90

@jinge90 jinge90 commented Oct 8, 2022

Copy link
Copy Markdown
Contributor

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

jinge90 commented Oct 12, 2022

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown

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

jinge90 commented Nov 7, 2022

Copy link
Copy Markdown
Contributor Author

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

Thanks very much.

@steffenlarsen steffenlarsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Runtime changes LGTM!

@jinge90

jinge90 commented Nov 8, 2022

Copy link
Copy Markdown
Contributor Author

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

@jinge90

jinge90 commented Nov 8, 2022

Copy link
Copy Markdown
Contributor Author

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

Thanks very much.

@jinge90

jinge90 commented Nov 9, 2022

Copy link
Copy Markdown
Contributor Author

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

Thanks very much.

@jinge90

jinge90 commented Nov 10, 2022

Copy link
Copy Markdown
Contributor Author

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

Thanks very much.

@jinge90

jinge90 commented Nov 11, 2022

Copy link
Copy Markdown
Contributor Author

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

Thanks very much.

@asudarsa asudarsa left a comment

Copy link
Copy Markdown
Contributor

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

jinge90 commented Nov 21, 2022

Copy link
Copy Markdown
Contributor Author

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

@asudarsa asudarsa left a comment

Copy link
Copy Markdown
Contributor

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

jinge90 commented Nov 22, 2022

Copy link
Copy Markdown
Contributor Author

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