[FIX] Inline ceil_log2 in gpu_2d_continuous_cumsum to fix MakePackedAPI error#18957
Conversation
…PI error The intermediate variable ceil_log2 created a LetStmt-bound Var in the TIR function. When MakePackedAPI processed the function, it saw ceil_log2 as an undefined variable not passed as an API argument: Check failed: undefined.size() == 0: In PrimFunc gpu_2d_continuous_cumsum variables [ceil_log2] are used, but are not passed in as API arguments Inline the expression into total_rounds to avoid the intermediate Var. The computation is identical.
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
|
Looks like a duplicate of #18905. |
|
You're right. Sorry, didn't notice that one. Though I do also see the CI weirdness; let me know if I should close this or not. |
|
@akaashrp @gnguralnick you guys can decide which PR to merge. I guess #18905 may need a rebase before it can pass CI. But given this PR already passes CI, an option is that we can add @akaashrp as a co-author when merging this PR. |
|
@MasterJH5574 let's merge this PR (I've also closed mine). If it's not too involved to add me as a co-author, we could do that. Otherwise, I'm fine just merging this directly. |
MasterJH5574
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the fix.
|
@akaashrp No problem. Merged with you as a co-author. Again thanks for the fix. Sorry that it has been stuck for two weeks. |
Summary
ceil_log2ingpu_2d_continuous_cumsumcreated aLetStmt-boundVarin the TIR functionMakePackedAPIprocessed the function, it reportedceil_log2as an undefined variable not passed as an API argumenttotal_roundsto avoid the intermediateVar— the computation is identicalTest plan
Check failed: undefined.size() == 0: In PrimFunc gpu_2d_continuous_cumsum variables [ceil_log2] are used, but are not passed in as API arguments