Skip to content

Commit ab88e9b

Browse files
author
ssjia
committed
Update on "[ET-VK] High dim tensor support for view, unsqueeze, squeeze, clone"
Differential Revision: [D80800084](https://our.internmc.facebook.com/intern/diff/D80800084) [ghstack-poisoned]
2 parents 436af31 + 7d2b3dc commit ab88e9b

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

backends/vulkan/runtime/api/containers/Tensor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,8 @@ std::vector<T> flip_and_unsqueeze(
705705
const size_t numel,
706706
const int32_t fixed_ndim = -1) {
707707
const size_t ndim = tensor_metadata.size();
708-
size_t ndim_up4 = utils::align_up_4(tensor_metadata.size());
708+
size_t ndim_up4 =
709+
std::max(utils::align_up_4(tensor_metadata.size()), size_t(4));
709710

710711
if (fixed_ndim > 0) {
711712
VK_CHECK_COND(fixed_ndim >= ndim);

backends/vulkan/runtime/graph/ops/glsl/view_buffer.glsl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ ${define_required_extensions(DTYPE)}
88

99
layout(std430) buffer;
1010

11-
#extension GL_EXT_debug_printf : enable
12-
13-
#define DEBUG_MODE
1411
#include "indexing.glslh"
1512

1613
${layout_declare_tensor(B, "w", "t_outp", DTYPE, STORAGE)}
@@ -31,12 +28,6 @@ void main() {
3128
return;
3229
}
3330

34-
bool should_print = outp_bufi == 0;
35-
if (should_print) {
36-
printBufferMetadata(outp);
37-
printBufferMetadata(inp);
38-
}
39-
4031
TensorIndex outp_tidx;
4132
linear_idx_to_tensor_idx(outp, outp_bufi, outp_tidx);
4233

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include <executorch/backends/vulkan/runtime/graph/ops/impl/utils/DimUtils.h>
1919
#include <executorch/backends/vulkan/runtime/graph/ops/impl/utils/TensorUtils.h>
2020

21-
#include <iostream>
22-
2321
namespace vkcompute {
2422

2523
void add_staging_to_tensor_node(

0 commit comments

Comments
 (0)