Skip to content

Commit 4248469

Browse files
manuelcandalesfacebook-github-bot
authored andcommitted
SpecDB: Add spec: expm1
Reviewed By: SS-JIA Differential Revision: D52924182 fbshipit-source-id: eb269de49928b7abbdc0ac5706957a26fa8b96c5
1 parent 87eecab commit 4248469

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

specdb/db.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,6 +1282,21 @@
12821282
OutArg(ArgType.Tensor),
12831283
],
12841284
),
1285+
Spec(
1286+
op="expm1.default", # (Tensor self) -> Tensor
1287+
inspec=[
1288+
InPosArg(ArgType.Tensor, name="self"),
1289+
],
1290+
outspec=[
1291+
OutArg(
1292+
ArgType.Tensor,
1293+
constraints=[
1294+
cp.Dtype.In(lambda deps: dt.can_cast_from(torch.float)),
1295+
cp.Dtype.In(lambda deps: dt.can_cast_from(deps[0].dtype)),
1296+
],
1297+
)
1298+
],
1299+
),
12851300
Spec(
12861301
op="fill.Scalar", # (Tensor self, Scalar value) -> Tensor
12871302
inspec=[

0 commit comments

Comments
 (0)