Summary:
Resolve https://github.com/pytorch/pytorch/issues/38207
Below is the description of split function according to [Python doc](https://docs.python.org/3.8/library/stdtypes.html?highlight=split#str.split).
```
If sep is not specified or is None, a different splitting algorithm is applied:
runs of consecutive whitespace are regarded as a single separator,
and the result will contain no empty strings at the start or end
if the string has leading or trailing whitespace.
```
The logic to handle both none and empty separators is added in register_string_ops.cpp as fix.
Signed-off-by: Xiong Wei <xiongw.fnst@cn.fujitsu.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/38772
Differential Revision: D21789612
Pulled By: suo
fbshipit-source-id: 4dfd74eda71e0bfd757378daedc927a4a63ec0e4
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/32847
Add support for join on List of strings in TorchScript.
Test Plan:
(pytorch) smummadi@smummadi-mbp pytorch % python test/test_jit_string.py
Fail to import hypothesis in common_utils, tests are not derandomized
.
Ran 1 test in 1.090s
OK
Differential Revision: D19650809
fbshipit-source-id: 387a8f0e3cc3111fd3dadd3d54c90fc8c7774cf9
Summary: Add support for join on List of strings in TorchScript.
Test Plan:
(pytorch) smummadi@smummadi-mbp pytorch % python test/test_jit_string.py
Fail to import hypothesis in common_utils, tests are not derandomized
.
----------------------------------------------------------------------
Ran 1 test in 1.090s
OK
Differential Revision: D19611800
fbshipit-source-id: cef66356abc14dfd100a806d25dd1a8bc9af0a11