Skip to content

Commit ae7a65f

Browse files
committed
more lint
Signed-off-by: Bill Nell <bnell@redhat.com>
1 parent 9429faa commit ae7a65f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tests/kernels/moe/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ def make_quantized_test_activations(
163163
a_scale = torch.stack(a_scale)
164164

165165
if not per_act_token_quant and block_shape is None:
166+
assert a_scale is not None
166167
a_scale = a_scale.view(E, 1, 1)
167168

168169
return a, a_q, a_scale

tests/kernels/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,8 @@ def torch_experts(
11151115
w2_scale[i], block_shape,
11161116
out.dtype)
11171117
else:
1118+
assert (a_scale is not None and w1_scale is not None
1119+
and w2_scale is not None)
11181120
f32 = torch.float32
11191121
scales = a_scale if a_scale.numel() == 1 else a_scale[mask]
11201122
tmp1 = a[mask].to(f32) * scales

0 commit comments

Comments
 (0)