Skip to content

[SYCL] Enable memcpy in libdevice - #3879

Merged
bader merged 6 commits into
intel:syclfrom
jinge90:memcpy_for_libdevice
Jul 8, 2021
Merged

[SYCL] Enable memcpy in libdevice#3879
bader merged 6 commits into
intel:syclfrom
jinge90:memcpy_for_libdevice

Conversation

@jinge90

@jinge90 jinge90 commented Jun 4, 2021

Copy link
Copy Markdown
Contributor

Signed-off-by: gejin ge.jin@intel.com

Currently, memcpy is supported in SYCL device code if "-fno-builtin" is not added. Compiler will convert it to "llvm.memcpy..." intrinsic and llvm-spirv will convert it to OpCopyMemorySized for jit.

However, if "-fno-builtin" is added, compiler will call libc function "memcpy" directly and it requires libdevice support. This PR support memcpy in libdevice, so developers can use it in SYCL device code no matter whether "-fno-builtin" is added or not.

Signed-off-by: gejin <ge.jin@intel.com>
Comment thread libdevice/fallback-cstring.cpp Outdated
Signed-off-by: gejin <ge.jin@intel.com>
bader
bader previously requested changes Jun 4, 2021
Comment thread clang/test/Driver/sycl-device-lib.cpp
Comment thread libdevice/cmake/modules/SYCLLibdevice.cmake Outdated
@jinge90

jinge90 commented Jun 4, 2021

Copy link
Copy Markdown
Contributor Author

/suumary:run

Signed-off-by: gejin <ge.jin@intel.com>
romanovvlad
romanovvlad previously approved these changes Jun 7, 2021

@romanovvlad romanovvlad 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.

sycl/include and sycl/source changes LGTM

Pennycook
Pennycook previously approved these changes Jun 7, 2021
AlexeySachkov
AlexeySachkov previously approved these changes Jun 8, 2021

@AlexeySachkov AlexeySachkov 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.

sycl-post-link changes LGTM

vzakhari
vzakhari previously approved these changes Jun 8, 2021

@vzakhari vzakhari 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.

libdevice changes look good to me.

Signed-off-by: gejin <ge.jin@intel.com>

@romanovvlad romanovvlad 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.

RT part LGTM

@bader bader changed the title [SYCL] enable memcpy in libdevice [SYCL] Enable memcpy in libdevice Jun 23, 2021
@bader
bader dismissed their stale review June 23, 2021 08:55

No blocking issues from my side.

@bader
bader requested a review from vzakhari June 23, 2021 08:56
@bader

bader commented Jun 23, 2021

Copy link
Copy Markdown
Contributor

@AGindinson, @mdtoguchi, ping.

@jinge90

jinge90 commented Jul 8, 2021

Copy link
Copy Markdown
Contributor Author

Hi, @bader and @romanovvlad
Could you help check if this patch can be merged now?
Thanks very much.

@romanovvlad

Copy link
Copy Markdown
Contributor

Hi, @bader and @romanovvlad
Could you help check if this patch can be merged now?
Thanks very much.

No, it cannot be.
@mlychkov @AGindinson Could you please review?

@bader
bader merged commit 76051cc into intel:sycl Jul 8, 2021
Michoumichmich added a commit to Michoumichmich/llvm that referenced this pull request Sep 10, 2021
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.

9 participants