Skip to content

[E2E] refactor: drop vulkan_common dependencies from bindless image tests - #23047

Open
mianowski wants to merge 6 commits into
intel:syclfrom
mianowski:feat/URT-1271-drop-vulkan_common
Open

[E2E] refactor: drop vulkan_common dependencies from bindless image tests#23047
mianowski wants to merge 6 commits into
intel:syclfrom
mianowski:feat/URT-1271-drop-vulkan_common

Conversation

@mianowski

@mianowski mianowski commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

@mianowski mianowski changed the title [E2E] chore: drop vulkan_common from bindless image tests [E2E] refactor: drop vulkan_common dependencies from bindless image tests Aug 28, 2026
@mianowski
mianowski marked this pull request as ready for review August 28, 2026 14:38
@mianowski
mianowski requested review from a team as code owners August 28, 2026 14:38
@mianowski
mianowski requested a review from 0x12CC August 28, 2026 14:38
@KornevNikita
KornevNikita requested a review from dyniols August 28, 2026 16:25

@KornevNikita KornevNikita left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CODEOWNERS change LGTM.

@mianowski

mianowski commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

@dyniols please review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@dyniols
dyniols requested a balanced review from Copilot September 1, 2026 11:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just bring over that utility routine? Or define a new one (occassionally_equal) ;-) ?

@dyniols

dyniols commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

I think we can remove the CommonUtils directory, as no other files will remain once vulkan_common.hpp is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop CommonUtils/vulkan_common.hpp from bindless images e2e tests and migrate to vulkan_setup.hpp

5 participants