Skip to content

[cleanup/tensor, part5] Moved implementation of every Python binding into separate translation unit #934

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
Oct 17, 2022

Conversation

oleksandr-pavlyk
Copy link
Contributor

@oleksandr-pavlyk oleksandr-pavlyk commented Oct 16, 2022

This PR moves each Python function definition and the initialization of function pointer tables/vectors used in tensor_py.cpp into dedicated .cpp files. Definitions reside in dpctl::tensor::py_internal namespace.

Going forward, adding a new function to dpctl.tensor._tensor_impl would involve:

  • creating new .cpp and .hpp file with implementation and declarations
  • adding the new .cpp to list of sources in "dpctl/tensor/CMakeLists.txt"
  • registering Python method implementation and using initialization code in "tensor_py.cpp"

  • Have you provided a meaningful PR description?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.0dev0=py310h8c27c75_189 ran successfully.
Passed: 33
Failed: 801
Skipped: 3138

@oleksandr-pavlyk oleksandr-pavlyk merged commit 30223a2 into cleanup/tensor Oct 17, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the cleanup-tensor-part5 branch October 17, 2022 21:51
@github-actions
Copy link

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

@oleksandr-pavlyk oleksandr-pavlyk mentioned this pull request Oct 17, 2022
3 tasks
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.

1 participant