Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pytorch/ao/torchao/experimental/ops/mps/test #1442

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions torchao/experimental/ops/mps/test/test_quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

from typing import Optional
import copy
import itertools
import os
import sys
import unittest
from typing import Optional

import torch
import unittest

from parameterized import parameterized
from torchao.experimental.quant_api import UIntxWeightOnlyLinearQuantizer
from torchao.experimental.quant_api import _quantize
from torchao.experimental.quant_api import _quantize, UIntxWeightOnlyLinearQuantizer

libname = "libtorchao_ops_mps_aten.dylib"
libpath = os.path.abspath(
Expand Down Expand Up @@ -80,7 +79,7 @@ def test_export(self, nbit):
activations = torch.randn(m, k0, dtype=torch.float32, device="mps")

quantized_model = self._quantize_model(model, torch.float32, nbit, group_size)
exported = torch.export.export(quantized_model, (activations,))
exported = torch.export.export(quantized_model, (activations,), strict=True)

for node in exported.graph.nodes:
if node.op == "call_function":
Expand Down
Loading