Skip to content

Feature/get ref address #105

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 12 commits into from
Oct 6, 2020
Merged

Feature/get ref address #105

merged 12 commits into from
Oct 6, 2020

Conversation

diptorupd
Copy link
Contributor

The PR reworks #87 to use the same name addressof_ref for all classes that wrap DPPLSyclxxxx objects. Added docstring.

The change is needed because inside Numba we are directly calling dpctl's C API during LLVM lowering for kernel submit call. Having these convenience functions lets us get the address of the DPPLSyclKernelRef from a SyclKernel Python object.

To standardize the API the same addressof_ref call was added for all classes.

@diptorupd
Copy link
Contributor Author

@PokhodenkoSA can be merged once CI completes.

@reazulhoque Please note the name change for the functions.

@diptorupd diptorupd added this to the beta10 milestone Oct 6, 2020
Copy link
Contributor

@PokhodenkoSA PokhodenkoSA left a comment

Choose a reason for hiding this comment

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

LGTM. Will merge it.

@PokhodenkoSA PokhodenkoSA merged commit 451ca50 into master Oct 6, 2020
The address of the DPPLSyclProgramRef object used to create this
SyclProgram cast to a long.
"""
return int(<long>self._program_ref)
Copy link
Contributor

Choose a reason for hiding this comment

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

@PokhodenkoSA @diptorupd

Long is not good here. It is a 32-bit integer on Windows. We should be using <size_t> instead.

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.

4 participants