Skip to content

Commit 6e1b071

Browse files
authored
Merge branch 'main' into export-D71520535
2 parents 69d0161 + 88bf6d6 commit 6e1b071

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

backends/cadence/aot/replace_ops.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ def call(self, graph_module: torch.fx.GraphModule) -> PassResult:
976976
return result
977977

978978

979-
@register_cadence_pass(CadencePassAttribute(opt_level=1))
979+
@register_cadence_pass(CadencePassAttribute(opt_level=2))
980980
class ReplaceTrivialConvWithLinear(ExportPass):
981981
"""
982982
In nn.Conv1d, the operand shapes are:
@@ -1256,7 +1256,7 @@ def call_operator(
12561256
return self.transpose_dims(new_op, meta, 0, dim)
12571257

12581258

1259-
@register_cadence_pass(CadencePassAttribute(opt_level=1))
1259+
@register_cadence_pass(CadencePassAttribute(opt_level=2))
12601260
class ReplaceConvWithIm2RowAndLinear(ExportPass):
12611261
"""
12621262
Replace convolution where groups=1 with im2row followed by a linear op.
@@ -1449,7 +1449,7 @@ def call_operator(self, op, args, kwargs, meta):
14491449
)
14501450

14511451

1452-
@register_cadence_pass(CadencePassAttribute(opt_level=1))
1452+
@register_cadence_pass(CadencePassAttribute(opt_level=2))
14531453
class ReplaceTransposedConvWithLinearPass(ExportPass):
14541454
"""
14551455
Replace transposed convolution where groups=1 with transposed_im2row
@@ -1686,7 +1686,7 @@ def call(self, graph_module: torch.fx.GraphModule) -> PassResult:
16861686
return result
16871687

16881688

1689-
@register_cadence_pass(CadencePassAttribute(opt_level=1))
1689+
@register_cadence_pass(CadencePassAttribute(opt_level=2))
16901690
class ReplaceLinearWithFullyConnectedOpPass(ExportPass):
16911691
"""
16921692
If the input of linear/quantized_linear op is a vector, replace it with

backends/cadence/utils/facto_util.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def apply_tensor_contraints(op_name: str, tensor_constraints: list[object]) -> N
4343
cp.Size.Ge(lambda deps, r, d: 1),
4444
cp.Size.Le(lambda deps, r, d: 2**9),
4545
]
46-
case "sigmoid.default" | "rsqrt.default":
46+
case "sigmoid.default":
4747
additional_tensor_constraints.extend(
4848
[
4949
cp.Dtype.In(lambda deps: [torch.float]),
@@ -52,6 +52,17 @@ def apply_tensor_contraints(op_name: str, tensor_constraints: list[object]) -> N
5252
cp.Value.Le(lambda deps, dtype, struct: 2),
5353
]
5454
)
55+
case "rsqrt.default":
56+
additional_tensor_constraints.extend(
57+
[
58+
cp.Dtype.In(lambda deps: [torch.float]),
59+
cp.Rank.Le(lambda deps: 2**2),
60+
cp.Value.Gt(
61+
lambda deps, dtype, struct: 0
62+
), # only generate real numbers
63+
cp.Value.Le(lambda deps, dtype, struct: 2**2),
64+
]
65+
)
5566
case "mean.dim":
5667
additional_tensor_constraints.extend(
5768
[

examples/demo-apps/apple_ios/ExecuTorchDemo/ExecuTorchDemo.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@
806806
isa = XCRemoteSwiftPackageReference;
807807
repositoryURL = "https://github.com/pytorch/executorch";
808808
requirement = {
809-
branch = "swiftpm-0.6.0";
809+
branch = "swiftpm-0.7.0.20250401";
810810
kind = branch;
811811
};
812812
};

examples/demo-apps/apple_ios/LLaMA/LLaMA.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@
852852
isa = XCRemoteSwiftPackageReference;
853853
repositoryURL = "https://github.com/pytorch/executorch";
854854
requirement = {
855-
branch = "swiftpm-0.6.0";
855+
branch = "swiftpm-0.7.0.20250401";
856856
kind = branch;
857857
};
858858
};

examples/demo-apps/react-native/rnllama/ios/rnllama.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@
947947
isa = XCRemoteSwiftPackageReference;
948948
repositoryURL = "https://github.com/pytorch/executorch.git";
949949
requirement = {
950-
branch = "swiftpm-0.6.0";
950+
branch = "swiftpm-0.7.0.20250401";
951951
kind = branch;
952952
};
953953
};

0 commit comments

Comments
 (0)