-
Notifications
You must be signed in to change notification settings - Fork 293
[Language] Expose T.warpgroup_fence_operand for nvcc code motion
#986
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
base: main
Are you sure you want to change the base?
Changes from 6 commits
add8cca
8783cd9
3a51846
b7fa37a
bac37ae
4a96032
a60701b
c8eec62
9fd79eb
73fa0af
3e90be7
b9250b8
be525bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1529,5 +1529,20 @@ std::string PrintWaitBarrierAsm(const std::string &barrier) { | |
| return predicated_asm_code; | ||
| } | ||
|
|
||
| std::string GetMMARegisterType(const ptx::DataType &dtype) { | ||
| switch (dtype) { | ||
| case ptx::DataType::kInt32: | ||
| return "unsigned"; | ||
| case ptx::DataType::kUInt32: | ||
| return "unsigned"; | ||
| case ptx::DataType::kFloat32: | ||
| return "float"; | ||
| case ptx::DataType::kFloat64: | ||
| return "double"; | ||
| default: | ||
| return "unsigned"; | ||
| } | ||
| } | ||
|
Comment on lines
+1532
to
+1545
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major 🧩 Analysis chainVerify limited type coverage and consider error handling. The function handles only 4 data types (kInt32, kUInt32, kFloat32, kFloat64) but MMA/WGMMA operations support many more: kFloat16, kBFloat16, kInt8, kUInt8, kInt4, kUInt4, kFloat8_e4m3, kFloat8_e5m2, etc. (see valid_mma_configs/valid_wgmma_configs above). Concerns:
Recommendations:
Run the following script to verify if GetMMARegisterType is called with types beyond the four it handles: 🏁 Script executed: #!/bin/bash
# Search for calls to GetMMARegisterType and analyze argument types
rg -n -C5 'GetMMARegisterType\(' --type=cppLength of output: 2440 🏁 Script executed: #!/bin/bash
rg -nP "enum\s+DataType" -C5 --type=cppLength of output: 0 🏁 Script executed: #!/bin/bash
# Search for DataType enum definition in src/target
rg -nP "enum\s+(class\s+)?DataType" -C5 src/target
rg -n "DataType" -C2 src/target/ptx.hLength of output: 1150 Improve type coverage and enforce unsupported types in GetMMARegisterType.
🤖 Prompt for AI Agents |
||
|
|
||
| } // namespace codegen | ||
| } // namespace tvm::tl | ||
Uh oh!
There was an error while loading. Please reload this page.