Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIR] Require exactly same-dtype matching for Vulkan smem reuse #16515

Merged

Conversation

MasterJH5574
Copy link
Contributor

This PR fixes the StorageRewrite pass which failed to avoid shared memory reuse of different dtypes for Vulkan.

Since the Vulkan target information is required at the time of lowering, the pass BindTarget needs to apply before lowering, so that the functions have correct target information. Note that previously the pass checks Target::Current, while tvm.build does not set the current target.

One regression test is added.

This PR fixes the StorageRewrite pass which failed to avoid
shared memory reuse of different dtypes for Vulkan.

Since the Vulkan target information is required at the time
of lowering, the pass `BindTarget` needs to apply before
lowering, so that the functions have correct target information.
Note that previously the pass checks `Target::Current`, while
`tvm.build` does not set the current target.

One regression test is added.
@tqchen tqchen merged commit cdc2303 into apache:main Feb 3, 2024
19 checks passed
rickzx added a commit to mlc-ai/relax that referenced this pull request Feb 7, 2024
Related to: apache/tvm#16515

WebGPU has the problem of shared memory reuse with different dtype as
well.
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