Skip to content

Commit b4277d6

Browse files
committed
PR fixes
1 parent 800b21f commit b4277d6

File tree

6 files changed

+7
-11
lines changed

6 files changed

+7
-11
lines changed
-256 Bytes
Binary file not shown.

exir/verification/verifier.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
ALLOWED_META_KEYS = {"spec", "stack_trace"}
3939

4040
class AmbiguousDimOrderError(RuntimeError):
41-
'''
41+
"""
4242
Returns an Ambiguous Dimension Order Error when any node's output tensor dim_order
4343
is ambiguous for a list of formats.
44-
'''
44+
"""
4545
def __init__(self, message: str) -> None:
4646
super().__init__(message)
4747

@@ -59,9 +59,7 @@ def call_operator(self, op, args, kwargs, meta):
5959
meta,
6060
)
6161

62-
# This is an example of how one can detect ambiguous dim_order anywhere in the graph.
63-
# You can be surgical and only detect it in the nodes you are interested in or something else.
64-
def detect_ambiguity(gm):
62+
def detect_ambiguity(gm, checks =[torch.contiguous_format, torch.channels_last]):
6563
"""
6664
Check every node's output tensor dim_order and raise if it is ambiguous for a list of formats.
6765
"""
@@ -82,10 +80,7 @@ def get_tensors(node: torch.fx.Node) -> List[torch.Tensor]:
8280
# The right course of follow up action is to ask user to try with a different example input.
8381
try:
8482
_ = tensor.dim_order(
85-
ambiguity_check=[
86-
torch.contiguous_format,
87-
torch.channels_last,
88-
]
83+
ambiguity_check=checks
8984
)
9085
except Exception:
9186
raise AmbiguousDimOrderError("Tensors should not have ambigous dim order, try with a different example input")

extension/llm/tokenizers

preprocess.pt2

313 KB
Binary file not shown.

src/pytorch-sphinx-theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 4125c834e1aa0945fde6ef58ff2f77f7abedc460

third-party/ao

Submodule ao updated 103 files

0 commit comments

Comments
 (0)