Skip to content

Conversation

@csullivan
Copy link
Contributor

The new Hexagon DeviceAPI is intended for cross compilation directly to Hexagon. This is distinct from the current device api which is compiled and run on the android arm CPU. This includes:

  • Custom TVM logging utilities to correctly log errors to mini-dm
  • DeviceAPI implementations AllocDataSpace and CopyDataFromTo which support for storage scopes
  • HexagonBuffer wrapper which manages the underlying allocation(s) and tracks the storage scope
  • Custom linked param lookup that wraps parameters in an unmanaged HexagonBuffer.
  • Custom hexagon shared library lookup that supports wrapping library function symbols with a custom calling convention that unpacks HexagonBuffers prior to invocation.

Alternatives: Internally cache HexagonBuffer structure in DeviceAPI and return raw allocation pointer.

Depends on #9354, #9342.

* under the License.
*/

#ifndef TVM_RUNTIME_HEXAGON_HEXAGON_HEXAGON_DEVICE_API_V2_H_
Copy link
Member

Choose a reason for hiding this comment

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

Is the reason to name this v2 because we are keeping v1 around?

@jroesch
Copy link
Member

jroesch commented Oct 26, 2021

cc @mbs-octoml

@jroesch jroesch merged commit 4152e33 into apache:main Oct 26, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* Compile hexagon device api from runtime/hexagon/hexagon when
building for hexagon and USE_HEXAGON_DEVICE is not set.

* Add hexagon_common.h utilities including custom
tvm runtime logging for hexagon.

* Introduce HexagonBuffer class to store hexagon allocation metadata.

* Add HexagonDeviceAPIv2 for use on hexagon.

* Add hexagon packed function wrapper.

* Add custom linked param lookup for hexagon
that wraps params in an unmanaged HexagonBuffer.

* Add custom hexagon module based of library module node.

* Apply clang formatting

* Apply cpplint changes.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* Compile hexagon device api from runtime/hexagon/hexagon when
building for hexagon and USE_HEXAGON_DEVICE is not set.

* Add hexagon_common.h utilities including custom
tvm runtime logging for hexagon.

* Introduce HexagonBuffer class to store hexagon allocation metadata.

* Add HexagonDeviceAPIv2 for use on hexagon.

* Add hexagon packed function wrapper.

* Add custom linked param lookup for hexagon
that wraps params in an unmanaged HexagonBuffer.

* Add custom hexagon module based of library module node.

* Apply clang formatting

* Apply cpplint changes.
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