Skip to content

[SYCL][Driver] Set -aux-target-cpu for SYCL offload device compilation #1225

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 1 commit into from
Mar 4, 2020

Conversation

smanna12
Copy link
Contributor

@smanna12 smanna12 commented Mar 1, 2020

This patch adds -aux-target-cpu that will set AVX and other necessary macros
for the SYCL offload device compilation based on -aux-target-cpu target.

Signed-off-by: Soumi Manna [email protected]

@smanna12 smanna12 force-pushed the private/smanna12/setauxtargetcpuondevice branch 2 times, most recently from 972e7f0 to 0ea2663 Compare March 1, 2020 23:26
@smanna12 smanna12 changed the title [SYCL] Set aux-target-cpu for SYCL offload device compilation [SYCL] [Driver] Set aux-target-cpu for SYCL offload device compilation Mar 1, 2020
@smanna12 smanna12 changed the title [SYCL] [Driver] Set aux-target-cpu for SYCL offload device compilation [SYCL][Driver] Set aux-target-cpu for SYCL offload device compilation Mar 1, 2020
@smanna12 smanna12 changed the title [SYCL][Driver] Set aux-target-cpu for SYCL offload device compilation [SYCL][Driver] Set -aux-target-cpu for SYCL offload device compilation Mar 1, 2020
@smanna12 smanna12 force-pushed the private/smanna12/setauxtargetcpuondevice branch from 0ea2663 to c0f857e Compare March 2, 2020 16:01
@smanna12 smanna12 force-pushed the private/smanna12/setauxtargetcpuondevice branch from c0f857e to 6b2a7ff Compare March 2, 2020 21:45
@smanna12
Copy link
Contributor Author

smanna12 commented Mar 3, 2020

@mdtoguchi could you please provide some feedback on the patches?

// CHECK-OFFLOAD: "-aux-target-cpu" "x86-64"
// CHECK-OFFLOAD: "-target-cpu" "x86-64"

/// Check "-aux-target-cpu" and "-target-cpu" are passed when compiling for SYCL offload device and host codes with enabling macros:
Copy link
Contributor

Choose a reason for hiding this comment

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

enabling macros has nothing to do with this check. Probably shouldn't be mentioned.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mdtoguchi for the feedback. I have updated the patch.

@smanna12 smanna12 force-pushed the private/smanna12/setauxtargetcpuondevice branch from 6b2a7ff to b9ad657 Compare March 3, 2020 18:36
// CHECK-OFFLOAD: "-aux-target-cpu" "x86-64"
// CHECK-OFFLOAD: "-target-cpu" "x86-64"

/// Check "-aux-target-cpu" and "-target-cpu" are passed when compiling for SYCL offload device and host codes:
Copy link
Contributor

Choose a reason for hiding this comment

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

One more nit: You are also checking for feature here, so adding that in the comment would reduce confusion from the first check which uses the same comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @mdtoguchi. I have updated comments.

@smanna12 smanna12 force-pushed the private/smanna12/setauxtargetcpuondevice branch from b9ad657 to 6e4827d Compare March 3, 2020 20:10
bader
bader previously approved these changes Mar 3, 2020
Copy link
Contributor

@bader bader left a comment

Choose a reason for hiding this comment

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

Thanks!

This patch adds -aux_target_cpu that will set AVX and other necessary macros
for the SYCL offload device compilation based on -aux-target-cpu target.

Signed-off-by: Soumi Manna <[email protected]>
@smanna12 smanna12 force-pushed the private/smanna12/setauxtargetcpuondevice branch from 6e4827d to fc0d87d Compare March 4, 2020 02:50
@smanna12
Copy link
Contributor Author

smanna12 commented Mar 4, 2020

Thanks @mdtoguchi.

@bader I have updated lit test to fix errors for "check-clang" build that happened with my previous patch.

@bader bader self-assigned this Mar 4, 2020
@bader bader merged commit f953fda into sycl Mar 4, 2020
@bader bader deleted the private/smanna12/setauxtargetcpuondevice branch March 4, 2020 14:43
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Mar 5, 2020
…_accessor_refactor

* origin/sycl: (38 commits)
  [SYCL] Fix device::get_devices() with a non-host device type (intel#1235)
  [SYCL][PI][CUDA] Implement kernel and kernel-group information queries (intel#1180)
  [SYCL] Remove default error code value in exception (intel#1150)
  [SYCL] Fix devicelib assert LIT test (intel#1245)
  [SYCL] Set aux-target-cpu for SYCL offload device compilation (intel#1225)
  [SYCL] Remove fabs and ceil from the list of unsupported math functions (intel#1217)
  [SYCL] Fix circular reference between events and queues (intel#1226)
  [CI][Doc] Use SSH to deploy GitHub Pages (intel#1232)
  [SYCL][CUDA][Test] Testing for use of CUDA primary context (intel#1174)
  [SYCL] allow underscore symbol in temporary directory name
  [SYCL] Reject zero length arrays (intel#1153)
  [SYCL] Fix static code analyzis concerns (intel#1189)
  [SYCL] Add more details about the -fintelfpga option (intel#1218)
  [SYCL][CUDA] Select only NVPTX64 device binaries (intel#1223)
  [SYCL] Reverse max work-group size order (intel#1177)
  [SYCL][Doc] Add GroupAlgorithms extension (intel#1079)
  [SYCL] Fix SYCL internal enumerators conflict with user defined macro (intel#1188)
  [SYCL][CUDA] Fixes context release and unnamed context scope (intel#1207)
  [SYCL][CUDA] Fix context creation property parsing
  [CUDA][PI] clang-format pi.h
  ...
alexbatashev pushed a commit to alexbatashev/llvm that referenced this pull request Mar 5, 2020
…ctor_tests

* origin/sycl:
  [SYCL] Fix device::get_devices() with a non-host device type (intel#1235)
  [SYCL][PI][CUDA] Implement kernel and kernel-group information queries (intel#1180)
  [SYCL] Remove default error code value in exception (intel#1150)
  [SYCL] Fix devicelib assert LIT test (intel#1245)
  [SYCL] Set aux-target-cpu for SYCL offload device compilation (intel#1225)
  [SYCL] Remove fabs and ceil from the list of unsupported math functions (intel#1217)
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.

3 participants