pytorch / executorch

On-device AI across mobile, embedded and edge for PyTorch
https://pytorch.org/executorch/
Other
1.41k stars 230 forks source link

string input support? #3992

Open soulx0 opened 1 week ago

soulx0 commented 1 week ago

similar to : https://github.com/tensorflow/tensorflow/issues/21213

and how tflite does: https://github.com/tensorflow/tensorflow/issues/21213

could executorch do better on string inputs?

guangy10 commented 1 week ago

To make it supported in ExecuTorch I think it needs to be supported in the upstream PyTorch first. I'm not sure if we have a plan to support this feature request. @iseeyuan may know.

cbilgin commented 2 days ago

@dbort since Martin is out, any ideas on this one?

dbort commented 20 hours ago

Asking about this internally. Like Martin said, EValue doesn't support String, so I don't expect we'd have first-class support.

The alternative is to provide some kind of wrapper to turn the string into a Tensor, but that will result in either a fully-dynamic-shaped input or an upper-bounded and padded input.

dbort commented 20 hours ago

@soulx0 do you have a specific use case for this? There are a bunch of trade-offs, so it would help us understand the possible solutions.

JacobSzwejbka commented 2 hours ago

String processing is not supported by export nor do I think its planned cc @angelayi