Skip to content
Closed
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
4 changes: 1 addition & 3 deletions backends/vulkan/runtime/graph/ops/PrepackNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ void PrepackNode::encode(ComputeGraph* graph) {
TensorRef tref = graph->get_val(tref_).toTensorRef();
vTensor packed = graph->get_val(packed_).toTensor();

// TODO: Extract to standalone function, to support other types of prepacking.
api::StorageBuffer staging(
graph->context(), packed.dtype(), packed.gpu_nbytes());
size_t numel = api::utils::multiply_integers(tref.sizes);
api::StorageBuffer staging(graph->context(), tref.dtype, numel);
size_t nbytes = numel * api::element_size(tref.dtype);
copy_ptr_to_staging(tref.data, staging, nbytes);

Expand Down