How to run add operator in executorch ?
Open
@JacobSzwejbka is already working on this.
Since Dec 1, 2025.
module: runtime
- Dominant language
- Python
- Stars
- 5k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 581
Description
The result of the following code is "Segmentation fault: 11" ...
using executorch::aten::ScalarType;
using executorch::aten::Tensor;
using executorch::aten::TensorImpl;
int main() {
executorch::runtime::runtime_init();
// Create our input tensor.
float data[14465 * 3] = { 1 };
TensorImpl::SizesType sizes[] = { 14465, 3 };
TensorImpl impl(
ScalarType::Float, // dtype
2, // number of dimensions
sizes,
data);
Tensor input_tensor(&impl);
Tensor output_tensor(&impl);
torch::executor::KernelRuntimeContext context_;
torch::executor::native::add_out(context_, input_tensor, input_tensor, 1.0, output_tensor);
return 0;
}
cc @larryliu0820 @JacobSzwejbka @lucylq
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.