Skip to content

String Tensor SplitToSequence fix#19942

Merged
baijumeswani merged 1 commit intomicrosoft:mainfrom
Craigacp:split-to-sequence-fix
Mar 20, 2024
Merged

String Tensor SplitToSequence fix#19942
baijumeswani merged 1 commit intomicrosoft:mainfrom
Craigacp:split-to-sequence-fix

Conversation

@Craigacp
Copy link
Contributor

Description

The SplitToSequence refactor added a special case for element_size when it's a string, but this stops the computation of the A offset on line 510 from advancing as the offset is zero. So it copies the same string into each sequence element. This PR removes that check and adds a test for the string split behaviour.

I'm not sure why the special case on line 456 was added in the original PR (#18594), but all the tests pass in the new PR so presumably it isn't necessary.

Motivation and Context

SplitToSequence didn't work on string tensors, fixes #19726.

cc @pranavsharma

@justinchuby justinchuby added the core runtime issues related to core runtime label Mar 19, 2024
@justinchuby
Copy link
Contributor

/azp run Linux CPU CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,Linux OpenVINO CI Pipeline,Linux QNN CI Pipeline,MacOS CI Pipeline,ONNX Runtime Web CI Pipeline,Windows ARM64 QNN CI Pipeline

@justinchuby
Copy link
Contributor

/azp run Windows CPU CI Pipeline,Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline,Windows x64 QNN CI Pipeline,orttraining-linux-ci-pipeline,orttraining-linux-gpu-ci-pipeline,orttraining-ortmodule-distributed,onnxruntime-binary-size-checks-ci-pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 8 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 9 pipeline(s).

@Craigacp
Copy link
Contributor Author

The Windows GPU TensorRT failure says that it couldn't find a CUDA device in tests other than the one I added, and they don't appear at first glance to use SplitToSequence either. Maybe it hit some dodgy hardware?

@justinchuby justinchuby requested a review from yuslepukhin March 19, 2024 23:59
@tianleiwu
Copy link
Contributor

/azp run ONNX Runtime Web CI Pipeline,orttraining-amd-gpu-ci-pipeline,Big Models,Android CI Pipeline,iOS CI Pipeline,ONNX Runtime React Native CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 6 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core runtime issues related to core runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SplitToSequence op with string tensor inputs behaves incorrectly in ONNX Runtime 1.17.1

5 participants