Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion kernels/optimized/cpu/fft_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ inline pocketfft::shape_t shape_from_tensor(const Tensor& t) {
template <typename T>
inline std::complex<T>* tensor_cdata(Tensor& t) {
return reinterpret_cast<std::complex<T>*>(
t.data_ptr<executorch::runtime::etensor::complex<T>>());
t.mutable_data_ptr<executorch::runtime::etensor::complex<T>>());
}

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion kernels/optimized/cpu/op_where.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Tensor& opt_where_out(
const CTYPE_COMPUTE* const data_a = a.const_data_ptr<CTYPE_COMPUTE>();
const CTYPE_COMPUTE* const data_b = b.const_data_ptr<CTYPE_COMPUTE>();
const bool* const data_cond = cond.const_data_ptr<bool>();
CTYPE_COMPUTE* const data_out = out.data_ptr<CTYPE_COMPUTE>();
CTYPE_COMPUTE* const data_out = out.mutable_data_ptr<CTYPE_COMPUTE>();
executorch::extension::parallel_for(
0,
out_numel,
Expand Down
2 changes: 1 addition & 1 deletion kernels/portable/cpu/op_native_dropout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ std::tuple<Tensor&, Tensor&> native_dropout_out(
out);
});
} else if (input.numel() > 0) {
std::memcpy(out.mutable_data_ptr(), input.data_ptr(), input.nbytes());
std::memcpy(out.mutable_data_ptr(), input.const_data_ptr(), input.nbytes());
std::memset(mask.mutable_data_ptr(), true, mask.nbytes());
}
return ret;
Expand Down
Loading