* [Compiler] Addressing new compiler warnings
Clang enables new lifetime warnings in production and we see build
errors due to this with the staging compiler.
The attributes added in this PR are suggested by the compiler. However,
I'm not very familiar with the code base, so the changes may be
incorrect.
* Update some more instances
* Adds file-level ignores via clang diagnostic pragma
The number of instances was large, so I decided to use file-level scope
to disable the warning via pragma clang diagnostic ignored.
It also showed this warning coming from the gtest dependency. For that,
I did add the respective command line flag to the CMake variables. I
don't know if this is acceptable or not.
* This adds the remaining instances
For a build on gfx90a.
* fix clang format
* Adding couple more instances from gfx1200 build
* Fixed another few instances
---------
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
Co-authored-by: illsilin_amdeng <Illia.Silin@amd.com>
Replace inline lambdas with named functor structs in transform_tensor_descriptor
to reduce template instantiation overhead and improve compile times.
Changes:
- Add three named functors in tensor_descriptor.hpp:
- convert_visible_to_hidden_id: maps visible dimension ID to hidden ID
- convert_visible_ids_to_hidden_ids: maps sequence of visible IDs to hidden IDs
- generate_arithmetic_sequence_from_scan: generates consecutive hidden dim ID ranges
- Add utility functions in sequence_helper.hpp and tuple_helper.hpp:
- unpack_and_merge_sequences(): unpacks tuple of sequences and merges them
- generate_identity_sequences(): creates Tuple<Sequence<0>, Sequence<1>, ...>
- Update 14 call sites across threadwise transfer, wrapper, and device files
to use generate_identity_sequences() instead of generate_tuple with lambdas
- Add comprehensive unit tests:
- unit_sequence_helper.cpp: tests for new utility functions
- unit_tensor_descriptor_functors.cpp: tests for new functors
Co-Authored-By: Claude <noreply@anthropic.com>