Skip to content

Memory api #740

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 8 commits into from
Jan 25, 2022
Merged

Memory api #740

merged 8 commits into from
Jan 25, 2022

Conversation

oleksandr-pavlyk
Copy link
Contributor

This expands Python C-API public functions to work with memory objects.

What is missing is pybind11 casters.

Renamed functions to avoid name clashes for get_queue_ref/get_context_ref
defined for different signatures. (C-API requires names to be different).

Adjsuted tests to reflect changes in C-API names
@oleksandr-pavlyk oleksandr-pavlyk self-assigned this Jan 7, 2022
@github-actions
Copy link

github-actions bot commented Jan 7, 2022

@coveralls
Copy link
Collaborator

coveralls commented Jan 7, 2022

Coverage Status

Coverage decreased (-0.01%) to 81.501% when pulling 50f16f4 on memory_api into 0e59572 on master.

@diptorupd
Copy link
Contributor

@oleksandr-pavlyk How do Python projects normally document a C API? Is there a way to generate meaningful docstrings for these functions and then have them on our documentation page?

@oleksandr-pavlyk
Copy link
Contributor Author

Good question, but I do not know the answer. Cython translates .pyx into C++, we could inject doxystring in there.

Alternatively, we would document it separately (no in the implementation)

@oleksandr-pavlyk oleksandr-pavlyk marked this pull request as ready for review January 11, 2022 20:32
@oleksandr-pavlyk
Copy link
Contributor Author

@diptorupd This is good to go in from my standpoint. The summary of changes:

  • Python C-API functions renamed
  • Tests covering C-API functions updated to reflect that
  • Function import_dpctl() in dpctl_capi.h now also initializes memory._memory and tensor._usmarray submodules.

@oleksandr-pavlyk oleksandr-pavlyk merged commit a2b6a9c into master Jan 25, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the memory_api branch January 25, 2022 03:07
@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