Skip to content

Commit a9ca9e5

Browse files
committed
[dynamo] Verify the default value is passed by kwargs
1 parent f173a06 commit a9ca9e5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

projects/pt1/e2e_testing/xfail_sets.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@
264264
"ElementwiseDivScalarRoundingModeTruncStaticModule_basic",
265265
"ElementwiseDivScalarRoundingModeFloorIntStaticModule_basic",
266266
"ElementwiseDivScalarRoundingModeTruncIntStaticModule_basic",
267+
268+
# ERROR: 'torch.aten.mul.Tensor' op operand #1 must be Any Torch tensor type, but got '!torch.int'
267269
"AdaptiveAvgPool1dStaticLargerOutput_basic",
268270
"AdaptiveAvgPool1dGeneralDynamic_basic",
269271
"AdaptiveAvgPool1dGeneralDynamicNoBatches_basic",
@@ -276,10 +278,6 @@
276278
"TensorFloatModule_basic",
277279
"TensorIntModule_basic",
278280

279-
# ERROR: Exception: Unsupported: missing default value for argument 0 in schema for aten.randn.generator
280-
"RandnGeneratorF64Module_basic",
281-
"RandnGeneratorModule_basic",
282-
283281
# START tests failing due to: complex floating point ops
284282
# END tests failing due to: complex floating point ops
285283

projects/pt1/python/torch_mlir/_dynamo_fx_importer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def _check_meta_val(node):
7878
assert len(node.args) < len(node.target._schema.arguments)
7979
for i, argument in enumerate(
8080
node.target._schema.arguments[len(node.args):]):
81-
if not argument.has_default_value():
81+
if not argument.has_default_value() and argument.name not in node.kwargs:
8282
raise Exception(
8383
f"Unsupported: missing default value for argument {i} in schema for {node.target}"
8484
)

0 commit comments

Comments
 (0)