File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
backends/cuda/runtime/shims Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -838,24 +838,6 @@ aoti_torch_assign_tensors_out(Tensor* src, Tensor** ret_dst) {
838838 " Memory address %p is not being tracked by reference counting system" ,
839839 data_ptr);
840840
841- // Convert sizes and strides to vectors
842- std::vector<SizesType> sizes = convert_sizes_to_vector (ndim, sizes_ptr);
843- std::vector<StridesType> strides =
844- convert_strides_to_vector (ndim, sizes_ptr, strides_ptr);
845-
846- // Create new tensor that shares the same memory as the original
847- // This is similar to PyTorch's Tensor copy constructor - creates a new
848- // tensor object that shares the same underlying storage
849- std::shared_ptr<Tensor> tensor = make_tensor (
850- sizes, // Same sizes as original
851- data_ptr, // Share the same memory from source tensor
852- {}, // dim_order (empty, will be auto-generated)
853- strides, // Same strides as original
854- dtype_to_scalar_type (dtype) // Same dtype as original
855- );
856-
857- ET_CHECK_OR_RETURN_ERROR (
858- tensor != nullptr , InvalidArgument, " Failed to create new tensor handle" );
859841 int32_t dtype = 0 ;
860842 ET_CHECK_OK_OR_RETURN_ERROR (aoti_torch_get_dtype (src, &dtype));
861843
You can’t perform that action at this time.
0 commit comments