Skip to content

Commit 625257b

Browse files
SS-JIAfacebook-github-bot
authored andcommitted
Make WIDTH_PACKED the default packing scheme (#2518)
Summary: Pull Request resolved: #2518 ## Context Switch to use `WIDTH_PACKING` by default in preparation for ExecuTorch alpha release. The demo model is Stories 110M which uses matrix multiplication heavily, and the tensor shapes used in the model matches `WIDTH_PACKING` the most. Will put out a PR later on to expose controlling the default packing via serialization. ghstack-source-id: 219281502 exported-using-ghexport Reviewed By: jorgep31415 Differential Revision: D55074635 fbshipit-source-id: ab9d6d9946cef4cf7a27028178312d50de0ecbbe
1 parent 5f133b3 commit 625257b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

backends/vulkan/runtime/graph/GraphConfig.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ GraphConfig::GraphConfig() {
5555
enableStorageTypeOverride = true;
5656
storageTypeOverride = api::StorageType::TEXTURE_3D;
5757

58-
// For now, force TENSOR_CHANNELS_PACKED memory layout by default as we are
59-
// still developing support for other memory layouts.
58+
// For now, force TENSOR_WIDTH_PACKED memory layout by default as we are still
59+
// developing support for other memory layouts. In the future memory layout
60+
// settings will be serialized as part of the graph.
6061
enableMemoryLayoutOverride = true;
61-
memoryLayoutOverride = api::GPUMemoryLayout::TENSOR_CHANNELS_PACKED;
62+
memoryLayoutOverride = api::GPUMemoryLayout::TENSOR_WIDTH_PACKED;
6263
}
6364

6465
void GraphConfig::setStorageTypeOverride(api::StorageType storage_type) {

0 commit comments

Comments
 (0)