layers: Add checks and tests for VU 9941 - WIP#11713
layers: Add checks and tests for VU 9941 - WIP#11713stefano-bucciarelli-arm wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
14130aa to
1e31fc0
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
1e31fc0 to
494f471
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
494f471 to
1ca1aa1
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
1ca1aa1 to
97ea8b4
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
97ea8b4 to
a7ccb1c
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
a7ccb1c to
3a8b44b
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
3a8b44b to
7c527b8
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
7c527b8 to
de8e83f
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
de8e83f to
93fb3e2
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
93fb3e2 to
798353e
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
798353e to
f6d4644
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
| 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)); |
There was a problem hiding this comment.
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 PhysicalDevice::has_maintenance9 as an example
There was a problem hiding this comment.
copying what we do with has_maintenance9 doesn't work, it gets initialize after we pass through here.
Is there another way to check if an extension is supported at this stage?
There was a problem hiding this comment.
and how can DispatchGetPhysicalDeviceQueueFamilyDataGraphPropertiesARM be undefined? It's in the generated vulkan code, layers/vulkan/generated/dispatch_functions.h.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I pushed something to check if the function is not null in the dispatch table, does this work?
Is there a simple way to make the mock ICD emulate the issue for testing, i.e. force dispatch_table.GetPhysicalDeviceQueueFamilyDataGraphPropertiesARM == nullptr?
There was a problem hiding this comment.
@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) {f6d4644 to
49200c6
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
49200c6 to
6d0dc6f
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
6d0dc6f to
f1676a2
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
1 similar comment
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
|
@stefano-bucciarelli-arm this PR got messy I merged in #11753 I would suggest closing this, and trying again with my idea of still having but in if (IsExtEnabled(extensions.vk_arm_tensors)) {
physical_device_state->GetQueueFamilyDataGraphProps();
}when |
36ca134 to
35ef990
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
35ef990 to
ce61ff0
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
- covers VK_PHYSICAL_DEVICE_DATA_GRAPH_PROCESSING_ENGINE_TYPE_DEFAULT_ARM only - test skipped in mock ICD: we don't have a way to create an unsupported queue
ce61ff0 to
1dcdb7e
Compare
|
Author stefano-bucciarelli-arm not on autobuild list. Waiting for curator authorization before starting CI build. |
This is very specific for datagraphs defined with TOSA in a spirv program.
The unit test does NOT create a negative case; it is a positive test for testing and needs to be modified.