Skip to content

Commit 07c4d0e

Browse files
authored
Fix imports to use torchao public api
Differential Revision: D65843742 Pull Request resolved: #6797
1 parent ecdc007 commit 07c4d0e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

backends/vulkan/_passes/int4_weight_only_quantizer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pyre-unsafe
12
import logging
23
from typing import Any, Callable, Dict, Optional, Type
34

@@ -35,7 +36,7 @@ def __init__(
3536
super().__init__()
3637
self.padding = not _check_linear_int4_k(in_features, groupsize, inner_k_tiles)
3738
if self.padding:
38-
from torchao.quantization.utils import find_multiple
39+
from torchao.utils import find_multiple
3940

4041
self.origin_in_features = in_features
4142
in_features = find_multiple(in_features, (1024,))
@@ -203,7 +204,7 @@ def _create_quantized_state_dict(
203204
if self.padding_allowed:
204205
import torch.nn.functional as F
205206

206-
from torchao.quantization.utils import find_multiple
207+
from torchao.utils import find_multiple
207208

208209
logging.warn(
209210
f"warning: {fqn} is padded to satisfy in_features % 1024 == 0"

backends/xnnpack/test/ops/linear.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
6+
# pyre-unsafe
67

78
import unittest
89

@@ -30,8 +31,8 @@
3031
from torchao.quantization.quant_api import (
3132
int8_dynamic_activation_int4_weight,
3233
quantize_,
33-
unwrap_tensor_subclass,
3434
)
35+
from torchao.utils import unwrap_tensor_subclass
3536

3637
torchao_installed = True
3738
except:

0 commit comments

Comments
 (0)