Skip to content
Merged
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
23 changes: 23 additions & 0 deletions backends/vulkan/runtime/graph/ComputeGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <executorch/backends/vulkan/runtime/graph/containers/SharedObject.h>
#include <executorch/backends/vulkan/runtime/graph/containers/Value.h>

#include <executorch/backends/vulkan/runtime/graph/ops/DispatchNode.h>
#include <executorch/backends/vulkan/runtime/graph/ops/ExecuteNode.h>
#include <executorch/backends/vulkan/runtime/graph/ops/PrepackNode.h>

Expand Down Expand Up @@ -350,6 +351,28 @@ class ComputeGraph final {
return values_.at(idx).toTensor().logical_limits_ubo();
}

inline PushConstantDataInfo sizes_pc_of(const ValueRef idx) const {
return PushConstantDataInfo(
values_.at(idx).toConstTensor().get_uniform_data(), api::kTensorSizes);
}

inline PushConstantDataInfo strides_pc_of(const ValueRef idx) const {
return PushConstantDataInfo(
values_.at(idx).toConstTensor().get_uniform_data(),
api::kTensorStrides);
}

inline PushConstantDataInfo logical_limits_pc_of(const ValueRef idx) const {
return PushConstantDataInfo(
values_.at(idx).toConstTensor().get_uniform_data(),
api::kTensorLogicalLimits);
}

inline PushConstantDataInfo numel_pc_of(const ValueRef idx) const {
return PushConstantDataInfo(
values_.at(idx).toConstTensor().get_uniform_data(), api::kTensorNumel);
}

//
// Scalar Value Extraction
//
Expand Down