Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update on "[ET-VK] Store unique ptr to Tensor in Value instead of inl…
…ined tensor object, to reduce Value struct size from 448 to 80 bytes."

This diff aims to reduce the size of the Value struct in the Executorch Vulkan runtime by storing a unique pointer to the Tensor object instead of an inlined tensor object. This change reduces the size of the Value struct from 448 bytes to 80 bytes, which can improve performance and reduce memory usage.

Differential Revision: [D66655991](https://our.internmc.facebook.com/intern/diff/D66655991/)

[ghstack-poisoned]
  • Loading branch information
trviv committed Dec 4, 2024
commit 5f370c5a59ec982b4ef10f867b636ab93078fe81
6 changes: 3 additions & 3 deletions backends/vulkan/runtime/graph/containers/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,16 @@ struct Value final {
case TypeTag::SYMINT:
payload.as_symint.~SymInt();
break;
case TypeTag::TENSOR:
payload.as_tensor.reset();
break;
// Manually list out the types so that if a type here is added later and
// not handled the compiler can catch it.
case TypeTag::NONE:
case TypeTag::INT:
case TypeTag::DOUBLE:
case TypeTag::BOOL:
break;
case TypeTag::TENSOR:
payload.as_tensor.reset();
break;
}
}

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.