[ET-VK][ez][testing] Fix tensor_no_copy_transpose_test crash with transposed matmul #16368
+95
−54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
The tensor_no_copy_transpose_test was crashing with a segmentation fault when
testing matrix multiplication with a virtually transposed tensor. The test
helper function record_matmul_texture3d() always used the matmul_naive shader
variant, even when mat2 was transposed, causing a shader variant mismatch that
led to invalid descriptor bindings and a crash in the NVIDIA Vulkan driver.
This change adds a mat2_is_transposed parameter (default=false) to
record_matmul_texture3d() to properly select between matmul_naive and
matmul_transposed_naive shader variants. The implementation now mirrors the
production code logic in MatMul.cpp which correctly handles this case.
Changes:
transpose flag and properly construct push constants
Impact:
and require separate investigation)
Test Plan:
./cmake-out/backends/vulkan/test/vulkan_compute_api_test
--gtest_filter=VulkanComputeAPITest.tensor_no_copy_transpose_test