Skip to content

[RFC] Support Codegen Using Texture Memory #2250

@antinucleon

Description

@antinucleon

Current TVM is not supporting mixture texture and buffer. This pattern is essential to obtain state-of-art performance on iOS device, and potentially better OpenGL backend for legacy devices.

A potential solution is providing extra device hints, eg:

a = tvm.placeholder((32,), name="a", storage_dev="2d_texture")
b = tvm.placeholder((32,), name="b", storage_dev="buffer")

In lowering process, some extra work is required I think:

  1. We need a pass to infer output storage dev for each node
  2. We need special data access lowing rule for texture, especially different layout of texture (1D/2D texture)
  3. We need modify codegen
  4. We need to modify runtime, to support NDArray laying on texture memory.

Once we support 2D texture, I think we are able to achieve state-of-art performance on iOS, and OpenGL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions