From be865931938067821ab73f7a9fe3cf1dfa2f8934 Mon Sep 17 00:00:00 2001 From: Justin Chu Date: Thu, 25 Jul 2024 10:41:26 -0700 Subject: [PATCH] [torchlib] Improve aten::fill --- onnxscript/function_libs/torch_lib/ops/core.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/onnxscript/function_libs/torch_lib/ops/core.py b/onnxscript/function_libs/torch_lib/ops/core.py index 1fc122966..32dcf770e 100644 --- a/onnxscript/function_libs/torch_lib/ops/core.py +++ b/onnxscript/function_libs/torch_lib/ops/core.py @@ -3622,10 +3622,6 @@ def aten_full( if dtype != -1: fill_value = op.Cast(fill_value, to=dtype) - if isinstance(size, list) and size == []: - # TODO(justinchuby): Handle empty list better than using isinstance - # size can be empty, meaning a scalar - return fill_value size = op.Cast(size, to=INT64.dtype) return op.Expand(fill_value, size)