Skip to content

Commit d746b7b

Browse files
committed
Update on "[ET-VK] Adding push constant and ubo verison of select and slice ops to improve memory and performance."
Adding push constant and ubo verison of select and slice ops to improve memory and performance. * Updated `transfer_buffer.yaml` and `transfer_texture.yaml` to include `UBO_PARAMS` parameter and generate variants for `select` and `slice` ops with UBO parameters. * Updated `transfer.glsl` to generate ubo and push constant versions of `select` and `slice` ops with UBO parameters. Differential Revision: [D78095262](https://our.internmc.facebook.com/intern/diff/D78095262/) [ghstack-poisoned]
2 parents 8045f99 + 78168c0 commit d746b7b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

backends/vulkan/runtime/graph/ops/impl/Transfer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,10 @@ void add_transfer_copy_node(
8181
}
8282

8383
if (param_is_scalar) {
84-
push_constants.emplace_back(
85-
PushConstantDataInfo(&transfer_params, sizeof(transfer_params)));
84+
push_constants.emplace_back(&transfer_params, sizeof(transfer_params));
8685
} else {
87-
push_constants.emplace_back(PushConstantDataInfo(
88-
&transfer_params.dim, sizeof(transfer_params.dim)));
86+
push_constants.emplace_back(
87+
&transfer_params.dim, sizeof(transfer_params.dim));
8988
}
9089

9190
vkapi::SpecVarList spec_vars = {

0 commit comments

Comments
 (0)