Skip to content
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

Updated mk_alloc to support Numba-Dpex compute follows data. #8854

Merged
merged 1 commit into from May 2, 2023

Conversation

mingjie-intel
Copy link
Contributor

Change is made in mk_alloc to support Numba-Dpex compute follows data. There will be no affect to Numba main function.

Copy link
Collaborator

@DrTodd13 DrTodd13 left a comment

Choose a reason for hiding this comment

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

Please add this allocate support in the appropriate place in the Numba developer documentation.

@diptorupd
Copy link

Some more motivating context behind these changes. The mk_alloc function is used inside the Numba parfor machinery to create a new empty NumPy array (by calling numpy.empty) whenever a temporary array is needed to allocate the left-hand-side sub-expression of a parfor node.

In our work on using parfors to support other NumPy-like libraries we want to change the actual library call used to allocate the empty array. These changes extend the mk_alloc function to first look if the array type provides an __allocate__ function and use that instead of the default logic in the original function.

@DrTodd13 can you point me to the file where the documentation should be updated?

@DrTodd13
Copy link
Collaborator

@diptorupd @sklam @stuartarchibald I don't know if the documentation belongs in numba/docs/source/extending or numba/docs/source/developer. Unbelievably, we don't have a ParallelAccelerator page in the developer docs which was my first idea. I'm soliciting ideas from Siu and Stuart as to where this should be documented.

@sklam
Copy link
Member

sklam commented Apr 13, 2023

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@sklam
Copy link
Member

sklam commented Apr 13, 2023

@diptorupd @sklam @stuartarchibald I don't know if the documentation belongs in numba/docs/source/extending or numba/docs/source/developer. Unbelievably, we don't have a ParallelAccelerator page in the developer docs which was my first idea. I'm soliciting ideas from Siu and Stuart as to where this should be documented.

I think this is ParallelAccelerator specific enough to have its own page. I think we can add that ParallelAccelerator page in a different PR.

@sklam sklam added this to the Numba 0.58 RC milestone Apr 13, 2023
@sklam sklam added 4 - Waiting on author Waiting for author to respond to review 4 - Waiting on reviewer Waiting for reviewer to respond to author labels Apr 13, 2023
@esc esc added 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author 4 - Waiting on author Waiting for author to respond to review labels May 2, 2023
@DrTodd13 DrTodd13 self-requested a review May 2, 2023 16:07
@sklam sklam merged commit 2754042 into numba:main May 2, 2023
22 checks passed
@sklam sklam added the skip_release_notes Skip towncrier requirement label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to merge Review and testing done, is ready to merge ParallelAccelerator skip_release_notes Skip towncrier requirement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants