[Bugfix] Fix support for dimension like integers and ScalarType (#9299)
This commit is contained in:
@@ -80,7 +80,7 @@ def machete_quantize_and_pack(w: torch.Tensor,
|
||||
w_q = w_q.t().contiguous().t() # convert to col major
|
||||
w_q_machete = ops.machete_prepack_B(w_q, wtype)
|
||||
|
||||
opcheck(torch.ops._C.machete_prepack_B, (w_q, wtype))
|
||||
opcheck(torch.ops._C.machete_prepack_B, (w_q, wtype.id))
|
||||
|
||||
return w_ref, w_q_machete, w_s, w_zp
|
||||
|
||||
@@ -153,9 +153,10 @@ def test_machete_all_schedules(shape, atype: torch.dtype,
|
||||
schedule=schedule,
|
||||
)
|
||||
|
||||
opcheck(torch.ops._C.machete_gemm,
|
||||
(a, w_q_machete, wtype, w_s, maybe_convert_zeropoints(
|
||||
w_zp, w_s), group_size, None, None, None, schedule))
|
||||
opcheck(
|
||||
torch.ops._C.machete_gemm,
|
||||
(a, w_q_machete, wtype.id, w_s, maybe_convert_zeropoints(
|
||||
w_zp, w_s), group_size, None, None, None, schedule))
|
||||
|
||||
# Relax atol as our reduction dim becomes larger (more rounding error)
|
||||
# Relax atol when we have zeropoints since the way machete applies
|
||||
|
||||
Reference in New Issue
Block a user