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

[Metax] fix accuracy error of scatter in metax #459

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/flag_gems/ops/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def generate_imports(code: IndentedBuffer) -> IndentedBuffer:
code.newline()
code.writeline("from flag_gems.utils import libentry")
code.writeline("from flag_gems import runtime")
code.writeline("import flag_gems")
# code.writeline("from flag_gems.utils import triton_lang_extension as tle")
code.newline()
code.newline()
Expand All @@ -35,6 +36,9 @@ def generate_scatter_kernel(

code.writeline("def heur_block(args):")
with code.indent():
code.writeline("if(flag_gems.vendor_name=='metax'):")
with code.indent():
code.writeline("return 256")
code.writeline("return 128")
code.newline()
code.newline()
Expand Down
3 changes: 1 addition & 2 deletions src/flag_gems/runtime/backend/_metax/tune_configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ attention:
- 8
stages:
- 1
- 2
- 3

bmm:
- META:
TILE_M: 32
Expand Down
Loading