Skip to content

Fix starters for Weight Dequantization Problem#167

Open
zinchse wants to merge 1 commit intoAlphaGPU:mainfrom
zinchse:main
Open

Fix starters for Weight Dequantization Problem#167
zinchse wants to merge 1 commit intoAlphaGPU:mainfrom
zinchse:main

Conversation

@zinchse
Copy link

@zinchse zinchse commented Feb 16, 2026

The starter code for the Weight Dequantization problem has an incorrect function signature that doesn't match the test runner's expectations

# current
def solve(X: torch.Tensor, S: torch.Tensor, Y: torch.Tensor, TILE_SIZE: int):
    pass 

# vs expected
def solve(X: torch.Tensor, S: torch.Tensor, Y: torch.Tensor, M: int, N: int, TILE_SIZE: int):
    pass

To reproduce the issue (e.g. in Pytorch) submit the default starter code to see the error "TypeError: solve() takes 4 positional arguments but 6 were given. Test case failed"

Users must manually fix the function signature before being able to test their solution. While this is a minor fix, it creates confusion and breaks the out-of-box experience.

What I've done: I've updated starter code for Pytorch, Cute, Mojo, and Triton to include the missing M and N parameters. After quickly reviewing the eval code, I believe they share the same call signature. I also verified from the user side and testing confirmed the runner does pass 6 arguments in all cases. However, I have not thoroughly audited the entire codebase - please verify no other dependencies are affected by this change.


P.S. Submitting the unmodified starter explicitly crashes in Pytorch, Cute, and Triton. Mojo doesn't crash with the wrong signature, so I verified it separately by printing the arguments:

@export
fn solve(X: UnsafePointer[Float32], S: UnsafePointer[Float32], Y: UnsafePointer[Float32], M: Int32, N: Int32, TILE_SIZE: Int32) raises:
    print("M=", M, "N=", N, "TILE=", TILE_SIZE)

fix inconsistent starters for Weight Dequantization Problem
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.

1 participant