[E2E] refactor: drop vulkan_common dependencies from bindless image tests - #23047
Open
mianowski wants to merge 6 commits into
Open
[E2E] refactor: drop vulkan_common dependencies from bindless image tests#23047mianowski wants to merge 6 commits into
mianowski wants to merge 6 commits into
Conversation
KornevNikita
approved these changes
Aug 28, 2026
KornevNikita
left a comment
Contributor
There was a problem hiding this comment.
CODEOWNERS change LGTM.
Contributor
Author
|
@dyniols please review |
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Comment on lines
+704
to
+716
| inline VkImageMemoryBarrier createImageMemoryBarrier(VkImage image, | ||
| uint32_t mipLevels) { | ||
| VkImageMemoryBarrier barrier{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER}; | ||
| barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; | ||
| barrier.newLayout = VK_IMAGE_LAYOUT_GENERAL; | ||
| barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; | ||
| barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; | ||
| barrier.image = image; | ||
| barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; | ||
| barrier.subresourceRange.levelCount = mipLevels; | ||
| barrier.subresourceRange.layerCount = 1; | ||
| return barrier; | ||
| } |
Comment on lines
416
to
+420
| int main() { | ||
|
|
||
| if (vkutil::setupInstance() != VK_SUCCESS) { | ||
| std::cerr << "Instance setup failed!\n"; | ||
| return EXIT_FAILURE; | ||
| } | ||
|
|
||
| sycl::device dev; | ||
|
|
||
| if (vkutil::setupDevice(dev) != VK_SUCCESS) { | ||
| std::cerr << "Device setup failed!\n"; | ||
| return EXIT_FAILURE; | ||
| } | ||
|
|
||
| if (vkutil::setupCommandBuffers() != VK_SUCCESS) { | ||
| std::cerr << "Compute pipeline setup failed!\n"; | ||
| return EXIT_FAILURE; | ||
| } | ||
|
|
||
| bool result_ok = run_tests(); | ||
|
|
||
| if (vkutil::cleanup() != VK_SUCCESS) { | ||
| std::cerr << "Cleanup failed!\n"; | ||
| return EXIT_FAILURE; | ||
| } | ||
| VulkanContext vkCtx = createVulkanContext(); | ||
| bool result_ok = run_tests(vkCtx); | ||
| cleanupVulkanContext(vkCtx); |
Comment on lines
+306
to
309
| VulkanContext vkCtx = createVulkanContext(); | ||
| auto testPassed = runTest(vkCtx, syclDevice, {128, 128}, {16, 16}); | ||
| cleanupVulkanContext(vkCtx); | ||
|
|
Comment on lines
+153
to
+180
| VkCommandPoolCreateInfo PoolInfo = { | ||
| VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO}; | ||
| PoolInfo.queueFamilyIndex = VulkanCtx.queueFamilyIndex; | ||
| VkCommandPool Pool; | ||
| VK_CHECK(vkCreateCommandPool(VulkanCtx.device, &PoolInfo, nullptr, &Pool)); | ||
| VkCommandBufferAllocateInfo CmdAllocInfo = { | ||
| VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO}; | ||
| CmdAllocInfo.commandPool = Pool; | ||
| CmdAllocInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; | ||
| CmdAllocInfo.commandBufferCount = 1; | ||
| VkCommandBuffer CommandBuffer; | ||
| VK_CHECK(vkAllocateCommandBuffers(VulkanCtx.device, &CmdAllocInfo, | ||
| &CommandBuffer)); | ||
| VK_CHECK(vkBeginCommandBuffer(CommandBuffer, &Cbbi)); | ||
| vkCmdCopyBuffer(CommandBuffer, VkImportedBuffer, StagingBuffer, | ||
| 1 /*regionCount*/, &CopyRegion); | ||
| VK_CHECK_CALL(vkEndCommandBuffer(vk_transferCmdBuffers[0])); | ||
| VK_CHECK(vkEndCommandBuffer(CommandBuffer)); | ||
|
|
||
| std::vector<VkPipelineStageFlags> Stages{VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT}; | ||
|
|
||
| VkSubmitInfo Submission = {}; | ||
| Submission.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; | ||
| Submission.commandBufferCount = 1; | ||
| Submission.pCommandBuffers = &vk_transferCmdBuffers[0]; | ||
| Submission.pCommandBuffers = &CommandBuffer; | ||
| Submission.pWaitDstStageMask = Stages.data(); | ||
|
|
||
| VK_CHECK_CALL(vkQueueSubmit(vk_transfer_queue, 1 /*submitCount*/, | ||
| &Submission, VK_NULL_HANDLE /*fence*/)); | ||
| VK_CHECK_CALL(vkQueueWaitIdle(vk_transfer_queue)); | ||
| VK_CHECK(vkQueueSubmit(VulkanCtx.queue, 1, &Submission, VK_NULL_HANDLE)); | ||
| VK_CHECK(vkQueueWaitIdle(VulkanCtx.queue)); |
| // Use helper function to determine if data is accepted. | ||
| // For floats, use default accepted error variance. | ||
| if (!util::is_equal(outputVec[i], expected)) { | ||
| if (std::abs(outputVec[i] - expected) > 0.01f) { |
Contributor
There was a problem hiding this comment.
maybe just bring over that utility routine? Or define a new one (occassionally_equal) ;-) ?
Contributor
|
I think we can remove the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#22885