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

629 kernel functions for dense matrix of strings #845

Conversation

saminbassiri
Copy link
Contributor

[DAPHNE-#629] Add Support for Indexing, Reshape, and Reverse on DenseMatrix of Strings at Kernel Level

Summary

This PR addresses issue #629, extending string processing capabilities in Daphne and building on the progress of PR #797.

Changes:

  • SliceCol and SliceRow: Added support for slicing rows and columns on DenseMatrix of strings at the kernel level.
  • Reverse and Reshape: Generalize reverse and reshape operations for DenseMatrix of strings at the kernel level.
  • InsertCol and InsertRow: Added support for inserting rows and columns into DenseMatrix of strings at the kernel level.

Testing

  • Introduced initial tests for both DenseMatrix<std::string> and DenseMatrix<FixedStr16>, ensuring the new features function as expected.

saminbassiri and others added 30 commits September 8, 2024 19:09
- Renamed test CSV and meta data files.
- Removed unnecessary casts of ValueTypeUtils::default_value to the type it already has.
- Renamed ValueTypeUtils::default_value to defaultValue.
- oneHot-kernel
  - Removed superfluous additional convenience functions.
  - Release recoded intermediate.
  - Made index calculation view-aware.
  - Reduced the code duplication of the specializations for std::string and FixedStr16 by factoring out the code into a separate function template.
- Tidied up BinaryOpCode.h.
- Little formatting corrections.
- And some more minor things.
- The FixedStr16 buffer no longer requires a null-terminator.
- This change optimizes memory usage for FixedStr16 value type.
…enseMatrix_of_Strings"

This reverts commit b700c82, reversing
changes made to c11e6fe.
@saminbassiri saminbassiri force-pushed the 629-kernel-functions-for-DenseMatrix-of-Strings branch from 216c16e to eb2fe47 Compare October 11, 2024 15:02
@saminbassiri saminbassiri force-pushed the 629-kernel-functions-for-DenseMatrix-of-Strings branch from eb2fe47 to f3b7504 Compare October 11, 2024 15:09
@pdamme pdamme self-requested a review October 17, 2024 17:47
- For some reason, the changes made by 4bf6d03 were undone in this PR, even though all other recent commits from main were merged in.
- Renaming of some test cases.
- Applying unit test cases for string-values matriced not only to DenseMatrix, but also to the Matrix superclass (works out-of-the-box).
Copy link
Collaborator

@pdamme pdamme left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution, @saminbassiri. The more kernels are supported/tested on string-valued matrices, the better ;) . Your code looks good to me. I only did some minor changes (test case names etc.). Furthermore, while your unit tests only used the DenseMatrix, they actually also work for the Matrix superclass, so I extended the test cases by that data type. This PR is ready to be merged.

@pdamme pdamme merged commit 540d322 into daphne-eu:main Oct 18, 2024
3 checks passed
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.

2 participants