Skip to content

[WEB] WebGPU Codegen#14048

Merged
junrushao merged 1 commit intoapache:mainfrom
tqchen:webgpu
Feb 20, 2023
Merged

[WEB] WebGPU Codegen#14048
junrushao merged 1 commit intoapache:mainfrom
tqchen:webgpu

Conversation

@tqchen
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/target/intrin_rule.cc Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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