Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions backends/vulkan/runtime/api/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,8 @@ Context* context() {
return context.get();
}

#ifdef VULKAN_DEBUG

#ifdef VK_KHR_pipeline_executable_properties
#if defined(VK_KHR_pipeline_executable_properties) && \
defined(ETVK_INSPECT_PIPELINES)

VkPipeline Context::get_shader_pipeline(
const vkapi::ShaderInfo& shader,
Expand Down Expand Up @@ -502,9 +501,7 @@ void Context::print_shader_executable_properties(
}
}

#endif // VK_KHR_pipeline_executable_properties

#endif // VULKAN_DEBUG
#endif // VK_KHR_pipeline_executable_properties && ETVK_INSPECT_PIPELINES

} // namespace api
} // namespace vkcompute
9 changes: 3 additions & 6 deletions backends/vulkan/runtime/api/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,8 @@ class Context final {

void flush();

#ifdef VULKAN_DEBUG

#ifdef VK_KHR_pipeline_executable_properties
#if defined(VK_KHR_pipeline_executable_properties) && \
defined(ETVK_INSPECT_PIPELINES)

VkPipeline get_shader_pipeline(
const vkapi::ShaderInfo& shader,
Expand All @@ -260,9 +259,7 @@ class Context final {
const vkapi::ShaderInfo& shader,
const vkapi::SpecVarList& spec_constants);

#endif // VK_KHR_pipeline_executable_properties

#endif // VULKAN_DEBUG
#endif // VK_KHR_pipeline_executable_properties && ETVK_INSPECT_PIPELINES
};

bool available();
Expand Down
5 changes: 3 additions & 2 deletions backends/vulkan/runtime/vk_api/Adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ VkDevice create_logical_device(
#ifdef VK_KHR_shader_integer_dot_product
VK_KHR_SHADER_INTEGER_DOT_PRODUCT_EXTENSION_NAME,
#endif /* VK_KHR_shader_integer_dot_product */
#if defined(VK_KHR_pipeline_executable_properties) && defined(VULKAN_DEBUG)
#if defined(VK_KHR_pipeline_executable_properties) && \
defined(ETVK_INSPECT_PIPELINES)
VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME,
#endif /* VK_KHR_pipeline_executable_properties */
#endif /* VK_KHR_pipeline_executable_properties && ETVK_INSPECT_PIPELINES */
};

std::vector<const char*> enabled_device_extensions;
Expand Down
5 changes: 3 additions & 2 deletions backends/vulkan/runtime/vk_api/Pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,11 @@ ComputePipeline::ComputePipeline(
};

VkPipelineCreateFlags flags = 0u;
#if defined(VULKAN_DEBUG) && defined(VK_KHR_pipeline_executable_properties)
#if defined(VK_KHR_pipeline_executable_properties) && \
defined(ETVK_INSPECT_PIPELINES)
flags = VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR |
VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR | flags;
#endif /* VULKAN_DEBUG && VK_KHR_pipeline_executable_properties */
#endif // VK_KHR_pipeline_executable_properties && ETVK_INSPECT_PIPELINES

const VkComputePipelineCreateInfo compute_pipeline_create_info{
VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, // sType
Expand Down
5 changes: 3 additions & 2 deletions backends/vulkan/test/vulkan_compute_api_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,15 @@ TEST_F(VulkanComputeAPITest, print_adapter) {
std::cout << *(context()->adapter_ptr()) << std::endl;
}

#if defined(VULKAN_DEBUG) && defined(VK_KHR_pipeline_executable_properties)
#if defined(VK_KHR_pipeline_executable_properties) && \
defined(ETVK_INSPECT_PIPELINES)

TEST_F(VulkanComputeAPITest, print_shader_executable_properties) {
context()->print_shader_executable_properties(
VK_KERNEL(binary_add_nobroadcast__test_half), {0});
}

#endif // VULKAN_DEBUG && VK_KHR_pipeline_executable_properties
#endif // VK_KHR_pipeline_executable_properties && ETVK_INSPECT_PIPELINES

std::vector<int64_t> get_reference_strides(
const std::vector<int64_t>& sizes,
Expand Down
Loading