Skip to content

Fix c interface #879

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 6 commits into from
Aug 11, 2022
Merged

Fix c interface #879

merged 6 commits into from
Aug 11, 2022

Conversation

oleksandr-pavlyk
Copy link
Contributor

One of DPCTLSyclInterface function was deprecated in #876, and __attributes__((deprecated(what, repl)) was used.

This broke building of C extensions using the library. This PR uses [[deprecated(msg)]] instead, which is understood by both the gcc and icx.

An example of native Python extension written in C and that is using DPCTLSyclInterface is added. It is being compiled in the workflow conda-package.yml workflow when testing that examples can be compiled on Linux.

Incidentally, dpctl.lsplatform implementation replaced informational print with seemingly more appropriate use of warnings.warn.

  • 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

@mingjie-intel

@github-actions
Copy link

@coveralls
Copy link
Collaborator

coveralls commented Aug 10, 2022

Coverage Status

Coverage increased (+0.1%) to 81.828% when pulling ed13b2e on fix-c-interface into b68b1e4 on master.

@mingjie-intel
Copy link

Tested with numba-dpex, with the fix, it can be built correctly.

@oleksandr-pavlyk oleksandr-pavlyk merged commit 948bc65 into master Aug 11, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-c-interface branch August 11, 2022 03:18
@github-actions
Copy link

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

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