Skip to content

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

Merged
oleksandr-pavlyk merged 8 commits into
cleanup/tensorfrom
cleanup-tensor-part5
Oct 17, 2022
Merged

oleksandr-pavlyk merged 8 commits into
cleanup/tensorfrom
cleanup-tensor-part5

Conversation

@oleksandr-pavlyk

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown

@github-actions

Copy link
Copy Markdown

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
Copy Markdown

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 done
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