Skip to content

Commit 123fd8c

Browse files
committed
fix import
1 parent 4fe4c3b commit 123fd8c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

torchao/prototype/inductor/qsdpa_lowering.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
import sympy
44
import torch
55
from torch._inductor.ir import ChoiceCaller, FixedLayout, TensorBox, get_fill_order
6-
from torch._inductor.kernel.flex.common import construct_strides, maybe_realize
6+
7+
try:
8+
# use the directory after refactor
9+
from torch._inductor.kernel.flex.common import construct_strides, maybe_realize
10+
except ImportError:
11+
# use the old path for compatibility
12+
from torch._inductor.kernel.flex_attention import construct_strides, maybe_realize
713
from torch._inductor.lowering import register_lowering
814
from torch._inductor.select_algorithm import (
915
ExternKernelChoice,

0 commit comments

Comments
 (0)