Skip to content

[SYCL] Deprecate old OpenCL interop APIs in SYCL 2020 mode #3194

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 9 commits into from
Mar 25, 2021

Conversation

alexbatashev
Copy link
Contributor

@alexbatashev alexbatashev commented Feb 10, 2021

These warnings can be suppressed by SYCL2020_DISABLE_DEPRECATION_WARNINGS macro or by setting -sycl-std=2017 or -sycl-std=1.2.1.

Also a new macro SYCL_DISABLE_DEPRECATION_WARNINGS is introduced, to disable all deprecation warnings completely (including SYCL 1.2.1 deprecation warnings).

@alexbatashev alexbatashev requested a review from a team as a code owner February 10, 2021 11:08
Copy link
Contributor

@sergey-semenov sergey-semenov left a comment

Choose a reason for hiding this comment

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

LGTM aside from some minor comments.

sergey-semenov
sergey-semenov previously approved these changes Feb 10, 2021
sergey-semenov
sergey-semenov previously approved these changes Feb 11, 2021
romanovvlad
romanovvlad previously approved these changes Feb 11, 2021
Copy link
Contributor

@romanovvlad romanovvlad left a comment

Choose a reason for hiding this comment

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

LGTM

AlexeySachkov
AlexeySachkov previously approved these changes Feb 12, 2021
@bader bader requested review from pvchupin and kbobrovs February 12, 2021 10:37
Copy link
Contributor

@pvchupin pvchupin left a comment

Choose a reason for hiding this comment

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

Let's talk through this deprecation plan before merging.

@densamoilov
Copy link

I have a quick question, I can see that the program class is going to be deprecated but I didn't find neither module nor kernel_bundle classes implementations. What should we switch to?

Alexander Batashev added 2 commits March 19, 2021 11:09
* upstream/sycl: (1804 commits)
  [SYCL] SYCL 2020 backend interoperability part 1 (intel#3354)
  [Driver][SYCL] Address issue when unbundling for non-FPGA archive (intel#3366)
  [SYCL][Doc] Update compiler options descriptions (intel#3340)
  [SYCL] Update ABI dump tool to disable checks with libcxx by default (intel#3370)
  [SYCL] Update the way we handle -sycl-std= based on community review feedback (intel#3371)
  [SYCL] Move tests to llvm-test-suite (intel#3359)
  [SYCL][PI][L0] Revert copy batching from intel#3232 (intel#3363)
  [SYCL] Remove unsupported option.
  [SYCL] Fix pragma setting in sycl-post-link (intel#3358)
  [SYCL] Add ITT annotation instructions (intel#3299)
  [SYCL] Propagate attributes of original kernel to wrapper kernel generated for range-rounding (intel#3306)
  [BuildBot] Uplift GPU RT version for Linux to 21.09.19150 (intel#3316)
  [SYCL] Retain PI events until they have signaled (intel#3350)
  [SYCL] Add caching when using interop constructor (intel#3327)
  Add ITT stubs and wrappers for SPIR-V devices (intel#3279)
  [SYCL] Add zero argument version of buffer::reinterpret() for SYCL 2020 (intel#3333)
  [SYCL] Restore old behavior of get() method (intel#3356)
  [Driver][SYCL][FPGA] Improve FPGA AOT when using Triple (intel#3330)
  [SYCL] Revert support for pinned_host_memory extension in Level-Zero backend. Make it a NOP (intel#3349)
  [SYCL] Remove redundant build options processing (intel#3342)
  ...
@alexbatashev
Copy link
Contributor Author

Replacements for the interop APIs have been merged. I updated patch to exclude program class deprecation. I'll add the warning when kernel_bundle is merged.

sergey-semenov
sergey-semenov previously approved these changes Mar 23, 2021
romanovvlad
romanovvlad previously approved these changes Mar 23, 2021
Copy link
Contributor

@pvchupin pvchupin left a comment

Choose a reason for hiding this comment

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

Please update PR description about second macro added

@@ -73,6 +74,7 @@ macro(add_sycl_unittest_with_device test_dirname link_variant)
-DGTEST_LANG_CXX11=1
-DGTEST_HAS_TR1_TUPLE=0
-D__SYCL_BUILD_SYCL_DLL
-DSYCL2020_DISABLE_DEPRECATION_WARNINGS
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it required here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still use SYCL 1.2.1 APIs inside runtime and tests. To avoid build failures due to -Werror, I suppressed these warnings for compiler build.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. Maybe I'm missing something, but is it a right level of Makefiles to add this flag?
It looks like it's been added for all LIT tests? Is it possible to add flag individually to tests which are really designed to test older 1.2.1 API rather than using it by accident?

I'd like us to stop adding more tests with 1.2.1 APIs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pvchupin no, it's only for unit tests. We build them as part of compiler and link with the runtime statically, because many internal symbols are not exported from libsycl.so (to avoid accidental linkage of user code with our private interfaces). Other LIT tests (those in sycl/test/ or llvm-test-suite) won't be affected by this option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated tests to only disable warnings in the TUs, that use interop API

@pvchupin pvchupin self-requested a review March 23, 2021 22:09
@alexbatashev alexbatashev dismissed stale reviews from romanovvlad and sergey-semenov via 71009cc March 25, 2021 14:51
@bader
Copy link
Contributor

bader commented Mar 25, 2021

@alexbatashev, am I right that pre-commit issues are not related to this PR and we expect them to be addressed by intel/llvm-test-suite#195?

@alexbatashev
Copy link
Contributor Author

@alexbatashev, am I right that pre-commit issues are not related to this PR and we expect them to be addressed by intel/llvm-test-suite#195?

that's correct

@bader bader merged commit a249316 into intel:sycl Mar 25, 2021
@alexbatashev alexbatashev deleted the deprecate_old_apis branch March 26, 2021 08:20
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