mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
delete revectorize (#9000)
* delete revectorize * test vectorized LLVM/CLANG * idk about that * was that the segfault?
This commit is contained in:
@@ -51,8 +51,8 @@ class TestQuantizeOnnx(unittest.TestCase):
|
||||
out_file = "/tmp/test_out.onnx"
|
||||
quantize_static(create_gemm_model("/tmp/test_in.onnx"), out_file,
|
||||
FakeDataReader(), quant_format=QuantFormat.QDQ, per_channel=False,
|
||||
activation_type=QuantType.QInt8, weight_type=QuantType.QInt8,
|
||||
extra_options={"ActivationSymmetric": True})
|
||||
activation_type=QuantType.QUInt8, weight_type=QuantType.QInt8,
|
||||
extra_options={"ActivationSymmetric": False})
|
||||
run_onnx_jit, _ = load_onnx_model(out_file)
|
||||
with Context(NOOPT=1):
|
||||
run_onnx_jit(input=Tensor(np.random.uniform(size=(1, N)).astype(np.float32)))
|
||||
@@ -73,6 +73,15 @@ class TestQuantizeOnnx(unittest.TestCase):
|
||||
opts = [Opt(op=OptOps.UPCAST, axis=1, arg=128), Opt(op=OptOps.UNROLL, axis=0, arg=4)]
|
||||
sexec(out, opts)
|
||||
|
||||
def test_prequant_gemm_intacc(self):
|
||||
N = 512
|
||||
# ugh, it's so broken with those casts. need DONT_REALIZE_EXPAND=1 python3 test/test_quantize_onnx.py TestQuantizeOnnx.test_prequant
|
||||
X = Tensor(np.random.uniform(0, 255, size=(N,N)).astype(np.uint8))
|
||||
W = Tensor(np.random.uniform(0, 255, size=(N,N)).astype(np.int8))
|
||||
out = X.matmul(W)
|
||||
opts = [Opt(op=OptOps.UPCAST, axis=1, arg=128), Opt(op=OptOps.UNROLL, axis=0, arg=4)]
|
||||
sexec(out, opts)
|
||||
|
||||
def test_prequant_gemv(self):
|
||||
N = 2048
|
||||
# ugh, it's so broken with those casts. need DONT_REALIZE_EXPAND=1 python3 test/test_quantize_onnx.py TestQuantizeOnnx.test_prequant
|
||||
|
||||
Reference in New Issue
Block a user