Skip to content

Resolve SYCL-2020 deprecation warning #1367

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
Aug 25, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

This PR resolves the following deprecation warning from SYCLOS compiler:

In file included from ~/dpctl/dpctl/tensor/libtensor/source/elementwise_functions.cpp:56:
~/dpctl/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp:118:42: warning: \
    'sincos' is deprecated: SYCL builtin functions with raw pointer arguments have been deprecated. \
    Please use multi_ptr. [-Wdeprecated-declarations]
  118 |             const realT sinY_val = sycl::sincos(y, &cosY_val);

The resolution is to convert raw pointer to multi-pointer using sycl::address_space_cast.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

```
In file included from ~/dpctl/dpctl/tensor/libtensor/source/elementwise_functions.cpp:56:
~/dpctl/dpctl/tensor/libtensor/include/kernels/elementwise_functions/expm1.hpp:118:42: warning: 'sincos' is deprecated: SYCL builtin functions with raw pointer arguments have been deprecated. Please use multi_ptr. [-Wdeprecated-declarations]
  118 |             const realT sinY_val = sycl::sincos(y, &cosY_val);
```

The resolution is to convert raw pointer to multi-pointer using `sycl::address_space_cast`.
@github-actions
Copy link

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 85.636%. remained the same when pulling e0aea28 on fix-sycl-2020-deprecation-warning into 8eab04b on master.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev4=py310ha25a700_15 ran successfully.
Passed: 916
Failed: 84
Skipped: 119

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

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

Warning is gone, LGTM

@oleksandr-pavlyk oleksandr-pavlyk merged commit 1595dce into master Aug 25, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-sycl-2020-deprecation-warning branch August 25, 2023 19:50
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.6dev4=py310ha25a700_15 ran successfully.
Passed: 916
Failed: 84
Skipped: 119

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