SIGN IN SIGN UP

Use const_data_ptr/mutable_data_ptr instead of deprecated data_ptr (#20958)

ExecuTorch `Tensor::data_ptr` is `ET_DEPRECATED`. Replace remaining call
sites: read-only accesses use `const_data_ptr`, the rest use
`mutable_data_ptr` (sampler input, CMSIS-NN struct fields, JNI/mmap'd
buffers that require non-const pointers).

Left unchanged: `backends/aoti/slim` (SlimTensor has no const/mutable
variants) and `at::Tensor::data_ptr()` in `extension/pybindings` (not
deprecated; `for_blob` takes `void*`).

Authored with Claude Code.
Y
Yuanyuan Chen committed
82a63fd130300f2556d45c861b631280c2085e4c
Parent: 1a770b8
Committed by GitHub <noreply@github.com> on 7/27/2026, 4:33:36 PM