Conversation
|
/build |
Greptile SummaryThis PR fixes two categories of bugs with static tensors ( Confidence Score: 5/5Safe to merge — targeted bug fixes with no regressions and good test coverage. All changes are correctness fixes for previously broken functionality (device-side attribute annotations, runtime descriptor construction). The fallback-to-dynamic-descriptor strategy in RealView/ImagView is sound and consistent. No P0 or P1 issues found. New tests exercise the fixed code paths across all complex types and executors. No files require special attention.
|
| Filename | Overview |
|---|---|
| include/matx/core/tensor_desc.h | Adds __MATX_INLINE__ __MATX_HOST__ __MATX_DEVICE__ to four previously host-only static constexpr methods in static_tensor_desc_t, enabling device-side access. |
| include/matx/core/tensor.h | Introduces OutDesc type alias in RealView() and ImagView() that substitutes a runtime-constructible dynamic descriptor when the source tensor uses a static descriptor, fixing a compile error. |
| test/00_tensor/TensorCreationTests.cu | Adds TYPED_TEST_SUITE registration for TensorCreationTestsComplex, fixes MakeStaticShape to extract the scalar type from the tuple parameter, and adds ~300 lines of new static-tensor tests covering arithmetic (1–4D), shape/descriptor queries, and real/imag views. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["RealView() / ImagView() called on tensor_t<T, RANK, Desc>"] --> B{is_matx_static_descriptor<Desc>?}
B -- Yes --> C["OutDesc = tensor_desc_cr_ds_t<shape_type, stride_type, RANK>\n(dynamic descriptor)"]
B -- No --> D["OutDesc = Desc\n(original descriptor)"]
C --> E["OutDesc new_desc{shape, modified_strides}"]
D --> E
E --> F["tensor_t<InnerType, RANK, OutDesc> view"]
F --> G["Non-owning storage pointing to real or imag offset"]
Reviews (2): Last reviewed commit: "Conditional switch on static tensor for ..." | Re-trigger Greptile
|
/build |
Closes #125