-
Notifications
You must be signed in to change notification settings - Fork 470
layers: Add checks and tests for VU 9941 - WIP #11713
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,24 @@ const std::vector<VkQueueFamilyProperties> PhysicalDevice::GetQueueFamilyProps(V | |
| return result; | ||
| } | ||
|
|
||
| const std::unordered_map<uint32_t, std::vector<VkQueueFamilyDataGraphPropertiesARM>> PhysicalDevice::GetQueueFamilyDataGraphProps(VkPhysicalDevice phys_dev) { | ||
| uint32_t n_families = static_cast<uint32_t>(queue_family_properties.size()); | ||
| if (n_families == 0) { | ||
| // queue_family_properties not yet initialized. We should've done it before now, this is just in case | ||
| DispatchGetPhysicalDeviceQueueFamilyProperties(phys_dev, &n_families, nullptr); | ||
| } | ||
|
|
||
| std::unordered_map<uint32_t, std::vector<VkQueueFamilyDataGraphPropertiesARM>> all_properties; | ||
| for (uint32_t i = 0; i < n_families; i++) { | ||
| uint32_t n_properties = 0; | ||
| assert(VK_SUCCESS == DispatchGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(phys_dev, i, &n_properties, nullptr)); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this crashes locally because my machine doesn't have this function, you are going to need to warp this with const std::unordered_map<uint32_t, std::vector<VkQueueFamilyDataGraphPropertiesARM>> PhysicalDevice::GetQueueFamilyDataGraphProps(VkPhysicalDevice phys_dev) {
std::unordered_map<uint32_t, std::vector<VkQueueFamilyDataGraphPropertiesARM>> all_properties;
if (has_arm_tensors) {
}
return all_properties;
}... see
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. copying what we do with
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and how can
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function is just null, there is no implementation in my driver, so it crashes What we can do is just cache it, the first time someone calls it in the command buffer it gets the value, the 2nd time, it just reads from it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I pushed something to check if the function is not null in the dispatch table, does this work?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stefano-bucciarelli-arm just remove it from TestICD and try to run any test, it will crash quite quickly diff --git a/layers/vulkan/generated/test_icd_helper.h b/layers/vulkan/generated/test_icd_helper.h
index 8b34680c1..66fcb94e5 100644
--- a/layers/vulkan/generated/test_icd_helper.h
+++ b/layers/vulkan/generated/test_icd_helper.h
@@ -2140,9 +2140,6 @@ static VKAPI_ATTR VkResult VKAPI_CALL GetDataGraphPipelinePropertiesARM(VkDevice
const VkDataGraphPipelineInfoARM* pPipelineInfo,
uint32_t propertiesCount,
VkDataGraphPipelinePropertyQueryResultARM* pProperties);
-static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(
- VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t* pQueueFamilyDataGraphPropertyCount,
- VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties);
static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceQueueFamilyDataGraphProcessingEngineInfoARM* pQueueFamilyDataGraphProcessingEngineInfo,
@@ -3094,7 +3091,6 @@ static const std::unordered_map<std::string, void*> name_to_func_ptr_map = {
{"vkCmdDispatchDataGraphARM", (void*)CmdDispatchDataGraphARM},
{"vkGetDataGraphPipelineAvailablePropertiesARM", (void*)GetDataGraphPipelineAvailablePropertiesARM},
{"vkGetDataGraphPipelinePropertiesARM", (void*)GetDataGraphPipelinePropertiesARM},
- {"vkGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM", (void*)GetPhysicalDeviceQueueFamilyDataGraphPropertiesARM},
{"vkGetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM",
(void*)GetPhysicalDeviceQueueFamilyDataGraphProcessingEnginePropertiesARM},
{"vkCmdSetAttachmentFeedbackLoopEnableEXT", (void*)CmdSetAttachmentFeedbackLoopEnableEXT},
diff --git a/tests/icd/test_icd.cpp b/tests/icd/test_icd.cpp
index 924d5c888..7d647e76f 100644
--- a/tests/icd/test_icd.cpp
+++ b/tests/icd/test_icd.cpp
@@ -1454,20 +1454,6 @@ static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceExternalTensorPropertiesARM(
}
}
-static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, uint32_t *pQueueFamilyDataGraphPropertyCount, VkQueueFamilyDataGraphPropertiesARM* pQueueFamilyDataGraphProperties) {
-
- // TODO: Need a way for test to decide to support or not support various engines
-
- if (pQueueFamilyDataGraphProperties == nullptr) {
- *pQueueFamilyDataGraphPropertyCount = 1;
- } else {
- pQueueFamilyDataGraphProperties[0].sType = VK_STRUCTURE_TYPE_QUEUE_FAMILY_DATA_GRAPH_PROPERTIES_ARM;
- pQueueFamilyDataGraphProperties[0].engine = { VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM, false };
- pQueueFamilyDataGraphProperties[0].operation = { VK_PHYSICAL_DEVICE_DATA_GRAPH_OPERATION_TYPE_SPIRV_EXTENDED_INSTRUCTION_SET_ARM, "TOSA.001000.1", 0 };
- }
- return VK_SUCCESS;
-}
-
static VKAPI_ATTR VkResult VKAPI_CALL
GetPhysicalDeviceImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
VkImageFormatProperties2* pImageFormatProperties) { |
||
| std::vector<VkQueueFamilyDataGraphPropertiesARM> family_properties(n_properties, vku::InitStruct<VkQueueFamilyDataGraphPropertiesARM>()); | ||
| assert(VK_SUCCESS == DispatchGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM(phys_dev, i, &n_properties, family_properties.data())); | ||
| all_properties.try_emplace(i, std::move(family_properties)); | ||
| } | ||
| return all_properties; | ||
| } | ||
|
|
||
| VkQueueFlags PhysicalDevice::GetSupportedQueues() { | ||
| VkQueueFlags flags = 0; | ||
| for (const auto& prop : queue_family_properties) { | ||
|
|
@@ -65,6 +83,7 @@ VkQueueFlags PhysicalDevice::GetSupportedQueues() { | |
| PhysicalDevice::PhysicalDevice(VkPhysicalDevice handle) | ||
| : StateObject(handle, kVulkanObjectTypePhysicalDevice), | ||
| queue_family_properties(GetQueueFamilyProps(handle)), | ||
| queue_family_data_graph_properties(GetQueueFamilyDataGraphProps(handle)), | ||
| supported_queues(GetSupportedQueues()) {} | ||
|
|
||
| } // namespace vvl | ||
Uh oh!
There was an error while loading. Please reload this page.