Skip to content
Open
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
3 changes: 1 addition & 2 deletions backends/vulkan/runtime/graph/ops/DispatchNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ DispatchNode::DispatchNode(
spec_vars_(spec_vars),
push_constants_(push_constants) {
graph.update_descriptor_counts(shader, /*execute = */ true);
graph.context()->check_device_capabilities(shader_);
}

void DispatchNode::encode(ComputeGraph* graph) {
Expand All @@ -42,8 +43,6 @@ void DispatchNode::encode(ComputeGraph* graph) {
api::Context* const context = graph->context();
vkapi::PipelineBarrier pipeline_barrier{};

context->check_device_capabilities(shader_);

std::unique_lock<std::mutex> cmd_lock = context->dispatch_lock();

std::array<uint8_t, kMaxPushConstantSize> push_constants_data;
Expand Down
3 changes: 1 addition & 2 deletions backends/vulkan/runtime/graph/ops/PrepackNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ PrepackNode::PrepackNode(
push_constants_(push_constants) {
graph.update_descriptor_counts(shader, /*execute = */ false);
graph.update_descriptor_counts(noop_shader_, /*execute = */ false);
graph.context()->check_device_capabilities(shader_);
}

api::StagingBuffer PrepackNode::create_staging_buffer(ComputeGraph* graph) {
Expand All @@ -70,8 +71,6 @@ api::StagingBuffer PrepackNode::create_staging_buffer(ComputeGraph* graph) {
void PrepackNode::encode(ComputeGraph* graph) {
api::Context* const context = graph->context();

context->check_device_capabilities(shader_);

vTensorPtr packed = graph->get_tensor(packed_);
api::StagingBuffer staging = create_staging_buffer(graph);

Expand Down
Loading