Add LayerNorm and GroupNorm ops

Delegate to superclass methods whenever possible
This commit is contained in:
blepping
2024-09-01 05:25:32 -06:00
parent 436ecb4913
commit a0cb97eceb
2 changed files with 50 additions and 9 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ def dequantize_tensor(tensor, dtype=None, dequant_dtype=None):
return tensor.to(dtype)
elif qtype in dequantize_functions:
dequant_dtype = dtype if dequant_dtype == "target" else dequant_dtype
return dequantize(tensor, qtype, oshape, dtype=dequant_dtype).to(dtype)
return dequantize(tensor.data, qtype, oshape, dtype=dequant_dtype).to(dtype)
else:
# this is incredibly slow
tqdm.write(f"Falling back to numpy dequant for qtype: {qtype}")