-
Notifications
You must be signed in to change notification settings - Fork 179
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
[enhancement] Refactor onedal/datatypes
in preparation for dlpack support
#2195
Open
icfaust
wants to merge
13
commits into
uxlfoundation:main
Choose a base branch
from
icfaust:dev/dlpack_to_table
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introducing dlpack first requires refactoring the datatypes directory in order to reduce tech debt and simplify reviewing. This PR will drop dlpack support to a second PR and will focus on refactoring directory. |
icfaust
force-pushed
the
dev/dlpack_to_table
branch
from
January 26, 2025 21:50
18a9d4d
to
058372f
Compare
icfaust
changed the title
[WIP] add dlpack support
[WIP] Refactor Jan 26, 2025
onedal/datatypes
in preparation for dlpack support
/intelci: run |
Codecov ReportAttention: Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
|
icfaust
added a commit
to icfaust/scikit-learn-intelex
that referenced
this pull request
Jan 27, 2025
13 tasks
icfaust
changed the title
[WIP] Refactor
[enhancement] Refactor Jan 27, 2025
onedal/datatypes
in preparation for dlpack supportonedal/datatypes
in preparation for dlpack support
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
PR #1568 is too large and too out of date to use for refactoring the onedal
table
object. Subsequent PRs which introduced sycl_usm_array support mixed in additional C++ code in an unsustainable/ poorly extensible manner. This PR tries to find an intermediate solution which does not rewriteonedal/datatypes
but only shifts the code in a way which is clearer and better separated following #1568 in spirit. This way adding dlpack support totable
will be separated cleanly fromnumpy
andsycl_usm_array
. It defines additional namespaces so that it is clear in the code which conversion mechanism is being used where. It begins standardization of the naming schemes of functions and files for simple extensibility in the future (say supporting other array or possibly dataframe types).Therefore, because it is only namespace definitions and file movements, performance benchmarks aren't necessary.
NOTE: A function
convert_from_sua_iface
is renamedconvert_to_table
in thesycl_usm
namespace.NOTE: changes to pickling for incremental algorithms must also be done. It is clear with the changes what types of inputs/outputs are expected for
__getstate__
and__setstate__
, which will default to numpy (not explicitly discussed in those PRs, but may be important in future array_api discussions).NOTE: there are definitely inconsistencies between the sycl_usm and numpy implementations, and changes to those implementations in any functional manner should be done in a follow-up PR/ticket. They are likely to be time-intensive and require benchmarking.
PR should start as a draft, then move to ready for review state after CI is passed and all applicable checkboxes are closed.
This approach ensures that reviewers don't spend extra time asking for regular requirements.
You can remove a checkbox as not applicable only if it doesn't relate to this PR in any way.
For example, PR with docs update doesn't require checkboxes for performance while PR with any change in actual code should have checkboxes and justify how this code change is expected to affect performance (or justification should be self-evident).
Checklist to comply with before moving PR from draft:
PR completeness and readability
Testing
Performance