Skip to content

Commit f958cab

Browse files
committed
Update on "[ET-VK] Change weight packing in embedding"
The existing weight tensor for aten.embedding is created using a `tensor_like` from the output tensor, which defaults to channel packed. However, the weight tensor is actually a 2D-tensor of `(num_embedding, dim_of_embedding)`. It is better in space to use either width or height packing. This diff changes the implementation to use height-packing. Differential Revision: [D66421366](https://our.internmc.facebook.com/intern/diff/D66421366/) [ghstack-poisoned]
1 parent c87c6c3 commit f958cab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
namespace vkcompute {
2121

22-
using utils::StorageType;
2322
using utils::GPUMemoryLayout;
23+
using utils::StorageType;
2424

2525
void check_embedding_args(
2626
const api::vTensor& weight,

0 commit comments

Comments
 (0)