question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC] Support Codegen Using Texture Memory

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
masahicommented, Jan 10, 2022

Thanks @tmoreau89, I’ve opened a fresh tracking https://github.com/apache/tvm/issues/9891

0reactions
tmoreau89commented, Jan 10, 2022

Good idea, thank you @masahi !

Read more comments on GitHub >

github_iconTop Results From Across the Web

[RFC] Support Codegen Using Texture Memory #2250 - GitHub
We need special data access lowing rule for texture, especially different layout of texture (1D/2D texture); We need modify codegen; We need to...
Read more >
[RFC] Texture memory support - Apache TVM Discuss
This RFC proposes a path to support 2d texture memory in TVM as 1) a schedulable global memory and 2) a first class...
Read more >
dev - The Mail Archive
Re: [apache/tvm] [RFC] Support Codegen Using Texture Memory (#2250) Masahiro Masuda. Re: [apache/tvm] [RFC] Support Codegen Using Texture Memory (#2250) ...
Read more >
[cfe-dev] [llvm-dev] [RFC][HIPSPV] Emitting HIP ... - Mailing Lists
Hi Henry, > Since the SPIR-V BE might not land in LLVM soon, we will set up the compilation flow > to produce...
Read more >
Re: [llvm-dev] [RFC] BasicAA considers address spaces?
constrained to use it in some cases because we can't alloca in a ... Therefore, texture reads can be freely reordered (they have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found