-
Notifications
You must be signed in to change notification settings - Fork 465
layers: Add VK_QCOM_data_graph_model extension support and unit tests #11577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ZZKQcom
commented
Jan 29, 2026
- Add VK_QCOM_data_graph_model extension validation in VVL.
- Add VK_QCOM_data_graph_model extension positive and negative unit tests.
- Run vk_layer_validation_tests on Qualcomm SM8750/SM8850 device, pass all unit tests (include new added data graph model unit tests) except some unsupported tests (skip).
- Run vk_layer_validation_tests on Test Driver and Profiles layer, skip on some unsupported tests, fail on some NegativeTensor tests provided by ARM, but they have nothing to do with the code change, they are associated with the wrong usages of tensor and external memory.
|
Author ZZKQcom not on autobuild list. Waiting for curator authorization before starting CI build. |
afb1b3b to
46894b3
Compare
|
Author ZZKQcom not on autobuild list. Waiting for curator authorization before starting CI build. |
| bool has_identical_op = false; | ||
| bool has_identical_paired_op_engine = false; | ||
|
|
||
| std::vector<uint32_t> data_graph_queue_families{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| std::vector<uint32_t> data_graph_queue_families{}; | |
| vvl::unordered_set<uint32_t> data_graph_queue_families{}; |
| } | ||
| } | ||
|
|
||
| if (!has_identical_paired_op_engine) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this suppose to still be an error if data_graph_queue_families is empty?
A comment saying (and an assert(!data_graph_queue_families.empty());) to say otherwise that if we are in this function, there is a guaranteed VK_QUEUE_DATA_GRAPH_BIT_ARM
| } | ||
|
|
||
| if (!has_identical_paired_op_engine) { | ||
| std::string conditional_string{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use std::stringstream ss; like we do for other errors we want to print a more complex, conditional based, error message
| } | ||
|
|
||
| // Defer validate VkPipelineCacheHeaderVersionDataGraphQCOM of VkPipelineCache | ||
| // TODO: may exist potential issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are "potential issues" here, please elaborate, if it is a spec issue, please provide a link to it here in the comment
| const auto &error_obj = context.error_obj; | ||
|
|
||
| if (const auto* processing_engine_info = | ||
| vku::FindStructInPNextChain<VkDataGraphProcessingEngineCreateInfoARM>(pCreateInfo->pNext); processing_engine_info) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra declaration is not needed
| vku::FindStructInPNextChain<VkDataGraphProcessingEngineCreateInfoARM>(pCreateInfo->pNext); processing_engine_info) { | |
| vku::FindStructInPNextChain<VkDataGraphProcessingEngineCreateInfoARM>(pCreateInfo->pNext)) { |
|
|
||
| m_errorMonitor->SetDesiredError("VUID-VkPipelineCacheHeaderVersionDataGraphQCOM-headerSize-11836"); | ||
| { | ||
| auto pipeline_cache = BuildPipelineCacheWithInvalidHeaderSize(*this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't want these "one time only " function, all of these are basically the test logic, but I now have to go bounce around to see what is going on
if you can't find a reason to use the "test helper" functions more than once, it is not a helper... it is the test, so please just inline here
| } | ||
|
|
||
| // Record and execute command packets | ||
| VkDataGraphPipelineDispatchInfoARM data_graph_pipeline_dispatch_info{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
search VK_STRUCTURE_TYPE in this PR, they all should be using vku::InitStructHelper();
| DGModelPipelineLayoutInfo dg_pipeline_layout_info = BuildGeneralPipelineLayout(layer_test); | ||
|
|
||
| // Data graph pipeline create information | ||
| VkDataGraphPipelineCreateInfoARM data_graph_pipeline_ci = vku::InitStructHelper(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| VkDataGraphPipelineCreateInfoARM data_graph_pipeline_ci = vku::InitStructHelper(); | |
| VkDataGraphPipelineCreateInfoARM data_graph_pipeline_ci = vku::InitStructHelper(&identifier_ci); |
| command_buffer_allocate_info.commandPool = command_pool; | ||
| command_buffer_allocate_info.commandBufferCount = 1; | ||
| command_buffer_allocate_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; | ||
| vkt::CommandBuffer command_buffer{ *m_device, command_buffer_allocate_info }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| vkt::CommandBuffer command_buffer{ *m_device, command_buffer_allocate_info }; | |
| vkt::CommandBuffer command_buffer{ *m_device, command_pool }; |
| DGModelTensorInfo output_tensor_info = BuildTensor(*this, output_tensor_description); | ||
|
|
||
| // Create command pool | ||
| VkCommandPoolCreateInfo command_pool_ci = vku::InitStructHelper(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| VkCommandPoolCreateInfo command_pool_ci = vku::InitStructHelper(); | |
| VkCommandPoolCreateInfo command_pool_ci = vku::InitStructHelper(&dg_processing_engine_ci); |