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

[WEB] WebGPU Codegen #14048

Merged
merged 1 commit into from
Feb 20, 2023
Merged

[WEB] WebGPU Codegen #14048

merged 1 commit into from
Feb 20, 2023

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Feb 20, 2023

This PR provide an implementation of WebGPU codegen. Previously we relied on SPIRV codegen for WebGPU, which is deprecated in favor of the WGSL shading language. Pass limited testing on elementwise via chrome.
Likely we will do future iterations.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Feb 20, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

  • No users to tag found in teams: web See #10317 for details

Generated by tvm-bot

int bits = arg.dtype().bits();
PrimExpr res;
if (arg.dtype().is_float() && (bits == 16 || bits == 32)) {
res = topi::fast_erf_float_expr(arg, bits);
Copy link
Member

Choose a reason for hiding this comment

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

i know it's from some legacy impl of metal, but can we structure the folder slightly better to avoid depending on topi? i.e. moving this method to tir instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the comment, reorganized to remove topi dep

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.

Otherwise LGTM

This PR provide an implementation of WebGPU codegen.
Previously we relied on SPIRV codegen for WebGPU, which
is deprecated in favor of the WGSL shading language.
Pass limited testing on elementwise via chrome.
Likely we will do future iterations.

Also cleans up some legacy code organization in intrinsics.
@junrushao junrushao merged commit c429a3b into apache:main Feb 20, 2023
@tqchen tqchen deleted the webgpu branch February 26, 2023 13:56
yongwww pushed a commit to yongwww/tvm that referenced this pull request Feb 27, 2023
This PR provide an implementation of WebGPU codegen.
Previously we relied on SPIRV codegen for WebGPU, which
is deprecated in favor of the WGSL shading language.
Pass limited testing on elementwise via chrome.
Likely we will do future iterations.

Also cleans up some legacy code organization in intrinsics.
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.

3 participants