Skip to content

Conversation

@ZihengJiang
Copy link
Contributor

@ZihengJiang ZihengJiang commented Feb 22, 2021

In current TVM system, we categorize the machine's memory into serval types: global, shared, etc. Based on this, we implicitly allocate and use those memory with the scheduling primitives cache_read / cache_write . However, caching still requires explicit movement during launch of every kernel, it can be beneficial to allocate these special memory explicitly during runtime so they can be reused across operators. Apart from this, TVM assumes that all the memory objects can be manipulated with a plain pointer (void*). The main limitations of the current runtime are:

  • L0: Only support one kind of memory scope(global on-chip DRAM).
  • L1: Assumes memory as flat 1D access, cannot support special multi-dimensional layout memory(e.g. OpenCL's texture memory).

This PR bings changes in the TVM runtime to support special memory. See RFC here: https://discuss.tvm.apache.org/t/runtime-support-for-special-memory-scope/9187

@tqchen tqchen self-assigned this Feb 22, 2021
@tqchen
Copy link
Member

tqchen commented Feb 25, 2021

cc @junrushao1994 @csullivan would be great if you can help review as well

[RUNTIME] AllocDataSpace API.

[RUNTIME] Update RPC CopyToRemote.

[RUNTIME] Update RPC APIs.

[RUNTIME] Reuse RPCReference.

[RUNTIME] Update doc.

[RUNTIME] Update RPC APIs.

[RUNTIME] Clang format.

[RUNTIME] TvmJS Support.

[RUNTIME] Address comment.

[RUNTIME] Update CRT.

[RUNTIME] Fix.
@tqchen
Copy link
Member

tqchen commented Feb 26, 2021

Copy link
Contributor

@csullivan csullivan left a comment

Choose a reason for hiding this comment

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

LGTM :shipit: , thanks @ZihengJiang @tqchen!

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

It looks good to me! I didn't have any extra comments other than nitpicks. Thanks Ziheng for the contribution!

@tqchen tqchen merged commit 2673309 into apache:main Feb 28, 2021
@tqchen
Copy link
Member

tqchen commented Feb 28, 2021

Thanks @ZihengJiang @junrushao1994 @csullivan !

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants