Skip to content

feat: Add helpers for NumPy and PyTorch conversions - #24

Merged
ananos merged 5 commits into
mainfrom
feat_add_tensor_bytes_np_input
Jun 16, 2025
Merged

ananos merged 5 commits into
mainfrom
feat_add_tensor_bytes_np_input

Conversation

@papazof

@papazof papazof commented Jun 15, 2025 •

Copy link
Copy Markdown
Contributor

Add helpers for NumPy and PyTorch conversions:

  • Split inference ops' components into subpackages
  • Add methods to create or convert tensors from/to bytes or byte-like objects
  • Add CType-based wrapper for NumPy arrays
  • Add methods to convert between tensors and NumPy arrays
  • Add Tensor methods to create/get vAccel Torch tensors from/as PyTorch tensors

@papazof
papazof force-pushed the feat_add_tensor_bytes_np_input branch 8 times, most recently from 2e3dc86 to 1c16329 Compare June 16, 2025 04:11
@papazof
papazof marked this pull request as ready for review June 16, 2025 04:31
@papazof
papazof requested a review from ananos June 16, 2025 04:31

@ananos ananos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks @papazof, all look good.

There seems to be an issue with the coverage job, although you do install the pytest package... not sure what's going on there.. When we get that fixed we can approve & merge.

@papazof

papazof commented Jun 16, 2025

Copy link
Copy Markdown
Contributor Author

thanks @papazof, all look good.

There seems to be an issue with the coverage job, although you do install the pytest package... not sure what's going on there.. When we get that fixed we can approve & merge.

There is a change in the pyproject.toml install targets and the run-tests CI action, which causes the action to fail for main. We can safely ignore the failed job, it should work in the next PR.

@ananos ananos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

clear, thanks!

papazof added 5 commits June 16, 2025 12:02
Convert inference ops to subpackages and split component definitions
into separate modules

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
Add methods to create or convert tensors from/to bytes or byte-like
objects

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
Add helpers for NumPy array conversions
- Add `CType`-based wrapper for NumPy arrays
- Add methods to create tensors from NumPy arrays
- Add methods to create NumPy arrays from tensors
- Split `TensorType` convertors into separate classes

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
Add `Tensor` methods to create/get vAccel Torch tensors from/as PyTorch
tensors

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
Install older, pre-meson NumPy, to avoid cross-compilation issues with
our ARM 32-bit runners

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
@github-actions
github-actions Bot force-pushed the feat_add_tensor_bytes_np_input branch from 1c16329 to 598d0f7 Compare June 16, 2025 12:03
@ananos
ananos merged commit cd411bf into main Jun 16, 2025
ananos pushed a commit that referenced this pull request Jun 16, 2025
Convert inference ops to subpackages and split component definitions
into separate modules

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
ananos pushed a commit that referenced this pull request Jun 16, 2025
Add methods to create or convert tensors from/to bytes or byte-like
objects

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
ananos pushed a commit that referenced this pull request Jun 16, 2025
Add helpers for NumPy array conversions
- Add `CType`-based wrapper for NumPy arrays
- Add methods to create tensors from NumPy arrays
- Add methods to create NumPy arrays from tensors
- Split `TensorType` convertors into separate classes

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
ananos pushed a commit that referenced this pull request Jun 16, 2025
Add `Tensor` methods to create/get vAccel Torch tensors from/as PyTorch
tensors

PR: #24
Signed-off-by: Kostis Papazafeiropoulos <papazof@gmail.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
@ananos
ananos deleted the feat_add_tensor_bytes_np_input branch June 16, 2025 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants