Skip to content

Commit 1d996fa

Browse files
committed
Update base for Update on "[slimtensor] Add from_etensor factory function for ETensor to SlimTensor conversion"
Add from_etensor() factory function that creates a SlimTensor from an ExecuTorch portable tensor (ETensor), copying data to a target device. Key features: - Handles int32_t to int64_t conversion for sizes/strides (ETensor uses int32_t, SlimTensor uses int64_t) - Supports CPU and CUDA target devices via storage()->copy_() - Preserves tensor strides (non-contiguous layouts) - Provides both reference and pointer overloads Differential Revision: [D90539554](https://our.internmc.facebook.com/intern/diff/D90539554/) [ghstack-poisoned]
1 parent 5c96040 commit 1d996fa

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

backends/aoti/slim/core/test/test_slimtensor_copy.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <executorch/backends/aoti/slim/core/slim_tensor.h>
1212
#include <executorch/backends/aoti/slim/core/storage.h>
1313

14-
1514
namespace executorch::backends::aoti::slim {
1615

1716
// Helper function to create a CPU storage with given size

0 commit comments

Comments
 (0)