Skip to content

[ETHOSN] Fix output tensor ordering#12317

Merged
lhutton1 merged 1 commit intoapache:mainfrom
lhutton1:fix-output-tensor-ordering
Aug 8, 2022
Merged

[ETHOSN] Fix output tensor ordering#12317
lhutton1 merged 1 commit intoapache:mainfrom
lhutton1:fix-output-tensor-ordering

Conversation

@lhutton1
Copy link
Contributor

@lhutton1 lhutton1 commented Aug 5, 2022

During compilation of an NPU subgraph, the input and output tensor ordering is determined by creating a mapping of Support Library buffers to TVM buffers. The runtime had been using this mapping incorrectly by instead interpreting it as a mapping of TVM buffers to support library buffers. This can result in undefined behavior. The runtime now interprets the mapping as Support Library buffers to TVM buffers.

A test has been added to check the correct ordering of outputs is provided correctly in the runtime.

cc @leandron @manupa-arm @Leo-arm

During compilation of an NPU subgraph, the input and output tensor
ordering is determined by creating a mapping of Support Library
buffers to TVM buffers. The runtime had been using this mapping
incorrectly by instead interpreting it as a mapping of TVM buffers to
support library buffers. This can result in undefined behaviour. The
runtime now interprets the mapping as Support Library buffers to TVM
buffers.

A test has been added to check the correct ordering of outputs is
provided correctly in the runtime.

Change-Id: Ifaaf18478958607224f69f4459809112c25cee4c
Copy link
Contributor

@leandron leandron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @lhutton1!

@lhutton1
Copy link
Contributor Author

lhutton1 commented Aug 8, 2022

@tvm-bot merge

@lhutton1 lhutton1 merged commit 6ebb0fd into apache:main Aug 8, 2022
@lhutton1
Copy link
Contributor Author

lhutton1 commented Aug 8, 2022

Thanks @leandron!

@lhutton1 lhutton1 deleted the fix-output-tensor-ordering branch August 8, 2022 16:09
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
During compilation of an NPU subgraph, the input and output tensor
ordering is determined by creating a mapping of Support Library
buffers to TVM buffers. The runtime had been using this mapping
incorrectly by instead interpreting it as a mapping of TVM buffers to
support library buffers. This can result in undefined behaviour. The
runtime now interprets the mapping as Support Library buffers to TVM
buffers.

A test has been added to check the correct ordering of outputs is
provided correctly in the runtime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants