Skip to content

Comments

Added support for VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES#1003

Open
karimsayedre wants to merge 2 commits intomasterfrom
pipeline-exec-info
Open

Added support for VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES#1003
karimsayedre wants to merge 2 commits intomasterfrom
pipeline-exec-info

Conversation

@karimsayedre
Copy link
Contributor

Notes:

  • As mentioned in examples_tests #253, it seems ray tracing pipeline doesn't actually report at all (only tested example 71).

NBL_LOG_ERROR("Feature `pipelineExecutableInfo` is not enabled");
return {};
}
return getPipelineExecutableReport_impl(pipeline->getNativeHandle(), includeInternalRepresentations);

Choose a reason for hiding this comment

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

you shall not call getNativeHandle here, this is not How Nabla works

// If includeInternalRepresentations is true, also includes shader IR/assembly
// (pipeline must have been created with CAPTURE_INTERNAL_REPRESENTATIONS flag).
template<typename Pipeline>
std::string getPipelineExecutableReport(const Pipeline* pipeline, bool includeInternalRepresentations = false)

Choose a reason for hiding this comment

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

one string for stats, one string for internal rep, make it a nice named struct

Choose a reason for hiding this comment

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

actually a vector of named structs, one per executable

Comment on lines 1687 to 1691
report += "======== ";
report += prop.name;
report += " ========\n";
report += prop.description;
report += "\n";

Choose a reason for hiding this comment

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

try to avoid adding extra formatting

Choose a reason for hiding this comment

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

the standard stuff should go in one string, the customizable/driver-specific should go in another and IR should go in the 3rd

Copy link
Member

@devshgraphicsprogramming devshgraphicsprogramming Feb 20, 2026

Choose a reason for hiding this comment

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

actually if you want to do a formatted output (with titles and divisors) you can specialize system::to_string_helper for the named struct in ILogicalDevice containing the report :D

Comment on lines +1676 to +1679
core::vector<VkPipelineExecutablePropertiesKHR> properties(executableCount);
for (uint32_t i = 0; i < executableCount; ++i)
properties[i] = {VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_PROPERTIES_KHR, nullptr};
m_devf.vk.vkGetPipelineExecutablePropertiesKHR(m_vkdev, &pipelineInfo, &executableCount, properties.data());

Choose a reason for hiding this comment

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

do the executables have any identifiers or something similar ?

I know a pipeline may compile into more or less executables than stages and there isn't a clear mapping, but is there a hash, name or anything ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no hash, name + stages is the closest thing to an identifier

…cks, `getPipelineExecutableProperties_impl` overloads with one helper function
std::string CVulkanLogicalDevice::getPipelineExecutableReport_impl(const void* nativeHandle, bool includeInternalRepresentations)
core::vector<ILogicalDevice::SPipelineExecutableInfo> CVulkanLogicalDevice::getPipelineExecutableProperties_impl(const IGPUComputePipeline* pipeline, bool includeInternalRepresentations)
{
const VkPipeline vkPipeline = *reinterpret_cast<const VkPipeline*>(nativeHandle);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does that look better?

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.

2 participants