Skip to content

Conversation

@zacharyvincze
Copy link
Contributor

Technical Details

  • Implements Reformat operator (for NHWC -> NCHW) layout conversions.
  • Implements python bindings for the Reformat operator.
  • Adds golden implementation for Reformat + C++ and Python tests.
  • Minor change to TensorShape::permute(), which adds a size of 1 for dimensions which don't exist in the input layout. This change has been documented in the header's docstrings.

Test Plan

  • Ensure C++ Reformat operators (on both CPU and GPU) matches the golden model.

Test Result

  • All tests pass.

Submission Checklist

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 59.37500% with 39 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/op_reformat.cpp 61.43% 9 Missing and 18 partials ⚠️
include/core/wrappers/image_wrapper.hpp 0.00% 0 Missing and 4 partials ⚠️
include/kernels/host/reformat_host.hpp 69.23% 0 Missing and 4 partials ⚠️
include/op_reformat.hpp 0.00% 2 Missing ⚠️
src/core/tensor_shape.cpp 71.43% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #114      +/-   ##
===========================================
- Coverage    73.88%   73.51%   -0.37%     
===========================================
  Files           74       77       +3     
  Lines         2864     2956      +92     
  Branches       615      640      +25     
===========================================
+ Hits          2116     2173      +57     
- Misses         330      338       +8     
- Partials       418      445      +27     
Files with missing lines Coverage Δ
include/core/tensor_layout.hpp 91.67% <ø> (+8.33%) ⬆️
include/core/tensor_shape.hpp 100.00% <ø> (+100.00%) ⬆️
include/core/wrappers/generic_tensor_wrapper.hpp 100.00% <ø> (ø)
include/op_reformat.hpp 0.00% <0.00%> (ø)
src/core/tensor_shape.cpp 82.80% <71.43%> (+0.04%) ⬆️
include/core/wrappers/image_wrapper.hpp 69.23% <0.00%> (-2.77%) ⬇️
include/kernels/host/reformat_host.hpp 69.23% <69.23%> (ø)
src/op_reformat.cpp 61.43% <61.43%> (ø)

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:precheckin enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants