diff --git a/source/python.js b/source/python.js index b006145e1d..9876d51d02 100644 --- a/source/python.js +++ b/source/python.js @@ -6163,7 +6163,7 @@ python.Execution = class { }); this.registerType('torch.ClassType', class extends torch.Type { constructor(qualified_name, cu, is_module) { - super(); + super('ClassType'); this._qualified_name = qualified_name; this._is_module = is_module; this._attributes = new Map(); @@ -6247,6 +6247,9 @@ python.Execution = class { elements() { return this._elements; } + __str__() { + return `Tuple[${this.elements().map((elem) => elem.toString()).join(', ')}]`; + } }); this.registerType('torch.TensorType', class extends torch.Type { constructor() { @@ -6328,6 +6331,9 @@ python.Execution = class { getValueType() { return this._value; } + __str__() { + return `Dict(${this.getKeyType().toString()}, ${this.getValueType().toString()})`; + } }); this.registerType('torch.DeviceObjType', class extends torch.Type { constructor() { diff --git a/source/pytorch-metadata.json b/source/pytorch-metadata.json index 3dc2bd3216..da175e859b 100755 --- a/source/pytorch-metadata.json +++ b/source/pytorch-metadata.json @@ -222,6 +222,15 @@ { "type": "complex" } ] }, + { + "name": "aten::ComplexImplicit", + "inputs": [ + { "name": "a", "type": "Tensor" } + ], + "outputs": [ + { "type": "complex" } + ] + }, { "name": "aten::Float.Scalar", "inputs": [ @@ -267,6 +276,15 @@ { "type": "float32" } ] }, + { + "name": "aten::FloatImplicit", + "inputs": [ + { "name": "a", "type": "Tensor" } + ], + "outputs": [ + { "type": "float32" } + ] + }, { "name": "aten::Int.Scalar", "inputs": [ @@ -312,6 +330,24 @@ { "type": "int64" } ] }, + { + "name": "aten::IntImplicit", + "inputs": [ + { "name": "a", "type": "Tensor" } + ], + "outputs": [ + { "type": "int64" } + ] + }, + { + "name": "aten::ScalarImplicit", + "inputs": [ + { "name": "a", "type": "Tensor" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, { "name": "aten::__and__.Scalar", "inputs": [ @@ -332,6 +368,106 @@ { "type": "Tensor" } ] }, + { + "name": "aten::__and__.bool", + "inputs": [ + { "name": "a", "type": "boolean" }, + { "name": "b", "type": "boolean" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::__and__.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "int64" } + ] + }, + { + "name": "aten::__getitem__.Dict_Tensor", + "inputs": [ + { "name": "self", "type": "Dict(Tensor, t)" }, + { "name": "key", "type": "Tensor" } + ], + "outputs": [ + { "type": "t" } + ] + }, + { + "name": "aten::__getitem__.Dict_bool", + "inputs": [ + { "name": "self", "type": "Dict(boolean, t)" }, + { "name": "key", "type": "boolean" } + ], + "outputs": [ + { "type": "t" } + ] + }, + { + "name": "aten::__getitem__.Dict_complex", + "inputs": [ + { "name": "self", "type": "Dict(complex, t)" }, + { "name": "key", "type": "complex" } + ], + "outputs": [ + { "type": "t" } + ] + }, + { + "name": "aten::__getitem__.Dict_float", + "inputs": [ + { "name": "self", "type": "Dict(float32, t)" }, + { "name": "key", "type": "float32" } + ], + "outputs": [ + { "type": "t" } + ] + }, + { + "name": "aten::__getitem__.Dict_int", + "inputs": [ + { "name": "self", "type": "Dict(int64, t)" }, + { "name": "key", "type": "int64" } + ], + "outputs": [ + { "type": "t" } + ] + }, + { + "name": "aten::__getitem__.Dict_str", + "inputs": [ + { "name": "self", "type": "Dict(string, t)" }, + { "name": "key", "type": "string" } + ], + "outputs": [ + { "type": "t" } + ] + }, + { + "name": "aten::__getitem__.str", + "inputs": [ + { "name": "s", "type": "string" }, + { "name": "index", "type": "int64" } + ], + "outputs": [ + { "type": "string" } + ] + }, + { + "name": "aten::__getitem__.t", + "inputs": [ + { "name": "list", "type": "t[]" }, + { "name": "idx", "type": "int64" } + ], + "outputs": [ + { "type": "t" } + ] + }, { "name": "aten::__iand__.Scalar", "inputs": [ @@ -376,11 +512,11 @@ "name": "aten::__interpolate", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64", "optional": true, "default": null }, - { "name": "scale_factor", "type": "float32", "optional": true, "default": null }, + { "name": "size", "type": "int64?", "default": null }, + { "name": "scale_factor", "type": "float32?", "default": null }, { "name": "mode", "type": "string", "default": "nearest" }, - { "name": "align_corners", "type": "boolean", "optional": true, "default": null }, - { "name": "recompute_scale_factor", "type": "boolean", "optional": true, "default": null }, + { "name": "align_corners", "type": "boolean?", "default": null }, + { "name": "recompute_scale_factor", "type": "boolean?", "default": null }, { "name": "antialias", "type": "boolean", "default": false } ], "outputs": [ @@ -391,11 +527,11 @@ "name": "aten::__interpolate.scale_list", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64", "optional": true, "default": null }, - { "name": "scale_factor", "type": "float32[]", "optional": true, "default": null }, + { "name": "size", "type": "int64?", "default": null }, + { "name": "scale_factor", "type": "float32[]?", "default": null }, { "name": "mode", "type": "string", "default": "nearest" }, - { "name": "align_corners", "type": "boolean", "optional": true, "default": null }, - { "name": "recompute_scale_factor", "type": "boolean", "optional": true, "default": null }, + { "name": "align_corners", "type": "boolean?", "default": null }, + { "name": "recompute_scale_factor", "type": "boolean?", "default": null }, { "name": "antialias", "type": "boolean", "default": false } ], "outputs": [ @@ -406,11 +542,11 @@ "name": "aten::__interpolate.size_list", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64[]", "optional": true, "default": null }, - { "name": "scale_factor", "type": "float32", "optional": true, "default": null }, + { "name": "size", "type": "int64[]?", "default": null }, + { "name": "scale_factor", "type": "float32?", "default": null }, { "name": "mode", "type": "string", "default": "nearest" }, - { "name": "align_corners", "type": "boolean", "optional": true, "default": null }, - { "name": "recompute_scale_factor", "type": "boolean", "optional": true, "default": null }, + { "name": "align_corners", "type": "boolean?", "default": null }, + { "name": "recompute_scale_factor", "type": "boolean?", "default": null }, { "name": "antialias", "type": "boolean", "default": false } ], "outputs": [ @@ -421,11 +557,11 @@ "name": "aten::__interpolate.size_list_scale_list", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64[]", "optional": true, "default": null }, - { "name": "scale_factor", "type": "float32[]", "optional": true, "default": null }, + { "name": "size", "type": "int64[]?", "default": null }, + { "name": "scale_factor", "type": "float32[]?", "default": null }, { "name": "mode", "type": "string", "default": "nearest" }, - { "name": "align_corners", "type": "boolean", "optional": true, "default": null }, - { "name": "recompute_scale_factor", "type": "boolean", "optional": true, "default": null }, + { "name": "align_corners", "type": "boolean?", "default": null }, + { "name": "recompute_scale_factor", "type": "boolean?", "default": null }, { "name": "antialias", "type": "boolean", "default": false } ], "outputs": [ @@ -502,6 +638,15 @@ { "type": "Tensor" } ] }, + { + "name": "aten::__not__", + "inputs": [ + { "name": "self", "type": "boolean" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::__or__.Scalar", "inputs": [ @@ -547,10 +692,10 @@ "category": "Layer", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64", "optional": true, "default": null }, - { "name": "scale_factor", "type": "int64", "optional": true, "default": null }, + { "name": "size", "type": "int64?", "default": null }, + { "name": "scale_factor", "type": "int64?", "default": null }, { "name": "mode", "type": "string", "default": "nearest" }, - { "name": "align_corners", "type": "boolean", "optional": true, "default": null } + { "name": "align_corners", "type": "boolean?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -561,10 +706,10 @@ "category": "Layer", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64[]", "optional": true, "default": null }, - { "name": "scale_factor", "type": "int64", "optional": true, "default": null }, + { "name": "size", "type": "int64[]?", "default": null }, + { "name": "scale_factor", "type": "int64?", "default": null }, { "name": "mode", "type": "string", "default": "nearest" }, - { "name": "align_corners", "type": "boolean", "optional": true, "default": null } + { "name": "align_corners", "type": "boolean?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -574,8 +719,8 @@ "name": "aten::__upsample_bilinear", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64", "optional": true, "default": null }, - { "name": "scale_factor", "type": "int64", "optional": true, "default": null } + { "name": "size", "type": "int64?", "default": null }, + { "name": "scale_factor", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -585,8 +730,8 @@ "name": "aten::__upsample_bilinear.scale_list", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64", "optional": true, "default": null }, - { "name": "scale_factor", "type": "int64[]", "optional": true, "default": null } + { "name": "size", "type": "int64?", "default": null }, + { "name": "scale_factor", "type": "int64[]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -596,8 +741,8 @@ "name": "aten::__upsample_bilinear.size_list", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64[]", "optional": true, "default": null }, - { "name": "scale_factor", "type": "int64", "optional": true, "default": null } + { "name": "size", "type": "int64[]?", "default": null }, + { "name": "scale_factor", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -607,8 +752,8 @@ "name": "aten::__upsample_bilinear.size_list_scale_list", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "size", "type": "int64[]", "optional": true, "default": null }, - { "name": "scale_factor", "type": "int64[]", "optional": true, "default": null } + { "name": "size", "type": "int64[]?", "default": null }, + { "name": "scale_factor", "type": "int64[]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -820,7 +965,7 @@ { "name": "x1", "type": "Tensor" }, { "name": "x2", "type": "Tensor" }, { "name": "p", "type": "float32" }, - { "name": "compute_mode", "type": "int64", "optional": true } + { "name": "compute_mode", "type": "int64?" } ], "outputs": [ { "type": "Tensor" } @@ -850,7 +995,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "SymInt[]", "default": 1 }, { "name": "padding", "type": "SymInt[]", "default": 0 }, { "name": "dilation", "type": "SymInt[]", "default": 1 }, @@ -872,7 +1017,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "SymInt[]", "default": 1 }, { "name": "padding", "type": "SymInt[]", "default": 0 }, { "name": "dilation", "type": "SymInt[]", "default": 1 }, @@ -892,7 +1037,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "SymInt[]" }, { "name": "padding", "type": "string" }, { "name": "dilation", "type": "SymInt[]" }, @@ -1008,8 +1153,8 @@ "category": "Normalization", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "running_mean", "type": "Tensor" }, { "name": "running_var", "type": "Tensor" }, { "name": "momentum", "type": "float32" }, @@ -1021,6 +1166,40 @@ { "name": "save_rstd", "type": "Tensor" } ] }, + { + "name": "aten::_native_multi_head_attention", + "category": "Attention", + "inputs": [ + { "name": "query", "type": "Tensor" }, + { "name": "key", "type": "Tensor" }, + { "name": "value", "type": "Tensor" }, + { "name": "embed_dim", "type": "int64" }, + { "name": "num_head", "type": "int64" }, + { "name": "qkv_weight", "type": "Tensor" }, + { "name": "qkv_bias", "type": "Tensor" }, + { "name": "proj_weight", "type": "Tensor" }, + { "name": "proj_bias", "type": "Tensor" }, + { "name": "mask", "type": "Tensor?", "default": null }, + { "name": "need_weights", "type": "boolean", "default": true }, + { "name": "average_attn_weights", "type": "boolean", "default": true }, + { "name": "mask_type", "type": "int64?", "default": null } + ], + "outputs": [ + { "type": "Tensor" }, + { "type": "Tensor" } + ] + }, + { + "name": "aten::_nested_tensor_from_mask", + "inputs": [ + { "name": "t", "type": "Tensor" }, + { "name": "mask", "type": "Tensor" }, + { "name": "mask_check", "type": "boolean", "default": true } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, { "name": "aten::_pack_padded_sequence", "inputs": [ @@ -1053,11 +1232,11 @@ { "name": "query", "type": "Tensor" }, { "name": "key", "type": "Tensor" }, { "name": "value", "type": "Tensor" }, - { "name": "attn_bias", "type": "Tensor", "optional": true }, + { "name": "attn_bias", "type": "Tensor?" }, { "name": "compute_log_sumexp", "type": "boolean" }, { "name": "dropout_p", "type": "float32", "default": 0.0 }, { "name": "is_causal", "type": "boolean", "default": false }, - { "name": "scale", "type": "float32", "optional": true, "default": null, "kwarg_only": true } + { "name": "scale", "type": "float32?", "default": null, "kwarg_only": true } ], "outputs": [ { "name": "output", "type": "Tensor" }, @@ -1074,8 +1253,8 @@ { "name": "value", "type": "Tensor" }, { "name": "dropout_p", "type": "float32", "default": 0.0 }, { "name": "is_causal", "type": "boolean", "default": false }, - { "name": "attn_mask", "type": "Tensor", "optional": true, "default": null, "kwarg_only": true }, - { "name": "scale", "type": "float32", "optional": true, "default": null, "kwarg_only": true } + { "name": "attn_mask", "type": "Tensor?", "default": null, "kwarg_only": true }, + { "name": "scale", "type": "float32?", "default": null, "kwarg_only": true } ], "outputs": [ { "name": "output", "type": "Tensor" }, @@ -1121,11 +1300,11 @@ { "name": "indices", "type": "Tensor" }, { "name": "values", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "is_coalesced", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "is_coalesced", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "name": "outputs", "type": "Tensor" } @@ -1148,8 +1327,8 @@ { "name": "input_gates", "type": "Tensor" }, { "name": "hidden_gates", "type": "Tensor" }, { "name": "hx", "type": "Tensor" }, - { "name": "input_bias", "type": "Tensor", "optional": true, "default": null }, - { "name": "hidden_bias", "type": "Tensor", "optional": true, "default": null } + { "name": "input_bias", "type": "Tensor?", "default": null }, + { "name": "hidden_bias", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" }, @@ -1162,8 +1341,8 @@ { "name": "input_gates", "type": "Tensor" }, { "name": "hidden_gates", "type": "Tensor" }, { "name": "cx", "type": "Tensor" }, - { "name": "input_bias", "type": "Tensor", "optional": true, "default": null }, - { "name": "hidden_bias", "type": "Tensor", "optional": true, "default": null } + { "name": "input_bias", "type": "Tensor?", "default": null }, + { "name": "hidden_bias", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" }, @@ -1175,12 +1354,40 @@ "name": "aten::_to_copy", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, { "name": "non_blocking", "type": "boolean", "default": false, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::_transformer_encoder_layer_fwd", + "inputs": [ + { "name": "src", "type": "Tensor" }, + { "name": "embed_dim", "type": "int64" }, + { "name": "num_heads", "type": "int64" }, + { "name": "qkv_weight", "type": "Tensor" }, + { "name": "qkv_bias", "type": "Tensor" }, + { "name": "proj_weight", "type": "Tensor" }, + { "name": "proj_bias", "type": "Tensor" }, + { "name": "use_gelu", "type": "boolean" }, + { "name": "norm_first", "type": "boolean" }, + { "name": "eps", "type": "float32" }, + { "name": "norm_weight_1", "type": "Tensor" }, + { "name": "norm_bias_1", "type": "Tensor" }, + { "name": "norm_weight_2", "type": "Tensor" }, + { "name": "norm_bias_2", "type": "Tensor" }, + { "name": "ffn_weight_1", "type": "Tensor" }, + { "name": "ffn_bias_1", "type": "Tensor" }, + { "name": "ffn_weight_2", "type": "Tensor" }, + { "name": "ffn_bias_2", "type": "Tensor" }, + { "name": "mask", "type": "Tensor?", "default": null }, + { "name": "mask_type", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -1216,8 +1423,8 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -1229,8 +1436,8 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -1240,9 +1447,9 @@ "name": "aten::_upsample_bilinear2d_aa.vec", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt[]", "optional": true }, + { "name": "output_size", "type": "SymInt[]?" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scale_factors", "type": "float32[]", "optional": true } + { "name": "scale_factors", "type": "float32[]?" } ], "outputs": [ { "type": "Tensor" } @@ -1404,6 +1611,7 @@ }, { "name": "aten::adaptive_avg_pool2d.out", + "category": "Pool", "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" } @@ -1828,7 +2036,7 @@ "name": "aten::all.dims", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[]", "optional": true, "default": null }, + { "name": "dim", "type": "int64[]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -1839,7 +2047,7 @@ "name": "aten::all.dims_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[]", "optional": true, "default": null }, + { "name": "dim", "type": "int64[]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -1947,7 +2155,7 @@ "name": "aten::aminmax", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dim", "type": "int64?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -1959,7 +2167,7 @@ "name": "aten::aminmax.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dim", "type": "int64?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -2027,7 +2235,7 @@ "name": "aten::any.dimname", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "Dimname" }, + { "name": "dim", "type": "string" }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -2038,7 +2246,7 @@ "name": "aten::any.dimname_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "Dimname" }, + { "name": "dim", "type": "string" }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -2049,7 +2257,7 @@ "name": "aten::any.dims", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[]", "optional": true, "default": null }, + { "name": "dim", "type": "int64[]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -2060,7 +2268,7 @@ "name": "aten::any.dims_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[]", "optional": true, "default": null }, + { "name": "dim", "type": "int64[]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -2105,14 +2313,24 @@ { "type": "boolean" } ] }, + { + "name": "aten::append.t", + "inputs": [ + { "name": "self", "type": "t[]" }, + { "name": "el", "type": "t" } + ], + "outputs": [ + { "type": "t[]" } + ] + }, { "name": "aten::arange", "inputs": [ { "name": "end", "type": "Scalar" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2132,10 +2350,10 @@ "inputs": [ { "name": "start", "type": "Scalar" }, { "name": "end", "type": "Scalar" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2168,10 +2386,10 @@ { "name": "start", "type": "Scalar" }, { "name": "end", "type": "Scalar" }, { "name": "step", "type": "Scalar", "default": 1 }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2208,7 +2426,7 @@ "name": "aten::argmax", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, + { "name": "dim", "type": "int64?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -2219,7 +2437,7 @@ "name": "aten::argmax.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, + { "name": "dim", "type": "int64?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -2230,7 +2448,7 @@ "name": "aten::argmin", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, + { "name": "dim", "type": "int64?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -2241,7 +2459,7 @@ "name": "aten::argmin.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, + { "name": "dim", "type": "int64?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false } ], "outputs": [ @@ -2309,7 +2527,7 @@ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, { "name": "stride", "type": "SymInt[]" }, - { "name": "storage_offset", "type": "SymInt", "optional": true, "default": null } + { "name": "storage_offset", "type": "SymInt?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -2321,7 +2539,7 @@ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, { "name": "stride", "type": "SymInt[]" }, - { "name": "storage_offset", "type": "SymInt", "optional": true, "default": null } + { "name": "storage_offset", "type": "SymInt?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -2333,7 +2551,7 @@ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, { "name": "stride", "type": "SymInt[]" }, - { "name": "storage_offset", "type": "SymInt", "optional": true, "default": null } + { "name": "storage_offset", "type": "SymInt?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -2346,7 +2564,7 @@ { "name": "src", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, { "name": "stride", "type": "SymInt[]" }, - { "name": "storage_offset", "type": "SymInt", "optional": true, "default": null } + { "name": "storage_offset", "type": "SymInt?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -2356,8 +2574,8 @@ "name": "aten::as_tensor", "inputs": [ { "name": "data", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor", "name": "aten" } @@ -2367,8 +2585,8 @@ "name": "aten::as_tensor.bool", "inputs": [ { "name": "t", "type": "boolean" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2378,8 +2596,8 @@ "name": "aten::as_tensor.complex", "inputs": [ { "name": "t", "type": "complex" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2389,8 +2607,8 @@ "name": "aten::as_tensor.float", "inputs": [ { "name": "t", "type": "float32" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2400,8 +2618,8 @@ "name": "aten::as_tensor.int", "inputs": [ { "name": "t", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2411,8 +2629,8 @@ "name": "aten::as_tensor.list", "inputs": [ { "name": "data", "type": "t[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2563,7 +2781,7 @@ { "name": "padding", "type": "int64[2]", "default": 0 }, { "name": "ceil_mode", "type": "boolean", "default": false }, { "name": "count_include_pad", "type": "boolean", "default": true }, - { "name": "divisor_override", "type": "int64", "optional": true, "default": null } + { "name": "divisor_override", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -2578,7 +2796,7 @@ { "name": "padding", "type": "int64[2]", "default": 0 }, { "name": "ceil_mode", "type": "boolean", "default": false }, { "name": "count_include_pad", "type": "boolean", "default": true }, - { "name": "divisor_override", "type": "int64", "optional": true, "default": null } + { "name": "divisor_override", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -2594,7 +2812,7 @@ { "name": "padding", "type": "int64[3]", "default": 0 }, { "name": "ceil_mode", "type": "boolean", "default": false }, { "name": "count_include_pad", "type": "boolean", "default": true }, - { "name": "divisor_override", "type": "int64", "optional": true, "default": null } + { "name": "divisor_override", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -2609,7 +2827,7 @@ { "name": "padding", "type": "int64[3]", "default": 0 }, { "name": "ceil_mode", "type": "boolean", "default": false }, { "name": "count_include_pad", "type": "boolean", "default": true }, - { "name": "divisor_override", "type": "int64", "optional": true, "default": null } + { "name": "divisor_override", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -2659,10 +2877,10 @@ "category": "Normalization", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, - { "name": "running_mean", "type": "Tensor", "optional": true }, - { "name": "running_var", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, + { "name": "running_mean", "type": "Tensor?" }, + { "name": "running_var", "type": "Tensor?" }, { "name": "training", "type": "boolean", "visible": false }, { "name": "momentum", "type": "float32", "default": 0.1 }, { "name": "eps", "type": "float32", "default": 1e-05 }, @@ -2676,7 +2894,7 @@ "name": "aten::bernoulli", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2686,7 +2904,7 @@ "name": "aten::bernoulli.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2697,7 +2915,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "p", "type": "float32", "default": 0.5 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2708,7 +2926,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "p", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2719,7 +2937,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "p", "type": "float32", "default": 0.5 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -2739,7 +2957,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "target", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, { "name": "reduction", "type": "int64", "default": "Mean" } ], "outputs": [ @@ -2751,7 +2969,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "target", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, { "name": "reduction", "type": "int64", "default": "Mean" } ], "outputs": [ @@ -2764,7 +2982,7 @@ { "name": "grad_output", "type": "Tensor" }, { "name": "self", "type": "Tensor" }, { "name": "target", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, { "name": "reduction", "type": "int64", "default": "Mean" } ], "outputs": [ @@ -2777,7 +2995,7 @@ { "name": "grad_output", "type": "Tensor" }, { "name": "self", "type": "Tensor" }, { "name": "target", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, { "name": "reduction", "type": "int64", "default": "Mean" } ], "outputs": [ @@ -2789,8 +3007,8 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "target", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, - { "name": "pos_weight", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, + { "name": "pos_weight", "type": "Tensor?", "default": null }, { "name": "reduction", "type": "int64", "default": "Mean" } ], "outputs": [ @@ -2801,7 +3019,7 @@ "name": "aten::bincount", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "weights", "type": "Tensor", "optional": true, "default": null }, + { "name": "weights", "type": "Tensor?", "default": null }, { "name": "minlength", "type": "int64", "default": 0 } ], "outputs": [ @@ -2813,7 +3031,7 @@ "inputs": [ { "name": "count", "type": "Tensor" }, { "name": "prob", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null } + { "name": "generator", "type": "Generator?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3079,7 +3297,7 @@ { "name": "self", "type": "Tensor" }, { "name": "median", "type": "float32", "default": 0 }, { "name": "sigma", "type": "float32", "default": 1 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -3091,7 +3309,7 @@ { "name": "x1", "type": "Tensor" }, { "name": "x2", "type": "Tensor" }, { "name": "p", "type": "float32", "default": 2 }, - { "name": "compute_mode", "type": "int64", "optional": true, "default": null } + { "name": "compute_mode", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3106,6 +3324,33 @@ { "type": "Tensor" } ] }, + { + "name": "aten::ceil.Scalar", + "inputs": [ + { "name": "a", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "aten::ceil.float", + "inputs": [ + { "name": "a", "type": "float32" } + ], + "outputs": [ + { "type": "int64" } + ] + }, + { + "name": "aten::ceil.int", + "inputs": [ + { "name": "a", "type": "int64" } + ], + "outputs": [ + { "type": "int64" } + ] + }, { "name": "aten::ceil.out", "inputs": [ @@ -3170,8 +3415,8 @@ "name": "aten::clamp", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Scalar", "optional": true, "default": null }, - { "name": "max", "type": "Scalar", "optional": true, "default": null } + { "name": "min", "type": "Scalar?", "default": null }, + { "name": "max", "type": "Scalar?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3181,8 +3426,8 @@ "name": "aten::clamp.Tensor", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Tensor", "optional": true, "default": null }, - { "name": "max", "type": "Tensor", "optional": true, "default": null } + { "name": "min", "type": "Tensor?", "default": null }, + { "name": "max", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3192,8 +3437,8 @@ "name": "aten::clamp.Tensor_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Tensor", "optional": true, "default": null }, - { "name": "max", "type": "Tensor", "optional": true, "default": null } + { "name": "min", "type": "Tensor?", "default": null }, + { "name": "max", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3203,8 +3448,8 @@ "name": "aten::clamp.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Scalar", "optional": true, "default": null }, - { "name": "max", "type": "Scalar", "optional": true, "default": null } + { "name": "min", "type": "Scalar?", "default": null }, + { "name": "max", "type": "Scalar?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3214,8 +3459,8 @@ "name": "aten::clamp_", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Scalar", "optional": true, "default": null }, - { "name": "max", "type": "Scalar", "optional": true, "default": null } + { "name": "min", "type": "Scalar?", "default": null }, + { "name": "max", "type": "Scalar?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3225,8 +3470,8 @@ "name": "aten::clamp_.Tensor", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Tensor", "optional": true, "default": null }, - { "name": "max", "type": "Tensor", "optional": true, "default": null } + { "name": "min", "type": "Tensor?", "default": null }, + { "name": "max", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3367,8 +3612,8 @@ "name": "aten::clip", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Scalar", "optional": true, "default": null }, - { "name": "max", "type": "Scalar", "optional": true, "default": null } + { "name": "min", "type": "Scalar?", "default": null }, + { "name": "max", "type": "Scalar?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3378,8 +3623,8 @@ "name": "aten::clip.Tensor", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Tensor", "optional": true, "default": null }, - { "name": "max", "type": "Tensor", "optional": true, "default": null } + { "name": "min", "type": "Tensor?", "default": null }, + { "name": "max", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3389,8 +3634,8 @@ "name": "aten::clip.Tensor_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Tensor", "optional": true, "default": null }, - { "name": "max", "type": "Tensor", "optional": true, "default": null } + { "name": "min", "type": "Tensor?", "default": null }, + { "name": "max", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3400,8 +3645,8 @@ "name": "aten::clip.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Scalar", "optional": true, "default": null }, - { "name": "max", "type": "Scalar", "optional": true, "default": null } + { "name": "min", "type": "Scalar?", "default": null }, + { "name": "max", "type": "Scalar?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3411,8 +3656,8 @@ "name": "aten::clip_", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Scalar", "optional": true, "default": null }, - { "name": "max", "type": "Scalar", "optional": true, "default": null } + { "name": "min", "type": "Scalar?", "default": null }, + { "name": "max", "type": "Scalar?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3422,8 +3667,8 @@ "name": "aten::clip_.Tensor", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "min", "type": "Tensor", "optional": true, "default": null }, - { "name": "max", "type": "Tensor", "optional": true, "default": null } + { "name": "min", "type": "Tensor?", "default": null }, + { "name": "max", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3433,7 +3678,7 @@ "name": "aten::clone", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -3633,7 +3878,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[1]", "default": 1 }, { "name": "padding", "type": "SymInt[1]", "default": 0 }, { "name": "dilation", "type": "SymInt[1]", "default": 1 }, @@ -3649,7 +3894,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[1]", "default": 1 }, { "name": "padding", "type": "string", "default": "valid" }, { "name": "dilation", "type": "SymInt[1]", "default": 1 }, @@ -3665,7 +3910,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[2]", "default": 1 }, { "name": "padding", "type": "SymInt[2]", "default": 0 }, { "name": "dilation", "type": "SymInt[2]", "default": 1 }, @@ -3681,7 +3926,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[2]", "default": 1 }, { "name": "padding", "type": "string", "default": "valid" }, { "name": "dilation", "type": "SymInt[2]", "default": 1 }, @@ -3697,7 +3942,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[3]", "default": 1 }, { "name": "padding", "type": "SymInt[3]", "default": 0 }, { "name": "dilation", "type": "SymInt[3]", "default": 1 }, @@ -3713,7 +3958,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[3]", "default": 1 }, { "name": "padding", "type": "string", "default": "valid" }, { "name": "dilation", "type": "SymInt[3]", "default": 1 }, @@ -3729,7 +3974,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[1]", "default": 1 }, { "name": "padding", "type": "SymInt[1]", "default": 0 }, { "name": "output_padding", "type": "SymInt[1]", "default": 0 }, @@ -3746,7 +3991,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[2]", "default": 1 }, { "name": "padding", "type": "SymInt[2]", "default": 0 }, { "name": "output_padding", "type": "SymInt[2]", "default": 0 }, @@ -3763,7 +4008,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "stride", "type": "SymInt[3]", "default": 1 }, { "name": "padding", "type": "SymInt[3]", "default": 0 }, { "name": "output_padding", "type": "SymInt[3]", "default": 0 }, @@ -3780,7 +4025,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "SymInt[]" }, { "name": "padding", "type": "SymInt[]" }, { "name": "dilation", "type": "SymInt[]" }, @@ -3798,7 +4043,7 @@ { "name": "grad_output", "type": "Tensor" }, { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias_sizes", "type": "SymInt[]", "optional": true }, + { "name": "bias_sizes", "type": "SymInt[]?" }, { "name": "stride", "type": "SymInt[]" }, { "name": "padding", "type": "SymInt[]" }, { "name": "dilation", "type": "SymInt[]" }, @@ -3838,7 +4083,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "SymInt[]" }, { "name": "padding", "type": "SymInt[]" }, { "name": "dilation", "type": "SymInt[]" }, @@ -3913,7 +4158,7 @@ "name": "aten::count_nonzero", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null } + { "name": "dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3943,7 +4188,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null } + { "name": "dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3954,7 +4199,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null } + { "name": "dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -3965,7 +4210,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "target", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, { "name": "reduction", "type": "int64", "default": "Mean" }, { "name": "ignore_index", "type": "SymInt", "default": -100 }, { "name": "label_smoothing", "type": "float32", "default": 0.0 } @@ -4010,8 +4255,8 @@ { "name": "self", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, { "name": "z", "type": "Tensor" }, - { "name": "alpha", "type": "Scalar", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "alpha", "type": "Scalar?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "SymInt[]" }, { "name": "padding", "type": "SymInt[]" }, { "name": "dilation", "type": "SymInt[]" }, @@ -4026,7 +4271,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "SymInt[]" }, { "name": "padding", "type": "SymInt[]" }, { "name": "dilation", "type": "SymInt[]" }, @@ -4097,7 +4342,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4108,7 +4353,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4119,7 +4364,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4130,7 +4375,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4141,7 +4386,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4152,7 +4397,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4341,122 +4586,298 @@ ] }, { - "name": "aten::diff", - "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "int64", "default": 1 }, - { "name": "dim", "type": "int64", "default": -1 }, - { "name": "prepend", "type": "Tensor", "optional": true, "default": null }, - { "name": "append", "type": "Tensor", "optional": true, "default": null } - ], + "name": "aten::dict", + "inputs": [], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(string, Tensor)" } ] }, { - "name": "aten::diff.out", + "name": "aten::dict.Dict_Tensor", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "int64", "default": 1 }, - { "name": "dim", "type": "int64", "default": -1 }, - { "name": "prepend", "type": "Tensor", "optional": true, "default": null }, - { "name": "append", "type": "Tensor", "optional": true, "default": null } + { "name": "self", "type": "Dict(Tensor, t)" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(Tensor, t)" } ] }, { - "name": "aten::dim", + "name": "aten::dict.Dict_bool", "inputs": [ - { "name": "self", "type": "Tensor" } + { "name": "self", "type": "Dict(boolean, t)" } ], "outputs": [ - { "type": "int64" } + { "type": "Dict(boolean, t)" } ] }, { - "name": "aten::dist", + "name": "aten::dict.Dict_complex", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "default": 2 } + { "name": "self", "type": "Dict(complex, t)" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(complex, t)" } ] }, { - "name": "aten::div.Scalar", + "name": "aten::dict.Dict_float", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Scalar" } + { "name": "self", "type": "Dict(float32, t)" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(float32, t)" } ] }, { - "name": "aten::div.Scalar_mode", + "name": "aten::dict.Dict_int", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Scalar" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "self", "type": "Dict(int64, t)" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(int64, t)" } ] }, { - "name": "aten::div.Tensor", + "name": "aten::dict.Dict_str", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Tensor" } + { "name": "self", "type": "Dict(string, t)" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(string, t)" } ] }, { - "name": "aten::div.Tensor_mode", + "name": "aten::dict.Tensor", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Tensor" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "inputs", "type": "(Tensor, tVal)[]" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(Tensor, tVal)" } ] }, { - "name": "aten::div.out", + "name": "aten::dict.bool", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Tensor" } + { "name": "inputs", "type": "(boolean, tVal)[]" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(boolean, tVal)" } ] }, { - "name": "aten::div.out_mode", + "name": "aten::dict.complex", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Tensor" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "inputs", "type": "(complex, tVal)[]" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(complex, tVal)" } ] }, { - "name": "aten::div_.Scalar", + "name": "aten::dict.float", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Scalar" } + { "name": "inputs", "type": "(float32, tVal)[]" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Dict(float32, tVal)" } + ] + }, + { + "name": "aten::dict.int", + "inputs": [ + { "name": "inputs", "type": "(int64, tVal)[]" } + ], + "outputs": [ + { "type": "Dict(int64, tVal)" } + ] + }, + { + "name": "aten::dict.str", + "inputs": [ + { "name": "inputs", "type": "(string, tVal)[]" } + ], + "outputs": [ + { "type": "Dict(string, tVal)" } + ] + }, + { + "name": "aten::diff", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "n", "type": "int64", "default": 1 }, + { "name": "dim", "type": "int64", "default": -1 }, + { "name": "prepend", "type": "Tensor?", "default": null }, + { "name": "append", "type": "Tensor?", "default": null } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::diff.out", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "n", "type": "int64", "default": 1 }, + { "name": "dim", "type": "int64", "default": -1 }, + { "name": "prepend", "type": "Tensor?", "default": null }, + { "name": "append", "type": "Tensor?", "default": null } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::dim", + "inputs": [ + { "name": "self", "type": "Tensor" } + ], + "outputs": [ + { "type": "int64" } + ] + }, + { + "name": "aten::dist", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Tensor" }, + { "name": "p", "type": "Scalar", "default": 2 } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::div.Scalar", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Scalar" } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div.Scalar_mode", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Scalar" }, + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div.Scalar_mode_out", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Scalar" }, + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div.Scalar_out", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Scalar" } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div.Tensor", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Tensor" } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div.Tensor_mode", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Tensor" }, + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div.complex", + "inputs": [ + { "name": "a", "type": "complex" }, + { "name": "b", "type": "complex" } + ], + "outputs": [ + { "type": "complex" } + ] + }, + { + "name": "aten::div.float", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::div.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::div.out", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Tensor" } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div.out_mode", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Tensor" }, + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::div_.Scalar", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Scalar" } + ], + "outputs": [ + { "type": "Tensor" } ] }, { @@ -4464,7 +4885,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Scalar" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4485,7 +4906,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Tensor" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4506,7 +4927,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Scalar" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4527,7 +4948,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Tensor" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4548,7 +4969,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Tensor" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4569,7 +4990,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Scalar" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4590,7 +5011,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Tensor" }, - { "name": "rounding_mode", "type": "string", "optional": true, "kwarg_only": true } + { "name": "rounding_mode", "type": "string?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4667,7 +5088,7 @@ "inputs": [ { "name": "equation", "type": "string" }, { "name": "tensors", "type": "Tensor[]" }, - { "name": "path", "type": "int64[]", "optional": true, "default": null, "kwarg_only": true } + { "name": "path", "type": "int64[]?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4744,7 +5165,7 @@ { "name": "scale_grad_by_freq", "type": "boolean", "default": false }, { "name": "mode", "type": "int64", "default": 0 }, { "name": "sparse", "type": "boolean", "default": false }, - { "name": "per_sample_weights", "type": "Tensor", "optional": true, "default": null }, + { "name": "per_sample_weights", "type": "Tensor?", "default": null }, { "name": "include_last_offset", "type": "boolean", "default": false } ], "outputs": [ @@ -4763,9 +5184,9 @@ { "name": "scale_grad_by_freq", "type": "boolean" }, { "name": "mode", "type": "int64" }, { "name": "sparse", "type": "boolean" }, - { "name": "per_sample_weights", "type": "Tensor", "optional": true }, + { "name": "per_sample_weights", "type": "Tensor?" }, { "name": "include_last_offset", "type": "boolean" }, - { "name": "padding_idx", "type": "int64", "optional": true } + { "name": "padding_idx", "type": "int64?" } ], "outputs": [ { "type": "Tensor" }, @@ -4790,11 +5211,11 @@ "name": "aten::empty.memory_format", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4804,12 +5225,12 @@ "name": "aten::empty.names", "inputs": [ { "name": "size", "type": "int64[]" }, - { "name": "names", "type": "Dimname[]", "optional": true, "default": null, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "names", "type": "Dimname[]?", "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4819,7 +5240,7 @@ "name": "aten::empty.out", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -4829,16 +5250,26 @@ "name": "aten::empty_like", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } ] }, + { + "name": "aten::eq", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::eq.Scalar", "inputs": [ @@ -4909,6 +5340,26 @@ { "type": "boolean" } ] }, + { + "name": "aten::eq.complex", + "inputs": [ + { "name": "a", "type": "complex" }, + { "name": "b", "type": "complex" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::eq.complex_float", + "inputs": [ + { "name": "a", "type": "complex" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::eq.device", "inputs": [ @@ -4929,6 +5380,36 @@ { "type": "boolean" } ] }, + { + "name": "aten::eq.float", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::eq.float_complex", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "complex" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::eq.float_int", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::eq.float_list", "inputs": [ @@ -4939,6 +5420,26 @@ { "type": "boolean" } ] }, + { + "name": "aten::eq.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::eq.int_float", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::eq.int_list", "inputs": [ @@ -4949,6 +5450,16 @@ { "type": "boolean" } ] }, + { + "name": "aten::eq.str", + "inputs": [ + { "name": "a", "type": "string" }, + { "name": "b", "type": "string" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::eq.str_list", "inputs": [ @@ -5085,20 +5596,28 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "lambd", "type": "float32", "default": 1 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } ] }, + { + "name": "aten::extend.t", + "inputs": [ + { "name": "self", "type": "t[]" }, + { "name": "other", "type": "t[]" } + ], + "outputs": [] + }, { "name": "aten::eye", "inputs": [ { "name": "n", "type": "SymInt" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -5109,10 +5628,10 @@ "inputs": [ { "name": "n", "type": "SymInt" }, { "name": "m", "type": "SymInt" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -5264,9 +5783,9 @@ "name": "aten::fft_fft", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "SymInt", "optional": true, "default": null }, + { "name": "n", "type": "SymInt?", "default": null }, { "name": "dim", "type": "int64", "default": -1 }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5276,9 +5795,9 @@ "name": "aten::fft_fft.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "SymInt", "optional": true, "default": null }, + { "name": "n", "type": "SymInt?", "default": null }, { "name": "dim", "type": "int64", "default": -1 }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5288,9 +5807,9 @@ "name": "aten::fft_fft2", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5300,9 +5819,9 @@ "name": "aten::fft_fft2.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5312,9 +5831,9 @@ "name": "aten::fft_fftn", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5324,9 +5843,9 @@ "name": "aten::fft_fftn.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5336,7 +5855,7 @@ "name": "aten::fft_fftshift", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null } + { "name": "dim", "type": "int64[1]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5346,9 +5865,9 @@ "name": "aten::fft_hfft2", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5358,9 +5877,9 @@ "name": "aten::fft_hfft2.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5370,9 +5889,9 @@ "name": "aten::fft_hfftn", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5382,9 +5901,9 @@ "name": "aten::fft_hfftn.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5394,9 +5913,9 @@ "name": "aten::fft_ifft", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "SymInt", "optional": true, "default": null }, + { "name": "n", "type": "SymInt?", "default": null }, { "name": "dim", "type": "int64", "default": -1 }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5406,9 +5925,9 @@ "name": "aten::fft_ifft.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "SymInt", "optional": true, "default": null }, + { "name": "n", "type": "SymInt?", "default": null }, { "name": "dim", "type": "int64", "default": -1 }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5418,9 +5937,9 @@ "name": "aten::fft_ifft2", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5430,9 +5949,9 @@ "name": "aten::fft_ifft2.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5442,9 +5961,9 @@ "name": "aten::fft_ifftn", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5454,9 +5973,9 @@ "name": "aten::fft_ifftn.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5466,7 +5985,7 @@ "name": "aten::fft_ifftshift", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null } + { "name": "dim", "type": "int64[1]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5476,9 +5995,9 @@ "name": "aten::fft_ihfft2", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5488,9 +6007,9 @@ "name": "aten::fft_ihfft2.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5500,9 +6019,9 @@ "name": "aten::fft_ihfftn", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5512,9 +6031,9 @@ "name": "aten::fft_ihfftn.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5524,9 +6043,9 @@ "name": "aten::fft_irfft", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "SymInt", "optional": true, "default": null }, + { "name": "n", "type": "SymInt?", "default": null }, { "name": "dim", "type": "int64", "default": -1 }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5536,9 +6055,9 @@ "name": "aten::fft_irfft.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "SymInt", "optional": true, "default": null }, + { "name": "n", "type": "SymInt?", "default": null }, { "name": "dim", "type": "int64", "default": -1 }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5548,9 +6067,9 @@ "name": "aten::fft_irfft2", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5560,9 +6079,9 @@ "name": "aten::fft_irfft2.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5572,9 +6091,9 @@ "name": "aten::fft_irfftn", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5584,9 +6103,9 @@ "name": "aten::fft_irfftn.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5596,9 +6115,9 @@ "name": "aten::fft_rfft", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "SymInt", "optional": true, "default": null }, + { "name": "n", "type": "SymInt?", "default": null }, { "name": "dim", "type": "int64", "default": -1 }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5608,9 +6127,9 @@ "name": "aten::fft_rfft.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "n", "type": "SymInt", "optional": true, "default": null }, + { "name": "n", "type": "SymInt?", "default": null }, { "name": "dim", "type": "int64", "default": -1 }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5620,9 +6139,9 @@ "name": "aten::fft_rfft2", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5632,9 +6151,9 @@ "name": "aten::fft_rfft2.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, + { "name": "s", "type": "SymInt[1]?", "default": null }, { "name": "dim", "type": "int64[1]", "default": [ -2, -1 ] }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5644,9 +6163,9 @@ "name": "aten::fft_rfftn", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5656,9 +6175,9 @@ "name": "aten::fft_rfftn.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "s", "type": "SymInt[1]", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "norm", "type": "string", "optional": true, "default": null } + { "name": "s", "type": "SymInt[1]?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "norm", "type": "string?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -5765,6 +6284,33 @@ { "type": "Tensor" } ] }, + { + "name": "aten::floor.Scalar", + "inputs": [ + { "name": "a", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "aten::floor.float", + "inputs": [ + { "name": "a", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::floor.int", + "inputs": [ + { "name": "a", "type": "int64" } + ], + "outputs": [ + { "type": "int64" } + ] + }, { "name": "aten::floor.out", "inputs": [ @@ -5830,7 +6376,57 @@ { "name": "other", "type": "Tensor" } ], "outputs": [ - { "type": "Tensor" } + { "type": "Tensor" } + ] + }, + { + "name": "aten::floordiv.Scalar", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "aten::floordiv.float", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::floordiv.float_int", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::floordiv.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "int64" } + ] + }, + { + "name": "aten::floordiv.int_float", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } ] }, { @@ -5875,6 +6471,7 @@ }, { "name": "aten::format", + "is_vararg": true, "inputs": [ { "name": "self", "type": "string" } ], @@ -5910,10 +6507,10 @@ "inputs": [ { "name": "size", "type": "SymInt[]" }, { "name": "fill_value", "type": "Scalar" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -5924,11 +6521,11 @@ "inputs": [ { "name": "size", "type": "int64[]" }, { "name": "fill_value", "type": "Scalar" }, - { "name": "names", "type": "Dimname[]", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "names", "type": "Dimname[]?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -5949,11 +6546,11 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "fill_value", "type": "Scalar" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -6194,7 +6791,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "p", "type": "float32" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -6343,14 +6940,26 @@ { "type": "Tensor" } ] }, + { + "name": "aten::grid_sampler.legacy", + "inputs": [ + { "name": "input", "type": "Tensor" }, + { "name": "grid", "type": "Tensor" }, + { "name": "interpolation_mode", "type": "int64" }, + { "name": "padding_mode", "type": "int64" } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, { "name": "aten::group_norm", "category": "Normalization", "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "num_groups", "type": "int64" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "eps", "type": "float32", "default": 1e-05 }, { "name": "cudnn_enabled", "type": "boolean", "visible": true, "default": true } ], @@ -6396,6 +7005,16 @@ { "name": "?", "type": "Tensor" } ] }, + { + "name": "aten::gt", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::gt.Scalar", "inputs": [ @@ -6476,14 +7095,24 @@ { "type": "boolean" } ] }, + { + "name": "aten::gt.str", + "inputs": [ + { "name": "a", "type": "string" }, + { "name": "b", "type": "string" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::hamming_window", "inputs": [ { "name": "window_length", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -6494,10 +7123,10 @@ "inputs": [ { "name": "window_length", "type": "int64" }, { "name": "periodic", "type": "boolean" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -6509,10 +7138,10 @@ { "name": "window_length", "type": "int64" }, { "name": "periodic", "type": "boolean" }, { "name": "alpha", "type": "float32" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -6525,10 +7154,10 @@ { "name": "periodic", "type": "boolean" }, { "name": "alpha", "type": "float32" }, { "name": "beta", "type": "float32" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -6538,10 +7167,10 @@ "name": "aten::hann_window", "inputs": [ { "name": "window_length", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -6552,10 +7181,10 @@ "inputs": [ { "name": "window_length", "type": "int64" }, { "name": "periodic", "type": "boolean" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -6839,7 +7468,7 @@ "name": "aten::index.Tensor", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "indices", "type": "Tensor[]", "optional": true } + { "name": "indices", "type": "Tensor?[]" } ], "outputs": [ { "type": "Tensor" } @@ -6859,7 +7488,7 @@ "name": "aten::index.Tensor_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "indices", "type": "Tensor[]", "optional": true } + { "name": "indices", "type": "Tensor?[]" } ], "outputs": [ { "type": "Tensor" } @@ -7089,7 +7718,7 @@ "name": "aten::index_put", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "indices", "type": "Tensor[]", "optional": true }, + { "name": "indices", "type": "Tensor?[]" }, { "name": "values", "type": "Tensor" }, { "name": "accumulate", "type": "boolean", "default": false } ], @@ -7113,7 +7742,7 @@ "name": "aten::index_put_", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "indices", "type": "Tensor[]", "optional": true }, + { "name": "indices", "type": "Tensor?[]" }, { "name": "values", "type": "Tensor" }, { "name": "accumulate", "type": "boolean", "default": false } ], @@ -7236,10 +7865,10 @@ "category": "Normalization", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, - { "name": "running_mean", "type": "Tensor", "optional": true }, - { "name": "running_var", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, + { "name": "running_mean", "type": "Tensor?" }, + { "name": "running_var", "type": "Tensor?" }, { "name": "use_input_stats", "type": "boolean" }, { "name": "momentum", "type": "float32" }, { "name": "eps", "type": "float32" }, @@ -7336,13 +7965,13 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "n_fft", "type": "int64" }, - { "name": "hop_length", "type": "int64", "optional": true, "default": null }, - { "name": "win_length", "type": "int64", "optional": true, "default": null }, - { "name": "window", "type": "Tensor", "optional": true, "default": null }, + { "name": "hop_length", "type": "int64?", "default": null }, + { "name": "win_length", "type": "int64?", "default": null }, + { "name": "window", "type": "Tensor?", "default": null }, { "name": "center", "type": "boolean", "default": true }, { "name": "normalized", "type": "boolean", "default": false }, - { "name": "onesided", "type": "boolean", "optional": true, "default": null }, - { "name": "length", "type": "int64", "optional": true, "default": null }, + { "name": "onesided", "type": "boolean?", "default": null }, + { "name": "length", "type": "int64?", "default": null }, { "name": "return_complex", "type": "boolean", "default": false } ], "outputs": [ @@ -7368,6 +7997,60 @@ { "type": "string" } ] }, + { + "name": "aten::keys.Tensor", + "inputs": [ + { "name": "self", "type": "Dict(Tensor, t)" } + ], + "outputs": [ + { "type": "Tensor[]" } + ] + }, + { + "name": "aten::keys.bool", + "inputs": [ + { "name": "self", "type": "Dict(boolean, t)" } + ], + "outputs": [ + { "type": "boolean[]" } + ] + }, + { + "name": "aten::keys.complex", + "inputs": [ + { "name": "self", "type": "Dict(complex, t)" } + ], + "outputs": [ + { "type": "complex[]" } + ] + }, + { + "name": "aten::keys.float", + "inputs": [ + { "name": "self", "type": "Dict(float32, t)" } + ], + "outputs": [ + { "type": "float32[]" } + ] + }, + { + "name": "aten::keys.int", + "inputs": [ + { "name": "self", "type": "Dict(int64, t)" } + ], + "outputs": [ + { "type": "int64[]" } + ] + }, + { + "name": "aten::keys.str", + "inputs": [ + { "name": "self", "type": "Dict(string, t)" } + ], + "outputs": [ + { "type": "string[]" } + ] + }, { "name": "aten::kl_div", "inputs": [ @@ -7449,8 +8132,8 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "normalized_shape", "type": "SymInt[]" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, + { "name": "bias", "type": "Tensor?", "default": null }, { "name": "eps", "type": "float32", "default": 1e-05 }, { "name": "cudnn_enable", "type": "boolean", "default": true } ], @@ -7458,6 +8141,16 @@ { "type": "Tensor" } ] }, + { + "name": "aten::le", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::le.Scalar", "inputs": [ @@ -7538,6 +8231,16 @@ { "type": "boolean" } ] }, + { + "name": "aten::le.str", + "inputs": [ + { "name": "a", "type": "string" }, + { "name": "b", "type": "string" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::leaky_relu", "category": "Activation", @@ -7690,10 +8393,10 @@ "name": "aten::linalg_norm", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "ord", "type": "Scalar", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, + { "name": "ord", "type": "Scalar?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -7704,9 +8407,9 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "ord", "type": "string" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -7717,9 +8420,9 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "ord", "type": "string" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -7729,10 +8432,10 @@ "name": "aten::linalg_norm.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "ord", "type": "Scalar", "optional": true, "default": null }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, + { "name": "ord", "type": "Scalar?", "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -7839,7 +8542,7 @@ "inputs": [ { "name": "A", "type": "Tensor" }, { "name": "full_matrices", "type": "boolean", "default": true }, - { "name": "driver", "type": "string", "optional": true, "default": null, "kwarg_only": true } + { "name": "driver", "type": "string?", "default": null, "kwarg_only": true } ], "outputs": [ { "name": "U", "type": "Tensor" }, @@ -7852,7 +8555,7 @@ "inputs": [ { "name": "A", "type": "Tensor" }, { "name": "full_matrices", "type": "boolean", "default": true }, - { "name": "driver", "type": "string", "optional": true, "default": null, "kwarg_only": true } + { "name": "driver", "type": "string?", "default": null, "kwarg_only": true } ], "outputs": [ { "name": "U", "type": "Tensor" }, @@ -7885,7 +8588,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Tensor" }, - { "name": "dims", "type": "int64[]", "optional": true, "default": null } + { "name": "dims", "type": "int64[]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -7896,7 +8599,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "other", "type": "Tensor" }, - { "name": "dims", "type": "int64[]", "optional": true, "default": null } + { "name": "dims", "type": "int64[]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -7907,9 +8610,9 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "ord", "type": "Scalar", "default": 2 }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -7920,9 +8623,9 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "ord", "type": "Scalar", "default": 2 }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, + { "name": "dim", "type": "int64[1]?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -7934,7 +8637,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null } + { "name": "bias", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -7945,7 +8648,7 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true, "default": null } + { "name": "bias", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -7971,10 +8674,10 @@ { "name": "start", "type": "Scalar" }, { "name": "end", "type": "Scalar" }, { "name": "steps", "type": "int64", "default": null }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -7986,10 +8689,10 @@ { "name": "start", "type": "Scalar" }, { "name": "end", "type": "Tensor" }, { "name": "steps", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8012,10 +8715,10 @@ { "name": "start", "type": "Tensor" }, { "name": "end", "type": "Scalar" }, { "name": "steps", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8038,10 +8741,10 @@ { "name": "start", "type": "Tensor" }, { "name": "end", "type": "Tensor" }, { "name": "steps", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8069,6 +8772,24 @@ { "type": "Tensor" } ] }, + { + "name": "aten::list", + "inputs": [ + { "name": "t", "type": "string" } + ], + "outputs": [ + { "type": "string[]" } + ] + }, + { + "name": "aten::list.t", + "inputs": [ + { "name": "l", "type": "t[]" } + ], + "outputs": [ + { "type": "t[]" } + ] + }, { "name": "aten::log", "inputs": [ @@ -8096,6 +8817,42 @@ { "type": "Tensor" } ] }, + { + "name": "aten::log10.Scalar", + "inputs": [ + { "name": "a", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "aten::log10.complex", + "inputs": [ + { "name": "a", "type": "complex" } + ], + "outputs": [ + { "type": "complex" } + ] + }, + { + "name": "aten::log10.float", + "inputs": [ + { "name": "a", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::log10.int", + "inputs": [ + { "name": "a", "type": "int64" } + ], + "outputs": [ + { "type": "float32" } + ] + }, { "name": "aten::log10.out", "inputs": [ @@ -8183,7 +8940,7 @@ { "name": "self", "type": "Tensor" }, { "name": "mean", "type": "float32", "default": 1 }, { "name": "std", "type": "float32", "default": 2 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8255,7 +9012,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8267,7 +9024,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null } + { "name": "dtype", "type": "ScalarType?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -8278,7 +9035,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null } + { "name": "dtype", "type": "ScalarType?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -8494,7 +9251,7 @@ "name": "aten::logit", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "eps", "type": "float32", "optional": true, "default": null } + { "name": "eps", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -8504,7 +9261,7 @@ "name": "aten::logit.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "eps", "type": "float32", "optional": true, "default": null } + { "name": "eps", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -8514,7 +9271,7 @@ "name": "aten::logit_", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "eps", "type": "float32", "optional": true, "default": null } + { "name": "eps", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -8525,7 +9282,7 @@ "inputs": [ { "name": "grad_output", "type": "Tensor" }, { "name": "self", "type": "Tensor" }, - { "name": "eps", "type": "float32", "optional": true, "default": null } + { "name": "eps", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -8536,7 +9293,7 @@ "inputs": [ { "name": "grad_output", "type": "Tensor" }, { "name": "self", "type": "Tensor" }, - { "name": "eps", "type": "float32", "optional": true, "default": null } + { "name": "eps", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -8549,10 +9306,10 @@ { "name": "end", "type": "Scalar" }, { "name": "steps", "type": "int64" }, { "name": "base", "type": "float32", "default": 10.0 }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8565,10 +9322,10 @@ { "name": "end", "type": "Tensor" }, { "name": "steps", "type": "int64" }, { "name": "base", "type": "float32", "default": 10.0 }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8593,10 +9350,10 @@ { "name": "end", "type": "Scalar" }, { "name": "steps", "type": "int64" }, { "name": "base", "type": "float32", "default": 10.0 }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8621,10 +9378,10 @@ { "name": "end", "type": "Tensor" }, { "name": "steps", "type": "int64" }, { "name": "base", "type": "float32", "default": 10.0 }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -8746,14 +9503,24 @@ { "name": "hx", "type": "Tensor[]" }, { "name": "w_ih", "type": "Tensor" }, { "name": "w_hh", "type": "Tensor" }, - { "name": "b_ih", "type": "Tensor", "optional": true, "default": null }, - { "name": "b_hh", "type": "Tensor", "optional": true, "default": null } + { "name": "b_ih", "type": "Tensor?", "default": null }, + { "name": "b_hh", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" }, { "type": "Tensor" } ] }, + { + "name": "aten::lt", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::lt.Scalar", "inputs": [ @@ -8794,6 +9561,56 @@ { "type": "Tensor" } ] }, + { + "name": "aten::lt.float", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::lt.float_int", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::lt.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::lt.int_float", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "aten::lt.str", + "inputs": [ + { "name": "a", "type": "string" }, + { "name": "b", "type": "string" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::manual_seed", "inputs": [ @@ -9231,7 +10048,7 @@ "name": "aten::mean", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -9241,9 +10058,9 @@ "name": "aten::mean.dim", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -9253,7 +10070,7 @@ "name": "aten::mean.dtype_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -9265,7 +10082,7 @@ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -9277,7 +10094,7 @@ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -9287,9 +10104,9 @@ "name": "aten::mean.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -9516,7 +10333,7 @@ { "name": "stride", "type": "SymInt[2]", "default": 1 }, { "name": "dilation", "type": "SymInt[2]", "default": 1 }, { "name": "groups", "type": "SymInt", "default": 1 }, - { "name": "input_size", "type": "SymInt[]", "optional": true, "default": null } + { "name": "input_size", "type": "SymInt[]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -9632,6 +10449,16 @@ { "type": "Tensor" } ] }, + { + "name": "aten::mul", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, { "name": "aten::mul.Scalar", "inputs": [ @@ -9645,21 +10472,51 @@ { "name": "aten::mul.ScalarT", "inputs": [ - { "name": "input", "type": "Tensor[]" }, - { "name": "other", "type": "Scalar" } + { "name": "input", "type": "Tensor[]" }, + { "name": "other", "type": "Scalar" } + ], + "outputs": [ + { "type": "Tensor[]" } + ] + }, + { + "name": "aten::mul.Tensor", + "inputs": [ + { "name": "self", "type": "Tensor" }, + { "name": "other", "type": "Tensor" } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::mul.float_int", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::mul.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } ], "outputs": [ - { "type": "Tensor[]" } + { "type": "int64" } ] }, { - "name": "aten::mul.Tensor", + "name": "aten::mul.int_float", "inputs": [ - { "name": "self", "type": "Tensor" }, - { "name": "other", "type": "Tensor" } + { "name": "a", "type": "int64" }, + { "name": "b", "type": "float32" } ], "outputs": [ - { "type": "Tensor" } + { "type": "float32" } ] }, { @@ -9728,7 +10585,7 @@ { "name": "self", "type": "Tensor" }, { "name": "num_samples", "type": "int64" }, { "name": "replacement", "type": "boolean", "default": false }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -9740,7 +10597,7 @@ { "name": "self", "type": "Tensor" }, { "name": "num_samples", "type": "int64" }, { "name": "replacement", "type": "boolean", "default": false }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -9850,9 +10707,9 @@ "name": "aten::nan_to_num", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "nan", "type": "float32", "optional": true, "default": null }, - { "name": "posinf", "type": "float32", "optional": true, "default": null }, - { "name": "neginf", "type": "float32", "optional": true, "default": null } + { "name": "nan", "type": "float32?", "default": null }, + { "name": "posinf", "type": "float32?", "default": null }, + { "name": "neginf", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -9862,9 +10719,9 @@ "name": "aten::nan_to_num.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "nan", "type": "float32", "optional": true, "default": null }, - { "name": "posinf", "type": "float32", "optional": true, "default": null }, - { "name": "neginf", "type": "float32", "optional": true, "default": null } + { "name": "nan", "type": "float32?", "default": null }, + { "name": "posinf", "type": "float32?", "default": null }, + { "name": "neginf", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -9874,9 +10731,9 @@ "name": "aten::nan_to_num_", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "nan", "type": "float32", "optional": true, "default": null }, - { "name": "posinf", "type": "float32", "optional": true, "default": null }, - { "name": "neginf", "type": "float32", "optional": true, "default": null } + { "name": "nan", "type": "float32?", "default": null }, + { "name": "posinf", "type": "float32?", "default": null }, + { "name": "neginf", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -9936,8 +10793,8 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "normalized_shape", "type": "SymInt[]" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "eps", "type": "float32" } ], "outputs": [ @@ -10036,6 +10893,16 @@ { "type": "boolean" } ] }, + { + "name": "aten::ne.float", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::ne.float_list", "inputs": [ @@ -10046,6 +10913,16 @@ { "type": "boolean" } ] }, + { + "name": "aten::ne.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::ne.int_list", "inputs": [ @@ -10056,6 +10933,16 @@ { "type": "boolean" } ] }, + { + "name": "aten::ne.str", + "inputs": [ + { "name": "a", "type": "string" }, + { "name": "b", "type": "string" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "aten::ne.str_list", "inputs": [ @@ -10075,6 +10962,42 @@ { "type": "Tensor" } ] }, + { + "name": "aten::neg.Scalar", + "inputs": [ + { "name": "a", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "aten::neg.complex", + "inputs": [ + { "name": "a", "type": "complex" } + ], + "outputs": [ + { "type": "complex" } + ] + }, + { + "name": "aten::neg.float", + "inputs": [ + { "name": "a", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::neg.int", + "inputs": [ + { "name": "a", "type": "int64" } + ], + "outputs": [ + { "type": "int64" } + ] + }, { "name": "aten::neg.out", "inputs": [ @@ -10089,7 +11012,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "padding", "type": "float32" }, - { "name": "output_size", "type": "int64[]", "optional": true, "default": null } + { "name": "output_size", "type": "int64[]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -10100,10 +11023,10 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10115,10 +11038,10 @@ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, { "name": "stride", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10130,10 +11053,10 @@ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, { "name": "fill_value", "type": "Scalar" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10144,10 +11067,10 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10158,10 +11081,10 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10172,7 +11095,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "target", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true, "default": null }, + { "name": "weight", "type": "Tensor?", "default": null }, { "name": "reduction", "type": "int64", "default": "Mean" }, { "name": "ignore_index", "type": "SymInt", "default": -100 } ], @@ -10221,7 +11144,7 @@ "name": "aten::norm.ScalarOpt_dim", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dim", "type": "int64[1]" }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -10233,7 +11156,7 @@ "name": "aten::norm.ScalarOpt_dim_dtype", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dim", "type": "int64[1]" }, { "name": "keepdim", "type": "boolean" }, { "name": "dtype", "type": "ScalarType", "kwarg_only": true } @@ -10246,7 +11169,7 @@ "name": "aten::norm.ScalarOpt_dtype", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dtype", "type": "ScalarType", "kwarg_only": true } ], "outputs": [ @@ -10257,7 +11180,7 @@ "name": "aten::norm.dtype_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dim", "type": "int64[1]" }, { "name": "keepdim", "type": "boolean", "default": false }, { "name": "dtype", "type": "ScalarType", "kwarg_only": true } @@ -10270,7 +11193,7 @@ "name": "aten::norm.names_ScalarOpt_dim", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dim", "type": "Dimname[1]" }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -10282,7 +11205,7 @@ "name": "aten::norm.names_ScalarOpt_dim_dtype", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dim", "type": "Dimname[1]" }, { "name": "keepdim", "type": "boolean" }, { "name": "dtype", "type": "ScalarType", "kwarg_only": true } @@ -10295,7 +11218,7 @@ "name": "aten::norm.names_dtype_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dim", "type": "Dimname[1]" }, { "name": "keepdim", "type": "boolean" }, { "name": "dtype", "type": "ScalarType", "kwarg_only": true } @@ -10308,7 +11231,7 @@ "name": "aten::norm.names_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dim", "type": "Dimname[1]" }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -10320,7 +11243,7 @@ "name": "aten::norm.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "p", "type": "Scalar", "optional": true }, + { "name": "p", "type": "Scalar?" }, { "name": "dim", "type": "int64[1]" }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -10333,7 +11256,7 @@ "inputs": [ { "name": "mean", "type": "Tensor" }, { "name": "std", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10344,7 +11267,7 @@ "inputs": [ { "name": "mean", "type": "Tensor" }, { "name": "std", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10355,7 +11278,7 @@ "inputs": [ { "name": "mean", "type": "Tensor" }, { "name": "std", "type": "float32", "default": 1 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10366,7 +11289,7 @@ "inputs": [ { "name": "mean", "type": "Tensor" }, { "name": "std", "type": "float32", "default": 1 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10377,7 +11300,7 @@ "inputs": [ { "name": "mean", "type": "float32" }, { "name": "std", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10388,7 +11311,7 @@ "inputs": [ { "name": "mean", "type": "float32" }, { "name": "std", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10400,11 +11323,11 @@ { "name": "mean", "type": "float32", "default": 0 }, { "name": "std", "type": "float32" }, { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10416,7 +11339,7 @@ { "name": "mean", "type": "float32" }, { "name": "std", "type": "float32" }, { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10428,7 +11351,7 @@ { "name": "self", "type": "Tensor" }, { "name": "mean", "type": "float32", "default": 0 }, { "name": "std", "type": "float32", "default": 1 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10475,10 +11398,10 @@ "name": "aten::ones", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10488,11 +11411,11 @@ "name": "aten::ones.names", "inputs": [ { "name": "size", "type": "int64[]" }, - { "name": "names", "type": "Dimname[]", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "names", "type": "Dimname[]?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10511,11 +11434,11 @@ "name": "aten::ones_like", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10528,7 +11451,7 @@ { "name": "self", "type": "Tensor" }, { "name": "pad", "type": "SymInt[]" }, { "name": "mode", "type": "string", "default": "constant" }, - { "name": "value", "type": "float32", "optional": true, "default": null } + { "name": "value", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -10584,7 +11507,7 @@ "name": "aten::pin_memory", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "device", "type": "Device", "optional": true, "default": null } + { "name": "device", "type": "Device?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -10755,7 +11678,7 @@ "name": "aten::prod", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10767,7 +11690,7 @@ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10779,7 +11702,7 @@ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10791,7 +11714,7 @@ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10803,7 +11726,7 @@ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -10826,7 +11749,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "q", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, + { "name": "dim", "type": "int64?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, { "name": "interpolation", "type": "string", "default": "linear", "kwarg_only": true } ], @@ -10839,7 +11762,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "q", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, + { "name": "dim", "type": "int64?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, { "name": "interpolation", "type": "string", "default": "linear", "kwarg_only": true } ], @@ -10852,7 +11775,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "q", "type": "float32" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, + { "name": "dim", "type": "int64?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, { "name": "interpolation", "type": "string", "default": "linear", "kwarg_only": true } ], @@ -10865,7 +11788,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "q", "type": "float32" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, + { "name": "dim", "type": "int64?", "default": null }, { "name": "keepdim", "type": "boolean", "default": false }, { "name": "interpolation", "type": "string", "default": "linear", "kwarg_only": true } ], @@ -11027,7 +11950,7 @@ { "name": "dropout", "type": "float32" }, { "name": "train", "type": "boolean" }, { "name": "bidirectional", "type": "boolean" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, { "name": "use_dynamic", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -11049,7 +11972,7 @@ { "name": "dropout", "type": "float32" }, { "name": "train", "type": "boolean" }, { "name": "bidirectional", "type": "boolean" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, { "name": "use_dynamic", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -11071,7 +11994,7 @@ { "name": "train", "type": "boolean" }, { "name": "bidirectional", "type": "boolean" }, { "name": "batch_first", "type": "boolean" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, { "name": "use_dynamic", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -11093,7 +12016,7 @@ { "name": "train", "type": "boolean" }, { "name": "bidirectional", "type": "boolean" }, { "name": "batch_first", "type": "boolean" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, { "name": "use_dynamic", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -11129,10 +12052,10 @@ "name": "aten::rand", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11142,11 +12065,11 @@ "name": "aten::rand.generator", "inputs": [ { "name": "size", "type": "SymInt[]", "default": null }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11156,7 +12079,7 @@ "name": "aten::rand.generator_out", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11166,12 +12089,12 @@ "name": "aten::rand.generator_with_names", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true }, - { "name": "names", "type": "Dimname[]", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true }, + { "name": "names", "type": "Dimname[]?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11181,11 +12104,11 @@ "name": "aten::rand.names", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "names", "type": "Dimname[]", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "names", "type": "Dimname[]?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11204,11 +12127,11 @@ "name": "aten::rand_like", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11219,10 +12142,10 @@ "inputs": [ { "name": "high", "type": "SymInt" }, { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": "long", "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": "long", "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11233,11 +12156,11 @@ "inputs": [ { "name": "high", "type": "SymInt" }, { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": "long", "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": "long", "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11248,7 +12171,7 @@ "inputs": [ { "name": "high", "type": "SymInt" }, { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11260,10 +12183,10 @@ { "name": "low", "type": "SymInt", "default": null }, { "name": "high", "type": "SymInt", "default": null }, { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": "long", "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": "long", "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11275,11 +12198,11 @@ { "name": "low", "type": "SymInt", "default": null }, { "name": "high", "type": "SymInt", "default": null }, { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": "long", "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": "long", "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11291,7 +12214,7 @@ { "name": "low", "type": "SymInt" }, { "name": "high", "type": "SymInt" }, { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11323,11 +12246,11 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "high", "type": "SymInt" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11339,11 +12262,11 @@ { "name": "self", "type": "Tensor" }, { "name": "low", "type": "SymInt" }, { "name": "high", "type": "SymInt" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11353,10 +12276,10 @@ "name": "aten::randn", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11366,11 +12289,11 @@ "name": "aten::randn.generator", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11380,7 +12303,7 @@ "name": "aten::randn.generator_out", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11390,12 +12313,12 @@ "name": "aten::randn.generator_with_names", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true }, - { "name": "names", "type": "Dimname[]", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true }, + { "name": "names", "type": "Dimname[]?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11405,11 +12328,11 @@ "name": "aten::randn.names", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "names", "type": "Dimname[]", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "names", "type": "Dimname[]?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11428,11 +12351,11 @@ "name": "aten::randn_like", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11442,7 +12365,7 @@ "name": "aten::random_", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11453,8 +12376,8 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "from", "type": "int64" }, - { "name": "to", "type": "int64", "optional": true }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "to", "type": "int64?" }, + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11465,7 +12388,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "to", "type": "int64" }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11475,10 +12398,10 @@ "name": "aten::randperm", "inputs": [ { "name": "n", "type": "SymInt" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": "long", "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": "long", "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11488,11 +12411,11 @@ "name": "aten::randperm.generator", "inputs": [ { "name": "n", "type": "SymInt" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": "long", "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": "long", "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11502,7 +12425,7 @@ "name": "aten::randperm.generator_out", "inputs": [ { "name": "n", "type": "SymInt" }, - { "name": "generator", "type": "Generator", "optional": true, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11647,6 +12570,16 @@ { "type": "Tensor" } ] }, + { + "name": "aten::remainder", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, { "name": "aten::remainder.Scalar", "inputs": [ @@ -11667,6 +12600,16 @@ { "type": "Tensor" } ] }, + { + "name": "aten::remainder.Scalar_Tensor_out", + "inputs": [ + { "name": "self", "type": "Scalar" }, + { "name": "other", "type": "Tensor" } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, { "name": "aten::remainder.Scalar_out", "inputs": [ @@ -11698,7 +12641,7 @@ ] }, { - "name": "aten::remainder.float32", + "name": "aten::remainder.float", "inputs": [ { "name": "a", "type": "float32" }, { "name": "b", "type": "float32" } @@ -11707,6 +12650,16 @@ { "type": "float32" } ] }, + { + "name": "aten::remainder.float_int", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "float32" } + ] + }, { "name": "aten::remainder.int", "inputs": [ @@ -11717,6 +12670,16 @@ { "type": "int64" } ] }, + { + "name": "aten::remainder.int_float", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, { "name": "aten::remainder_.Scalar", "inputs": [ @@ -11775,7 +12738,7 @@ "name": "aten::repeat_interleave.Tensor", "inputs": [ { "name": "repeats", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt", "optional": true, "default": null, "kwarg_only": true } + { "name": "output_size", "type": "SymInt?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11786,8 +12749,8 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "repeats", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, - { "name": "output_size", "type": "SymInt", "optional": true, "default": null, "kwarg_only": true } + { "name": "dim", "type": "int64?", "default": null }, + { "name": "output_size", "type": "SymInt?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11798,8 +12761,8 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "repeats", "type": "SymInt" }, - { "name": "dim", "type": "int64", "optional": true, "default": null }, - { "name": "output_size", "type": "SymInt", "optional": true, "default": null, "kwarg_only": true } + { "name": "dim", "type": "int64?", "default": null }, + { "name": "output_size", "type": "SymInt?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -11917,7 +12880,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "size", "type": "SymInt[]" }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -12029,8 +12992,8 @@ { "name": "hx", "type": "Tensor" }, { "name": "w_ih", "type": "Tensor" }, { "name": "w_hh", "type": "Tensor" }, - { "name": "b_ih", "type": "Tensor", "optional": true, "default": null }, - { "name": "b_hh", "type": "Tensor", "optional": true, "default": null } + { "name": "b_ih", "type": "Tensor?", "default": null }, + { "name": "b_hh", "type": "Tensor?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -12123,7 +13086,7 @@ { "name": "lower", "type": "Scalar", "default": 0.125 }, { "name": "upper", "type": "Scalar", "default": 0.3333333333333333 }, { "name": "training", "type": "boolean", "default": false }, - { "name": "generator", "type": "Generator", "optional": true, "default": null } + { "name": "generator", "type": "Generator?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -12182,10 +13145,10 @@ "name": "aten::scalar_tensor", "inputs": [ { "name": "s", "type": "Scalar" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -12198,10 +13161,10 @@ { "name": "query", "type": "Tensor" }, { "name": "key", "type": "Tensor" }, { "name": "value", "type": "Tensor" }, - { "name": "attn_mask", "type": "Tensor", "optional": true, "default": null }, + { "name": "attn_mask", "type": "Tensor?", "default": null }, { "name": "dropout_p", "type": "float32", "default": 0.0 }, { "name": "is_causal", "type": "boolean", "default": false }, - { "name": "scale", "type": "float32", "optional": true, "default": null, "kwarg_only": true }, + { "name": "scale", "type": "float32?", "default": null, "kwarg_only": true }, { "name": "enable_gqa", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -12479,8 +13442,8 @@ { "name": "self", "type": "Scalar" }, { "name": "out_int32", "type": "boolean", "default": false, "kwarg_only": true }, { "name": "right", "type": "boolean", "default": false, "kwarg_only": true }, - { "name": "side", "type": "string", "optional": true, "default": null, "kwarg_only": true }, - { "name": "sorter", "type": "Tensor", "optional": true, "default": null, "kwarg_only": true } + { "name": "side", "type": "string?", "default": null, "kwarg_only": true }, + { "name": "sorter", "type": "Tensor?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -12493,8 +13456,8 @@ { "name": "self", "type": "Scalar" }, { "name": "out_int32", "type": "boolean", "default": false, "kwarg_only": true }, { "name": "right", "type": "boolean", "default": false, "kwarg_only": true }, - { "name": "side", "type": "string", "optional": true, "default": null, "kwarg_only": true }, - { "name": "sorter", "type": "Tensor", "optional": true, "default": null, "kwarg_only": true } + { "name": "side", "type": "string?", "default": null, "kwarg_only": true }, + { "name": "sorter", "type": "Tensor?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -12507,8 +13470,8 @@ { "name": "self", "type": "Tensor" }, { "name": "out_int32", "type": "boolean", "default": false, "kwarg_only": true }, { "name": "right", "type": "boolean", "default": false, "kwarg_only": true }, - { "name": "side", "type": "string", "optional": true, "default": null, "kwarg_only": true }, - { "name": "sorter", "type": "Tensor", "optional": true, "default": null, "kwarg_only": true } + { "name": "side", "type": "string?", "default": null, "kwarg_only": true }, + { "name": "sorter", "type": "Tensor?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -12521,8 +13484,8 @@ { "name": "self", "type": "Tensor" }, { "name": "out_int32", "type": "boolean", "default": false, "kwarg_only": true }, { "name": "right", "type": "boolean", "default": false, "kwarg_only": true }, - { "name": "side", "type": "string", "optional": true, "default": null, "kwarg_only": true }, - { "name": "sorter", "type": "Tensor", "optional": true, "default": null, "kwarg_only": true } + { "name": "side", "type": "string?", "default": null, "kwarg_only": true }, + { "name": "sorter", "type": "Tensor?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -12809,8 +13772,8 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64", "default": 0 }, - { "name": "start", "type": "SymInt", "optional": true, "default": null }, - { "name": "end", "type": "SymInt", "optional": true, "default": null }, + { "name": "start", "type": "SymInt?", "default": null }, + { "name": "end", "type": "SymInt?", "default": null }, { "name": "step", "type": "SymInt", "default": 1 } ], "outputs": [ @@ -12821,8 +13784,8 @@ "name": "aten::slice.str", "inputs": [ { "name": "string", "type": "string" }, - { "name": "start", "type": "int64", "optional": true, "default": null }, - { "name": "end", "type": "int64", "optional": true, "default": null }, + { "name": "start", "type": "int64?", "default": null }, + { "name": "end", "type": "int64?", "default": null }, { "name": "step", "type": "int64", "default": 1 } ], "outputs": [ @@ -12833,8 +13796,8 @@ "name": "aten::slice.t", "inputs": [ { "name": "l", "type": "t[]" }, - { "name": "start", "type": "int64", "optional": true, "default": null }, - { "name": "end", "type": "int64", "optional": true, "default": null }, + { "name": "start", "type": "int64?", "default": null }, + { "name": "end", "type": "int64?", "default": null }, { "name": "step", "type": "int64", "default": 1 } ], "outputs": [ @@ -12846,8 +13809,8 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64", "default": 0 }, - { "name": "start", "type": "SymInt", "optional": true, "default": null }, - { "name": "end", "type": "SymInt", "optional": true, "default": null }, + { "name": "start", "type": "SymInt?", "default": null }, + { "name": "end", "type": "SymInt?", "default": null }, { "name": "step", "type": "SymInt", "default": 1 } ], "outputs": [ @@ -12860,8 +13823,8 @@ { "name": "self", "type": "Tensor" }, { "name": "src", "type": "Tensor" }, { "name": "dim", "type": "int64", "default": 0 }, - { "name": "start", "type": "SymInt", "optional": true, "default": null }, - { "name": "end", "type": "SymInt", "optional": true, "default": null }, + { "name": "start", "type": "SymInt?", "default": null }, + { "name": "end", "type": "SymInt?", "default": null }, { "name": "step", "type": "SymInt", "default": 1 } ], "outputs": [ @@ -12924,7 +13887,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -12936,7 +13899,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null } + { "name": "dtype", "type": "ScalarType?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -12947,7 +13910,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "int64" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null } + { "name": "dtype", "type": "ScalarType?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -13048,7 +14011,7 @@ "name": "aten::sort.dimname_stable", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "stable", "type": "boolean", "optional": true, "kwarg_only": true }, + { "name": "stable", "type": "boolean?", "kwarg_only": true }, { "name": "dim", "type": "Dimname", "kwarg_only": true }, { "name": "descending", "type": "boolean", "default": false, "kwarg_only": true } ], @@ -13073,7 +14036,7 @@ "name": "aten::sort.dimname_values_stable", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "stable", "type": "boolean", "optional": true, "kwarg_only": true }, + { "name": "stable", "type": "boolean?", "kwarg_only": true }, { "name": "dim", "type": "Dimname", "kwarg_only": true }, { "name": "descending", "type": "boolean", "default": false, "kwarg_only": true } ], @@ -13102,7 +14065,7 @@ "name": "aten::sort.stable", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "stable", "type": "boolean", "optional": true, "kwarg_only": true }, + { "name": "stable", "type": "boolean?", "kwarg_only": true }, { "name": "dim", "type": "int64", "default": -1, "kwarg_only": true }, { "name": "descending", "type": "boolean", "default": false, "kwarg_only": true } ], @@ -13135,7 +14098,7 @@ "name": "aten::sort.values_stable", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "stable", "type": "boolean", "optional": true, "kwarg_only": true }, + { "name": "stable", "type": "boolean?", "kwarg_only": true }, { "name": "dim", "type": "int64", "default": -1, "kwarg_only": true }, { "name": "descending", "type": "boolean", "default": false, "kwarg_only": true } ], @@ -13201,7 +14164,7 @@ "name": "aten::split.str", "inputs": [ { "name": "self", "type": "string" }, - { "name": "separator", "type": "string", "optional": true, "default": null }, + { "name": "separator", "type": "string?", "default": null }, { "name": "max", "type": "int64", "default": -1 } ], "outputs": [ @@ -13279,6 +14242,42 @@ { "type": "Tensor" } ] }, + { + "name": "aten::sqrt.Scalar", + "inputs": [ + { "name": "a", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "aten::sqrt.complex", + "inputs": [ + { "name": "a", "type": "complex" } + ], + "outputs": [ + { "type": "complex" } + ] + }, + { + "name": "aten::sqrt.float", + "inputs": [ + { "name": "a", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "aten::sqrt.int", + "inputs": [ + { "name": "a", "type": "int64" } + ], + "outputs": [ + { "type": "float32" } + ] + }, { "name": "aten::sqrt.out", "inputs": [ @@ -13444,8 +14443,8 @@ "name": "aten::std.correction", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -13457,7 +14456,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -13469,7 +14468,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -13480,8 +14479,8 @@ "name": "aten::std.correction_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -13492,7 +14491,7 @@ "name": "aten::std.dim", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "unbiased", "type": "boolean", "default": true }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -13528,7 +14527,7 @@ "name": "aten::std.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "unbiased", "type": "boolean", "default": true }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -13551,8 +14550,8 @@ "name": "aten::std_mean.correction", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -13565,7 +14564,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -13577,7 +14576,7 @@ "name": "aten::std_mean.dim", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "unbiased", "type": "boolean", "default": true }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -13604,12 +14603,12 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "n_fft", "type": "int64" }, - { "name": "hop_length", "type": "int64", "optional": true, "default": null }, - { "name": "win_length", "type": "int64", "optional": true, "default": null }, - { "name": "window", "type": "Tensor", "optional": true, "default": null }, + { "name": "hop_length", "type": "int64?", "default": null }, + { "name": "win_length", "type": "int64?", "default": null }, + { "name": "window", "type": "Tensor?", "default": null }, { "name": "normalized", "type": "boolean", "default": false }, - { "name": "onesided", "type": "boolean", "optional": true, "default": null }, - { "name": "return_complex", "type": "boolean", "optional": true, "default": null } + { "name": "onesided", "type": "boolean?", "default": null }, + { "name": "return_complex", "type": "boolean?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -13620,14 +14619,14 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "n_fft", "type": "int64" }, - { "name": "hop_length", "type": "int64", "optional": true, "default": null }, - { "name": "win_length", "type": "int64", "optional": true, "default": null }, - { "name": "window", "type": "Tensor", "optional": true, "default": null }, + { "name": "hop_length", "type": "int64?", "default": null }, + { "name": "win_length", "type": "int64?", "default": null }, + { "name": "window", "type": "Tensor?", "default": null }, { "name": "center", "type": "boolean", "default": true }, { "name": "pad_mode", "type": "string", "default": "reflect" }, { "name": "normalized", "type": "boolean", "default": false }, - { "name": "onesided", "type": "boolean", "optional": true, "default": null }, - { "name": "return_complex", "type": "boolean", "optional": true, "default": null } + { "name": "onesided", "type": "boolean?", "default": null }, + { "name": "return_complex", "type": "boolean?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -13770,7 +14769,7 @@ "name": "aten::sum", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -13782,7 +14781,7 @@ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -13792,9 +14791,9 @@ "name": "aten::sum.IntList_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -13824,7 +14823,7 @@ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -13834,9 +14833,9 @@ "name": "aten::sum.dim_IntList", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "keepdim", "type": "boolean", "default": false }, - { "name": "dtype", "type": "ScalarType", "default": null, "optional": true, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -13936,7 +14935,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "indices", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null } + { "name": "dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -13947,7 +14946,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "indices", "type": "Tensor" }, - { "name": "dim", "type": "int64", "optional": true, "default": null } + { "name": "dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14011,8 +15010,8 @@ "name": "aten::tensor", "inputs": [ { "name": "data", "type": "t[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, { "name": "requires_grad", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -14165,7 +15164,7 @@ { "name": "dtype", "type": "ScalarType" }, { "name": "non_blocking", "type": "boolean", "default": false }, { "name": "copy", "type": "boolean", "default": false }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null } + { "name": "memory_format", "type": "MemoryFormat?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14178,7 +15177,7 @@ { "name": "dtype", "type": "ScalarType" }, { "name": "non_blocking", "type": "boolean", "default": false }, { "name": "copy", "type": "boolean", "default": false }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null } + { "name": "memory_format", "type": "MemoryFormat?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14188,13 +15187,13 @@ "name": "aten::to.dtype_layout", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, { "name": "non_blocking", "type": "boolean", "default": false, "kwarg_only": true }, { "name": "copy", "type": "boolean", "default": false, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -14207,7 +15206,7 @@ { "name": "other", "type": "Tensor" }, { "name": "non_blocking", "type": "boolean", "default": false }, { "name": "copy", "type": "boolean", "default": false }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null } + { "name": "memory_format", "type": "MemoryFormat?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14217,8 +15216,8 @@ "name": "aten::to.prim_Device", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "device", "type": "Device", "optional": true }, - { "name": "dtype", "type": "int64", "optional": true, "default": null }, + { "name": "device", "type": "Device?" }, + { "name": "dtype", "type": "int64?", "default": null }, { "name": "non_blocking", "type": "boolean", "default": false }, { "name": "copy", "type": "boolean", "default": false } ], @@ -14230,7 +15229,7 @@ "name": "aten::to.prim_dtype", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "int64", "optional": true, "default": null }, + { "name": "dtype", "type": "int64?", "default": null }, { "name": "non_blocking", "type": "boolean", "default": false }, { "name": "copy", "type": "boolean", "default": false } ], @@ -14253,8 +15252,8 @@ "name": "aten::to_dense", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null }, - { "name": "masked_grad", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null }, + { "name": "masked_grad", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -14265,7 +15264,7 @@ "inputs": [ { "name": "grad", "type": "Tensor" }, { "name": "input", "type": "Tensor" }, - { "name": "masked_grad", "type": "boolean", "optional": true, "default": null } + { "name": "masked_grad", "type": "boolean?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14275,7 +15274,7 @@ "name": "aten::to_mkldnn", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null } + { "name": "dtype", "type": "ScalarType?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14296,7 +15295,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "padding", "type": "float32" }, - { "name": "output_size", "type": "SymInt[]", "optional": true, "default": null } + { "name": "output_size", "type": "SymInt[]?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14306,9 +15305,9 @@ "name": "aten::to_sparse", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "blocksize", "type": "int64[2]", "optional": true, "default": null, "kwarg_only": true }, - { "name": "dense_dim", "type": "int64", "optional": true, "default": null, "kwarg_only": true } + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "blocksize", "type": "int64[2]?", "default": null, "kwarg_only": true }, + { "name": "dense_dim", "type": "int64?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -14329,7 +15328,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "blocksize", "type": "int64[2]" }, - { "name": "dense_dim", "type": "int64", "optional": true, "default": null } + { "name": "dense_dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14340,7 +15339,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "blocksize", "type": "int64[2]" }, - { "name": "dense_dim", "type": "int64", "optional": true, "default": null } + { "name": "dense_dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14350,7 +15349,7 @@ "name": "aten::to_sparse_csc", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dense_dim", "type": "int64", "optional": true, "default": null } + { "name": "dense_dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14360,7 +15359,7 @@ "name": "aten::to_sparse_csr", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dense_dim", "type": "int64", "optional": true, "default": null } + { "name": "dense_dim", "type": "int64?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14479,10 +15478,10 @@ { "name": "row", "type": "int64" }, { "name": "col", "type": "int64" }, { "name": "offset", "type": "int64", "default": 0 }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": "long", "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": "long", "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -14524,10 +15523,10 @@ { "name": "row", "type": "int64" }, { "name": "col", "type": "int64" }, { "name": "offset", "type": "int64", "default": 0 }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": "long", "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": "long", "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -14656,7 +15655,7 @@ { "name": "self", "type": "Tensor" }, { "name": "from", "type": "float32", "default": 0 }, { "name": "to", "type": "float32", "default": 1 }, - { "name": "generator", "type": "Generator", "optional": true, "default": null, "kwarg_only": true } + { "name": "generator", "type": "Generator?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -14669,7 +15668,7 @@ { "name": "self", "type": "Tensor" }, { "name": "return_inverse", "type": "boolean", "default": false }, { "name": "return_counts", "type": "boolean", "default": false }, - { "name": "dim", "type": "int64", "optional": true, "default": null } + { "name": "dim", "type": "int64?", "default": null } ], "outputs": [ { "name": "output1", "type": "Tensor" }, @@ -14769,8 +15768,8 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14782,8 +15781,8 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14794,9 +15793,9 @@ "category": "Layer", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt[]", "optional": true }, + { "name": "output_size", "type": "SymInt[]?" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scale_factors", "type": "float32[]", "optional": true } + { "name": "scale_factors", "type": "float32[]?" } ], "outputs": [ { "type": "Tensor" } @@ -14809,8 +15808,8 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14822,8 +15821,8 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14834,9 +15833,9 @@ "category": "Layer", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt[]", "optional": true }, + { "name": "output_size", "type": "SymInt[]?" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scale_factors", "type": "float32[]", "optional": true } + { "name": "scale_factors", "type": "float32[]?" } ], "outputs": [ { "type": "Tensor" } @@ -14849,8 +15848,8 @@ { "name": "output_size", "type": "SymInt[2]" }, { "name": "input_size", "type": "SymInt[4]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14863,8 +15862,8 @@ { "name": "output_size", "type": "SymInt[2]" }, { "name": "input_size", "type": "SymInt[4]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14876,7 +15875,7 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[1]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales", "type": "float32", "optional": true, "default": null } + { "name": "scales", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14888,7 +15887,7 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[1]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales", "type": "float32", "optional": true, "default": null } + { "name": "scales", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14898,9 +15897,9 @@ "name": "aten::upsample_linear1d.vec", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt[]", "optional": true }, + { "name": "output_size", "type": "SymInt[]?" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scale_factors", "type": "float32[]", "optional": true } + { "name": "scale_factors", "type": "float32[]?" } ], "outputs": [ { "type": "Tensor" } @@ -14912,7 +15911,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[1]" }, - { "name": "scales", "type": "float32", "optional": true, "default": null } + { "name": "scales", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14923,7 +15922,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[1]" }, - { "name": "scales", "type": "float32", "optional": true, "default": null } + { "name": "scales", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14934,8 +15933,8 @@ "category": "Layer", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt[]", "optional": true }, - { "name": "scale_factors", "type": "float32[]", "optional": true } + { "name": "output_size", "type": "SymInt[]?" }, + { "name": "scale_factors", "type": "float32[]?" } ], "outputs": [ { "type": "Tensor" } @@ -14947,8 +15946,8 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14959,8 +15958,8 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14971,8 +15970,8 @@ "category": "Layer", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt[]", "optional": true }, - { "name": "scale_factors", "type": "float32[]", "optional": true } + { "name": "output_size", "type": "SymInt[]?" }, + { "name": "scale_factors", "type": "float32[]?" } ], "outputs": [ { "type": "Tensor" } @@ -14984,8 +15983,8 @@ { "name": "grad_output", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, { "name": "input_size", "type": "SymInt[4]" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -14997,8 +15996,8 @@ { "name": "grad_output", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[2]" }, { "name": "input_size", "type": "SymInt[4]" }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -15010,9 +16009,9 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[3]" }, - { "name": "scales_d", "type": "float32", "optional": true, "default": null }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_d", "type": "float32?", "default": null }, + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -15023,9 +16022,9 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[3]" }, - { "name": "scales_d", "type": "float32", "optional": true, "default": null }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_d", "type": "float32?", "default": null }, + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -15036,8 +16035,8 @@ "category": "Layer", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt[]", "optional": true }, - { "name": "scale_factors", "type": "float32[]", "optional": true } + { "name": "output_size", "type": "SymInt[]?" }, + { "name": "scale_factors", "type": "float32[]?" } ], "outputs": [ { "type": "Tensor" } @@ -15049,9 +16048,9 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[3]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_d", "type": "float32", "optional": true, "default": null }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_d", "type": "float32?", "default": null }, + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -15063,9 +16062,9 @@ { "name": "self", "type": "Tensor" }, { "name": "output_size", "type": "SymInt[3]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_d", "type": "float32", "optional": true, "default": null }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_d", "type": "float32?", "default": null }, + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -15075,9 +16074,9 @@ "name": "aten::upsample_trilinear3d.vec", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "output_size", "type": "SymInt[]", "optional": true }, + { "name": "output_size", "type": "SymInt[]?" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scale_factors", "type": "float32[]", "optional": true } + { "name": "scale_factors", "type": "float32[]?" } ], "outputs": [ { "type": "Tensor" } @@ -15090,9 +16089,9 @@ { "name": "output_size", "type": "SymInt[3]" }, { "name": "input_size", "type": "SymInt[5]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_d", "type": "float32", "optional": true, "default": null }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_d", "type": "float32?", "default": null }, + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } ], "outputs": [ { "type": "Tensor" } @@ -15105,14 +16104,77 @@ { "name": "output_size", "type": "SymInt[3]" }, { "name": "input_size", "type": "SymInt[5]" }, { "name": "align_corners", "type": "boolean" }, - { "name": "scales_d", "type": "float32", "optional": true, "default": null }, - { "name": "scales_h", "type": "float32", "optional": true, "default": null }, - { "name": "scales_w", "type": "float32", "optional": true, "default": null } + { "name": "scales_d", "type": "float32?", "default": null }, + { "name": "scales_h", "type": "float32?", "default": null }, + { "name": "scales_w", "type": "float32?", "default": null } + ], + "outputs": [ + { "type": "Tensor" } + ] + }, + { + "name": "aten::values", + "inputs": [ + { "name": "self", "type": "Tensor" } ], "outputs": [ { "type": "Tensor" } ] }, + { + "name": "aten::values.Tensor", + "inputs": [ + { "name": "self", "type": "Dict(Tensor, t)" } + ], + "outputs": [ + { "type": "t[]" } + ] + }, + { + "name": "aten::values.bool", + "inputs": [ + { "name": "self", "type": "Dict(boolean, t)" } + ], + "outputs": [ + { "type": "t[]" } + ] + }, + { + "name": "aten::values.complex", + "inputs": [ + { "name": "self", "type": "Dict(complex, t)" } + ], + "outputs": [ + { "type": "t[]" } + ] + }, + { + "name": "aten::values.float", + "inputs": [ + { "name": "self", "type": "Dict(float32, t)" } + ], + "outputs": [ + { "type": "t[]" } + ] + }, + { + "name": "aten::values.int", + "inputs": [ + { "name": "self", "type": "Dict(int64, t)" } + ], + "outputs": [ + { "type": "t[]" } + ] + }, + { + "name": "aten::values.str", + "inputs": [ + { "name": "self", "type": "Dict(string, t)" } + ], + "outputs": [ + { "type": "t[]" } + ] + }, { "name": "aten::var", "inputs": [ @@ -15127,8 +16189,8 @@ "name": "aten::var.correction", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -15140,7 +16202,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, - { "name": "correction", "type": "Scalar", "default": null, "optional": true, "kwarg_only": true }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -15152,7 +16214,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -15163,8 +16225,8 @@ "name": "aten::var.correction_out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -15175,7 +16237,7 @@ "name": "aten::var.dim", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "unbiased", "type": "boolean", "default": true }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -15211,7 +16273,7 @@ "name": "aten::var.out", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "unbiased", "type": "boolean", "default": true }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -15234,8 +16296,8 @@ "name": "aten::var_mean.correction", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true, "default": null }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "dim", "type": "int64[1]?", "default": null }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -15248,7 +16310,7 @@ "inputs": [ { "name": "self", "type": "Tensor" }, { "name": "dim", "type": "Dimname[1]" }, - { "name": "correction", "type": "Scalar", "optional": true, "default": null, "kwarg_only": true }, + { "name": "correction", "type": "Scalar?", "default": null, "kwarg_only": true }, { "name": "keepdim", "type": "boolean", "default": false, "kwarg_only": true } ], "outputs": [ @@ -15260,7 +16322,7 @@ "name": "aten::var_mean.dim", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dim", "type": "int64[1]", "optional": true }, + { "name": "dim", "type": "int64[1]?" }, { "name": "unbiased", "type": "boolean", "default": true }, { "name": "keepdim", "type": "boolean", "default": false } ], @@ -15411,9 +16473,17 @@ "inputs": [ { "name": "self", "type": "Future(t)" } ], - "outputs": [ - { "type": "t" } - ] + "outputs": [ + { "type": "t" } + ] + }, + { + "name": "aten::warn", + "inputs": [ + { "name": "message", "type": "string" }, + { "name": "stacklevel", "type": "int64", "default": 2 } + ], + "outputs": [] }, { "name": "aten::where", @@ -15492,10 +16562,10 @@ "name": "aten::zeros", "inputs": [ { "name": "size", "type": "SymInt[]" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -15505,11 +16575,11 @@ "name": "aten::zeros.names", "inputs": [ { "name": "size", "type": "int64[]" }, - { "name": "names", "type": "Dimname[]", "optional": true, "kwarg_only": true }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true } + { "name": "names", "type": "Dimname[]?", "kwarg_only": true }, + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -15528,11 +16598,11 @@ "name": "aten::zeros_like", "inputs": [ { "name": "self", "type": "Tensor" }, - { "name": "dtype", "type": "ScalarType", "optional": true, "default": null, "kwarg_only": true }, - { "name": "layout", "type": "Layout", "optional": true, "default": null, "kwarg_only": true }, - { "name": "device", "type": "Device", "optional": true, "default": null, "kwarg_only": true }, - { "name": "pin_memory", "type": "boolean", "optional": true, "default": null, "kwarg_only": true }, - { "name": "memory_format", "type": "MemoryFormat", "optional": true, "default": null, "kwarg_only": true } + { "name": "dtype", "type": "ScalarType?", "default": null, "kwarg_only": true }, + { "name": "layout", "type": "Layout?", "default": null, "kwarg_only": true }, + { "name": "device", "type": "Device?", "default": null, "kwarg_only": true }, + { "name": "pin_memory", "type": "boolean?", "default": null, "kwarg_only": true }, + { "name": "memory_format", "type": "MemoryFormat?", "default": null, "kwarg_only": true } ], "outputs": [ { "type": "Tensor" } @@ -15552,13 +16622,13 @@ "name": "prepacked::conv2d_clamp_prepack", "inputs": [ { "name": "W", "type": "Tensor" }, - { "name": "B", "type": "Tensor", "optional": true }, + { "name": "B", "type": "Tensor?" }, { "name": "stride", "type": "int64[2]" }, { "name": "padding", "type": "int64[2]" }, { "name": "dilation", "type": "int64[2]" }, { "name": "groups", "type": "int64" }, - { "name": "output_min", "type": "Scalar", "optional": true, "default": null }, - { "name": "output_max", "type": "Scalar", "optional": true, "default": null } + { "name": "output_min", "type": "Scalar?", "default": null }, + { "name": "output_max", "type": "Scalar?", "default": null } ], "outputs": [ { "type": "__torch__.torch.classes.xnnpack.Conv2dOpContext" } @@ -15590,9 +16660,9 @@ "name": "prepacked::linear_clamp_prepack", "inputs": [ { "name": "W", "type": "Tensor" }, - { "name": "B", "type": "Tensor", "optional": true, "default": null }, - { "name": "output_min", "type": "Scalar", "optional": true, "default": null }, - { "name": "output_max", "type": "Scalar", "optional": true, "default": null } + { "name": "B", "type": "Tensor?", "default": null }, + { "name": "output_min", "type": "Scalar?", "default": null }, + { "name": "output_max", "type": "Scalar?", "default": null } ], "outputs": [ { "type": "__torch__.torch.classes.xnnpack.LinearOpContext" } @@ -15738,7 +16808,7 @@ "name": "prim::RaiseException", "inputs": [ { "name": "msg", "type": "string" }, - { "name": "cls", "type": "string", "optional": true, "default": null } + { "name": "cls", "type": "string?", "default": null } ], "outputs": [] }, @@ -15810,6 +16880,42 @@ { "type": "Tensor" } ] }, + { + "name": "prim::abs.Scalar", + "inputs": [ + { "name": "a", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "prim::abs.complex", + "inputs": [ + { "name": "a", "type": "complex" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::abs.float", + "inputs": [ + { "name": "a", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::abs.int", + "inputs": [ + { "name": "a", "type": "int64" } + ], + "outputs": [ + { "type": "int64" } + ] + }, { "name": "prim::data", "inputs": [ @@ -15849,7 +16955,7 @@ { "name": "prim::id", "inputs": [ - { "name": "x", "type": "AnyClassType", "optional": true } + { "name": "x", "type": "AnyClassType?" } ], "outputs": [ { "type": "int64" } @@ -15861,7 +16967,7 @@ { "name": "self", "type": "Device" } ], "outputs": [ - { "type": "int64", "optional": true } + { "type": "int64?" } ] }, { @@ -15999,6 +17105,15 @@ { "type": "boolean" } ] }, + { + "name": "prim::isinstance", + "inputs": [ + { "name": "to_check", "type": "Any" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, { "name": "prim::itemsize", "inputs": [ @@ -16017,13 +17132,227 @@ { "type": "Layout" } ] }, + { + "name": "prim::max", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "prim::max.bool_list", + "inputs": [ + { "name": "l", "type": "boolean[]" }, + { "name": "r", "type": "boolean[]" } + ], + "outputs": [ + { "type": "boolean[]" } + ] + }, + { + "name": "prim::max.float", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::max.float_int", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::max.float_list", + "inputs": [ + { "name": "l", "type": "float32[]" }, + { "name": "r", "type": "float32[]" } + ], + "outputs": [ + { "type": "float32[]" } + ] + }, + { + "name": "prim::max.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "int64" } + ] + }, + { + "name": "prim::max.int_float", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::max.int_list", + "inputs": [ + { "name": "l", "type": "int64[]" }, + { "name": "r", "type": "int64[]" } + ], + "outputs": [ + { "type": "int64[]" } + ] + }, + { + "name": "prim::max.self_bool", + "inputs": [ + { "name": "self", "type": "boolean[]" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "prim::max.self_float", + "inputs": [ + { "name": "self", "type": "float32[]" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::max.self_int", + "inputs": [ + { "name": "self", "type": "int64[]" } + ], + "outputs": [ + { "type": "int64" } + ] + }, + { + "name": "prim::min", + "inputs": [ + { "name": "a", "type": "Scalar" }, + { "name": "b", "type": "Scalar" } + ], + "outputs": [ + { "type": "Scalar" } + ] + }, + { + "name": "prim::min.bool_list", + "inputs": [ + { "name": "l", "type": "boolean[]" }, + { "name": "r", "type": "boolean[]" } + ], + "outputs": [ + { "type": "boolean[]" } + ] + }, + { + "name": "prim::min.float", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::min.float_int", + "inputs": [ + { "name": "a", "type": "float32" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::min.float_list", + "inputs": [ + { "name": "l", "type": "float32[]" }, + { "name": "r", "type": "float32[]" } + ], + "outputs": [ + { "type": "float32[]" } + ] + }, + { + "name": "prim::min.int", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "int64" } + ], + "outputs": [ + { "type": "int64" } + ] + }, + { + "name": "prim::min.int_float", + "inputs": [ + { "name": "a", "type": "int64" }, + { "name": "b", "type": "float32" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::min.int_list", + "inputs": [ + { "name": "l", "type": "int64[]" }, + { "name": "r", "type": "int64[]" } + ], + "outputs": [ + { "type": "int64[]" } + ] + }, + { + "name": "prim::min.self_bool", + "inputs": [ + { "name": "self", "type": "boolean[]" } + ], + "outputs": [ + { "type": "boolean" } + ] + }, + { + "name": "prim::min.self_float", + "inputs": [ + { "name": "self", "type": "float32[]" } + ], + "outputs": [ + { "type": "float32" } + ] + }, + { + "name": "prim::min.self_int", + "inputs": [ + { "name": "self", "type": "int64[]" } + ], + "outputs": [ + { "type": "int64" } + ] + }, { "name": "prim::name", "inputs": [ { "name": "a", "type": "Tensor" } ], "outputs": [ - { "type": "string", "optional": true } + { "type": "string?" } ] }, { @@ -16053,6 +17382,15 @@ { "type": "boolean" } ] }, + { + "name": "prim::shape", + "inputs": [ + { "name": "self", "type": "Tensor" } + ], + "outputs": [ + { "type": "int64[]" } + ] + }, { "name": "prim::type", "inputs": [ @@ -16074,7 +17412,7 @@ { "name": "prim::unchecked_unwrap_optional", "inputs": [ - { "name": "optional", "type": "t", "optional": true } + { "name": "optional", "type": "t?" } ], "outputs": [ { "type": "t" } @@ -16298,8 +17636,8 @@ "name": "quantized::batch_norm", "inputs": [ { "name": "qx", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "mean", "type": "Tensor" }, { "name": "var", "type": "Tensor" }, { "name": "eps", "type": "float32" }, @@ -16315,8 +17653,8 @@ "category": "Normalization", "inputs": [ { "name": "qx", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "mean", "type": "Tensor" }, { "name": "var", "type": "Tensor" }, { "name": "eps", "type": "float32" }, @@ -16332,8 +17670,8 @@ "category": "Normalization", "inputs": [ { "name": "qx", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "mean", "type": "Tensor" }, { "name": "var", "type": "Tensor" }, { "name": "eps", "type": "float32" }, @@ -16349,8 +17687,8 @@ "category": "Normalization", "inputs": [ { "name": "qx", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "mean", "type": "Tensor" }, { "name": "var", "type": "Tensor" }, { "name": "eps", "type": "float32" }, @@ -16366,8 +17704,8 @@ "category": "Normalization", "inputs": [ { "name": "qx", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "mean", "type": "Tensor" }, { "name": "var", "type": "Tensor" }, { "name": "eps", "type": "float32" }, @@ -16383,8 +17721,8 @@ "category": "Normalization", "inputs": [ { "name": "qx", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "mean", "type": "Tensor" }, { "name": "var", "type": "Tensor" }, { "name": "eps", "type": "float32" }, @@ -16400,8 +17738,8 @@ "category": "Normalization", "inputs": [ { "name": "qx", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "mean", "type": "Tensor" }, { "name": "var", "type": "Tensor" }, { "name": "eps", "type": "float32" }, @@ -16417,8 +17755,8 @@ "category": "Normalization", "inputs": [ { "name": "qx", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "mean", "type": "Tensor" }, { "name": "var", "type": "Tensor" }, { "name": "eps", "type": "float32" }, @@ -16435,8 +17773,8 @@ "inputs": [ { "name": "qx", "type": "Tensor[]" }, { "name": "dim", "type": "int64" }, - { "name": "scale", "type": "float32", "optional": true }, - { "name": "zero_point", "type": "int64", "optional": true } + { "name": "scale", "type": "float32?" }, + { "name": "zero_point", "type": "int64?" } ], "outputs": [ { "type": "Tensor" } @@ -16448,8 +17786,8 @@ "inputs": [ { "name": "qx", "type": "Tensor[]" }, { "name": "dim", "type": "int64" }, - { "name": "scale", "type": "float32", "optional": true }, - { "name": "zero_point", "type": "int64", "optional": true } + { "name": "scale", "type": "float32?" }, + { "name": "zero_point", "type": "int64?" } ], "outputs": [ { "type": "Tensor" } @@ -16485,7 +17823,7 @@ "name": "quantized::conv1d_prepack", "inputs": [ { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "int64[]" }, { "name": "padding", "type": "int64[]" }, { "name": "dilation", "type": "int64[]" }, @@ -16589,7 +17927,7 @@ "name": "quantized::conv2d_prepack", "inputs": [ { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "int64[]" }, { "name": "padding", "type": "int64[]" }, { "name": "dilation", "type": "int64[]" }, @@ -16654,7 +17992,7 @@ ], "outputs": [ { "name": "unpacked_weights", "type": "Tensor" }, - { "name": "B_origin", "type": "Tensor", "optional": true } + { "name": "B_origin", "type": "Tensor?" } ] }, { @@ -16700,7 +18038,7 @@ "name": "quantized::conv3d_prepack", "inputs": [ { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "int64[]" }, { "name": "padding", "type": "int64[]" }, { "name": "dilation", "type": "int64[]" }, @@ -16744,7 +18082,7 @@ "name": "quantized::conv_prepack", "inputs": [ { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "int64[]" }, { "name": "padding", "type": "int64[]" }, { "name": "dilation", "type": "int64[]" }, @@ -16758,7 +18096,7 @@ "name": "quantized::conv_transpose1d_prepack", "inputs": [ { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "int64[]" }, { "name": "padding", "type": "int64[]" }, { "name": "output_padding", "type": "int64[]" }, @@ -16832,7 +18170,7 @@ "name": "quantized::conv_transpose2d_prepack", "inputs": [ { "name": "weight", "type": "Tensor" }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "bias", "type": "Tensor?" }, { "name": "stride", "type": "int64[]" }, { "name": "padding", "type": "int64[]" }, { "name": "output_padding", "type": "int64[]" }, @@ -16868,7 +18206,7 @@ ], "outputs": [ { "name": "unpacked_weights", "type": "Tensor" }, - { "name": "B_origin", "type": "Tensor", "optional": true } + { "name": "B_origin", "type": "Tensor?" } ] }, { @@ -16876,12 +18214,12 @@ "inputs": [ { "name": "weight", "type": "Tensor" }, { "name": "indices", "type": "Tensor" }, - { "name": "offsets", "type": "Tensor", "optional": true, "default": null }, + { "name": "offsets", "type": "Tensor?", "default": null }, { "name": "scale_grad_by_freq", "type": "boolean", "default": false }, { "name": "mode", "type": "int64", "default": 0 }, { "name": "pruned_weights", "type": "boolean", "default": false }, - { "name": "per_sample_weights", "type": "Tensor", "optional": true, "default": null }, - { "name": "compressed_indices_mapping", "type": "Tensor", "optional": true, "default": null }, + { "name": "per_sample_weights", "type": "Tensor?", "default": null }, + { "name": "compressed_indices_mapping", "type": "Tensor?", "default": null }, { "name": "include_last_offset", "type": "boolean", "default": false } ], "outputs": [ @@ -16893,12 +18231,12 @@ "inputs": [ { "name": "weight", "type": "Tensor" }, { "name": "indices", "type": "Tensor" }, - { "name": "offsets", "type": "Tensor", "optional": true, "default": null }, + { "name": "offsets", "type": "Tensor?", "default": null }, { "name": "scale_grad_by_freq", "type": "boolean", "default": false }, { "name": "mode", "type": "int64", "default": 0 }, { "name": "pruned_weights", "type": "boolean", "default": false }, - { "name": "per_sample_weights", "type": "Tensor", "optional": true, "default": null }, - { "name": "compressed_indices_mapping", "type": "Tensor", "optional": true, "default": null }, + { "name": "per_sample_weights", "type": "Tensor?", "default": null }, + { "name": "compressed_indices_mapping", "type": "Tensor?", "default": null }, { "name": "include_last_offset", "type": "boolean", "default": false } ], "outputs": [ @@ -16932,8 +18270,8 @@ "name": "quantized::instance_norm", "inputs": [ { "name": "input", "type": "Tensor" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "eps", "type": "float32" }, { "name": "output_scale", "type": "float32" }, { "name": "output_zero_point", "type": "int64" } @@ -16948,8 +18286,8 @@ "inputs": [ { "name": "input", "type": "Tensor" }, { "name": "normalized_shape", "type": "int64[]" }, - { "name": "weight", "type": "Tensor", "optional": true }, - { "name": "bias", "type": "Tensor", "optional": true }, + { "name": "weight", "type": "Tensor?" }, + { "name": "bias", "type": "Tensor?" }, { "name": "eps", "type": "float32" }, { "name": "output_scale", "type": "float32" }, { "name": "output_zero_point", "type": "int64" } @@ -17001,7 +18339,7 @@ "name": "quantized::linear_prepack_fp16", "inputs": [ { "name": "W", "type": "Tensor" }, - { "name": "B", "type": "Tensor", "optional": true, "default": null } + { "name": "B", "type": "Tensor?", "default": null } ], "outputs": [ { "name": "W_prepack", "type": "__torch__.torch.classes.quantized.LinearPackedParamsBase" } @@ -17011,7 +18349,7 @@ "name": "quantized::linear_prepack_fp16_legacy", "inputs": [ { "name": "W", "type": "Tensor" }, - { "name": "B", "type": "Tensor", "optional": true, "default": null } + { "name": "B", "type": "Tensor?", "default": null } ], "outputs": [ { "name": "W_prepack", "type": "Tensor" } diff --git a/source/pytorch.js b/source/pytorch.js index f6db6b9d1d..1bd8830953 100644 --- a/source/pytorch.js +++ b/source/pytorch.js @@ -122,6 +122,8 @@ pytorch.Graph = class { initializers.set(obj, obj); } queue.push(obj); + } else if (pytorch.Utility.isInstance(obj, 'torch.Value') || pytorch.Utility.isInstance(obj, 'torch.Node')) { + continue; } else if (obj && obj.__class__) { obj.__parent__ = module; obj.__name__ = obj.__name__ || key; @@ -145,18 +147,29 @@ pytorch.Graph = class { node === graph.return_node()) { continue; } - if (node.kind() === 'prim::ListConstruct' && - node.outputs().length === 1 && - node.outputs().every((output) => output.uses().length === 1) && - node.inputs().every((input) => pytorch.Utility.isTensor(input.value))) { - continue; - } - if (node.kind() === 'prim::ListConstruct' && + if (node.kind() === 'prim::TupleConstruct' && node.inputs().length === 0 && node.outputs().length === 1 && node.outputs().every((output) => output.uses().length === 0)) { continue; } + if (node.kind() === 'prim::ListConstruct') { + if (node.outputs().length === 1 && + node.outputs().every((output) => output.uses().length === 1) && + node.inputs().every((input) => pytorch.Utility.isTensor(input.value))) { + continue; + } + if (node.inputs().length === 0 && + node.outputs().length === 1 && + node.outputs().every((output) => output.uses().length === 0)) { + continue; + } + if (node.inputs().every((value) => value && (pytorch.Utility.isInstance(value.type(), 'torch.IntType') || pytorch.Utility.isInstance(value.type(), 'torch.FloatType') || pytorch.Utility.isInstance(value.type(), 'torch.StringType') || pytorch.Utility.isInstance(value.type(), 'torch.ComplexType'))) && + node.outputs().length === 1 && + node.outputs().every((output) => output.uses().length === 1)) { + continue; + } + } if (node.kind() === 'prim::ListUnpack' && node.inputs().length === 1 && node.inputs().every((input) => input.uses().length === 1) && @@ -450,6 +463,30 @@ pytorch.Node = class { const value = values.map(identifier); argument = new pytorch.Argument(name, [value]); } + } else if (pytorch.Utility.isInstance(input, 'torch.Value') && !pytorch.Utility.isTensor(input.value)) { + if (input.node() === null && input.value !== undefined) { + argument = new pytorch.Argument(name, input.value, 'attribute'); + } else if (pytorch.Utility.isInstance(input.type(), 'torch.ListType')) { + if (input.node() && input.node().kind() === 'prim::ListConstruct' && input.uses().length === 1 && + input.node().inputs().every((value) => pytorch.Utility.isInstance(value.type(), 'torch.IntType') || pytorch.Utility.isInstance(value.type(), 'torch.FloatType') || pytorch.Utility.isInstance(value.type(), 'torch.StringType') || pytorch.Utility.isInstance(value.type(), 'torch.ComplexType') || pytorch.Utility.isInstance(value.type(), 'torch.TensorType'))) { + const list = input.node().inputs(); + const args = list.map((value) => { + if (value.uses().length === 1 && value.node() === input.node() && value.value !== undefined) { + return value.value; + } + const identifier = value.unique().toString(); + return values.map(identifier); + }); + argument = new pytorch.Argument(name, args, pytorch.Utility.toType(input.type())); + } else { + const identifier = input.unique().toString(); + argument = new pytorch.Argument(name, [values.map(identifier)]); + } + } else { + const identifier = input.unique().toString(); + const value = values.map(identifier); + argument = new pytorch.Argument(name, [value]); + } } else if (pytorch.Utility.isTensor(input.value) || input.value === undefined || input.value === null) { let list = [input]; if (input.node() && @@ -473,10 +510,6 @@ pytorch.Node = class { return values.map(identifier); }); argument = new pytorch.Argument(name, args); - } else if (pytorch.Utility.isInstance(input, 'torch.Value')) { - const identifier = input.unique().toString(); - const value = values.map(identifier); - argument = new pytorch.Argument(name, [value]); } else if (Array.isArray(input.value) && input.value.some((value) => pytorch.Utility.isInstance(value, 'torch.Value'))) { const args = input.value.map((value) => { if (pytorch.Utility.isInstance(value, 'torch.Value')) { @@ -1154,6 +1187,7 @@ pytorch.Container.Zip = class extends pytorch.Container { let torchscript = reader.has_record('constants.pkl'); const version = reader.version(); if (torchscript) { + execution.trace = false; const module = torch.jit.load(reader); execution.trace = true; if (module.data && module.data.forward) { @@ -1222,6 +1256,7 @@ pytorch.Container.ModelJson = class extends pytorch.Container { this.producer = this._model.producerName + (this._model.producerVersion ? ` v${this._model.producerVersion}` : ''); } this.format = reader.has_record('attributes.pkl') ? 'TorchScript v1.1' : 'TorchScript v1.0'; + execution.false = true; const module = torch.jit.load(reader); execution.trace = true; if (module.data && module.data.forward) { @@ -1826,6 +1861,100 @@ pytorch.Execution = class extends python.Execution { torch._C.ClassType = torch.ClassType; } + toType(type, types) { + const torch = this.torch; + switch (type) { + case undefined: return null; + case 'boolean': return new torch.BoolType(); + case 'boolean[3]': + case 'boolean[]': return new torch.ListType(new torch.BoolType()); + case 'boolean?': return new torch.OptionalType(new torch.BoolType()); + case 'int64': return new torch.IntType(); + case 'int64[1]': case 'int64[2]': case 'int64[3]': + case 'int64[]': return new torch.ListType(new torch.IntType()); + case 'int64?': return new torch.OptionalType(new torch.IntType()); + case 'int64[1]?': case 'int64[2]?': + case 'int64[]?': return new torch.OptionalType(new torch.ListType(new torch.IntType())); + case 'SymInt': return new torch.SymIntType(); + case 'SymInt[1]': case 'SymInt[2]': case 'SymInt[3]': + case 'SymInt[4]': case 'SymInt[5]': case 'SymInt[6]': + case 'SymInt[]': return new torch.ListType(new torch.SymIntType()); + case 'SymInt?': return new torch.OptionalType(new torch.SymIntType()); + case 'SymInt[1]?': + case 'SymInt[]?': return new torch.OptionalType(new torch.ListType(new torch.SymIntType())); + case 'float32': return new torch.FloatType(); + case 'float32[]': return new torch.ListType(new torch.FloatType()); + case 'float32?': return new torch.OptionalType(new torch.FloatType()); + case 'float32[]?': return new torch.OptionalType(new torch.ListType(new torch.FloatType())); + case 'string': return new torch.StringType(); + case 'string[]': return new torch.ListType(new torch.StringType()); + case 'string[][]': return new torch.ListType(new torch.ListType(new torch.StringType())); + case 'string?': return new torch.OptionalType(new torch.StringType()); + case 'complex': return new torch.ComplexType(); + case 'complex[]': return new torch.ListType(new torch.ComplexType()); + case 'Tensor': return new torch.TensorType(); + case 'Tensor[]': return new torch.ListType(new torch.TensorType()); + case 'Tensor?': return new torch.OptionalType(new torch.TensorType()); + case 'Tensor?[]': return new torch.ListType(new torch.OptionalType(new torch.TensorType())); + case 'Scalar': return new torch.NumberType(); + case 'Scalar?': return new torch.OptionalType(new torch.NumberType()); + case 'ScalarType': return new torch.Type('ScalarType'); + case 'ScalarType?': return new torch.OptionalType(new torch.Type('ScalarType')); + case 'Layout': return new torch.Type('Layout'); + case 'Layout?': return new torch.OptionalType(new torch.Type('Layout')); + case 'Device': return new torch.DeviceObjType(); + case 'Device?': return new torch.OptionalType(new torch.DeviceObjType()); + case 'MemoryFormat': return new torch.Type('MemoryFormat'); + case 'MemoryFormat?': return new torch.OptionalType(new torch.Type('MemoryFormat')); + case 'Dimname': return new torch.StringType(); + case 'Dimname[1]': + case 'Dimname[]': return new torch.ListType(new torch.StringType()); + case 'Dimname[]?': return new torch.OptionalType(new torch.ListType(new torch.StringType())); + case 'Generator': return new torch._C._GeneratorType(); + case 'Generator?': return new torch.OptionalType(new torch._C._GeneratorType()); + case 'Any': return new torch.AnyType(); + case 'Any[]': return new torch.ListType(new torch.AnyType()); + case 'AnyEnumType': return new torch.Type(); + case 't[]': return new torch.ListType(new torch.Type('VarType')); + case 't?': return new torch.OptionalType(new torch.Type('VarType')); + case 't': case 't1': case 't2': case 'tVal': { + if (types && types.has(type)) { + return types.get(type); + } + return new torch.Type('VarType'); + } + case 'Future(t)': return new torch.FutureType(new torch.Type('VarType')); + case 'AnyClassType': return null; + case 'AnyClassType?': return new torch.OptionalType(null); + case 'Dict(string, tVal)': + case 'Dict(string, t)': return new torch.DictType(new torch.StringType(), new torch.Type()); + case 'Dict(string, Tensor)': return new torch.DictType(new torch.StringType(), new torch.TensorType()); + case 'Dict(int64, tVal)': + case 'Dict(int64, t)': return new torch.DictType(new torch.IntType(), new torch.Type()); + case 'Dict(float32, tVal)': + case 'Dict(float32, t)': return new torch.DictType(new torch.FloatType(), new torch.Type()); + case 'Dict(boolean, tVal)': + case 'Dict(boolean, t)': return new torch.DictType(new torch.BoolType(), new torch.Type()); + case 'Dict(complex, tVal)': + case 'Dict(complex, t)': return new torch.DictType(new torch.ComplexType(), new torch.Type()); + case 'Dict(Tensor, t)': + case 'Dict(Tensor, tVal)': return new torch.DictType(new torch.TensorType(), new torch.Type()); + case '(boolean, tVal)[]': return new torch.ListType(new torch.TupleType([new torch.BoolType(), new torch.Type()])); + case '(float32, tVal)[]': return new torch.ListType(new torch.TupleType([new torch.FloatType(), new torch.Type()])); + case '(int64, tVal)[]': return new torch.ListType(new torch.TupleType([new torch.IntType(), new torch.Type()])); + case '(string, tVal)[]': return new torch.ListType(new torch.TupleType([new torch.StringType(), new torch.Type()])); + case '(complex, tVal)[]': return new torch.ListType(new torch.TupleType([new torch.ComplexType(), new torch.Type()])); + case '(Tensor, tVal)[]': return new torch.ListType(new torch.TupleType([new torch.TensorType(), new torch.Type()])); + default: { + if (type.startsWith('__torch__.')) { + return new torch.ClassType(type); + } + break; + } + } + throw new pytorch.Error(`Unsupported argument type '${type}'.`); + } + registerMetadata(metadata) { const torch = this.torch; const registry = torch._C._get_registry(); @@ -1833,67 +1962,8 @@ pytorch.Execution = class extends python.Execution { for (const [name, type] of metadata._types) { if (name.indexOf('::') !== -1) { const [name, overload_name] = type.name.split('.'); - const real_type = (arg) => { - if (!arg.type) { - return null; - } - let type = null; - switch (arg.type) { - case 'boolean': type = new torch.BoolType(); break; - case 'boolean[3]': - case 'boolean[]': type = new torch.ListType(new torch.BoolType()); break; - case 'int64': type = new torch.IntType(); break; - case 'int64[1]': case 'int64[2]': case 'int64[3]': - case 'int64[]': type = new torch.ListType(new torch.IntType()); break; - case 'SymInt': type = new torch.SymIntType(); break; - case 'SymInt[1]': case 'SymInt[2]': case 'SymInt[3]': - case 'SymInt[4]': case 'SymInt[5]': case 'SymInt[6]': - case 'SymInt[]': type = new torch.ListType(new torch.SymIntType()); break; - case 'float32': type = new torch.FloatType(); break; - case 'float32[]': type = new torch.ListType(new torch.FloatType()); break; - case 'string': type = new torch.StringType(); break; - case 'string[]': type = new torch.ListType(new torch.StringType()); break; - case 'string[][]': type = new torch.ListType(new torch.ListType(new torch.StringType())); break; - case 'complex': type = new torch.ComplexType(); break; - case 'complex[]': type = new torch.ListType(new torch.ComplexType()); break; - case 'Tensor': type = new torch.TensorType(); break; - case 'Tensor[]': type = new torch.ListType(new torch.TensorType()); break; - case 'Scalar': type = new torch.NumberType(); break; - case 'ScalarType': type = new torch.Type('ScalarType'); break; - case 'Layout': type = new torch.Type('Layout'); break; - case 'Device': type = new torch.DeviceObjType(); break; - case 'MemoryFormat': type = new torch.Type('MemoryFormat'); break; - case 'Dimname': type = new torch.StringType(); break; - case 'Dimname[1]': - case 'Dimname[]': type = new torch.ListType(new torch.StringType()); break; - case 'Generator': type = new torch._C._GeneratorType(); break; - case 'Any': type = new torch.AnyType(); break; - case 'Any[]': type = new torch.ListType(new torch.AnyType()); break; - case 'AnyEnumType': type = new torch.Type(); break; - case 't[]': type = new torch.ListType(new torch.Type()); break; - case 't': case 't1': case 't2': type = new torch.Type(); break; - case 'Future(t)': type = new torch.FutureType(new torch.Type()); break; - case 'AnyClassType': type = null; break; - case 'Dict[string,t]': type = new torch.DictType(new torch.StringType(), new torch.Type()); break; - case 'Dict[int64,t]': type = new torch.DictType(new torch.IntType(), new torch.Type()); break; - case 'Dict[float32,t]': type = new torch.DictType(new torch.FloatType(), new torch.Type()); break; - case 'Dict[boolean,t]': type = new torch.DictType(new torch.BoolType(), new torch.Type()); break; - case 'Dict[Tensor,t]': type = new torch.DictType(new torch.TensorType(), new torch.Type()); break; - default: { - if (arg.type.startsWith('__torch__.')) { - type = new torch.ClassType(arg.type); - } else { - throw new pytorch.Error(`Unsupported argument type '${arg.type}'.`); - } - } - } - if (arg.optional) { - type = new torch.OptionalType(type); - } - return type; - }; - const args = type.inputs.map((arg) => new torch.Argument(arg.name, null, real_type(arg), null, arg.default, arg.kwarg_only || false, arg.alias_info)); - const returns = type.outputs.map((arg) => new torch.Argument(arg.name, null, real_type(arg), null, arg.default, arg.kwarg_only || false, arg.alias_info)); + const args = type.inputs.map((arg) => new torch.Argument(arg.name, null, this.toType(arg.type), null, arg.default, arg.kwarg_only || false, arg.alias_info)); + const returns = type.outputs.map((arg) => new torch.Argument(arg.name, null, this.toType(arg.type), null, arg.default, arg.kwarg_only || false, arg.alias_info)); const schema = new torch.FunctionSchema(name, overload_name || '', args, returns, type.is_vararg || false, type.is_varret || false); const op = new torch._C.Operator(schema); registry.registerOperator(op); @@ -2189,6 +2259,7 @@ pytorch.jit.Execution = class extends pytorch.Execution { } if (pytorch.Utility.isTensor(obj)) { value.value = obj; + value.setType(new torch.TensorType()); if (typeof obj !== 'string' && typeof obj !== 'number') { this._values.set(obj, value); } @@ -2261,6 +2332,294 @@ pytorch.jit.Execution = class extends pytorch.Execution { return super.target(expression, context); } + expression(expression, context) { + if (!this.trace) { + return super.expression(expression, context); + } + const torch = this.torch; + switch (expression.type) { + case '=': { + const target = expression.target; + if (target.type === 'id') { + let value = this.expression(expression.expression, context); + if (typeof value === 'string') { + const node = this._graph.create('prim::Constant'); + const input = new torch.Value(node); + input.value = value; + node.addInput(input); + value = node.addOutput(); + value.setType(new torch.StringType()); + } + context.set(target.value, value); + return undefined; + } else if (target.type === 'tuple') { + context.target.push(target.value); + const value = this.expression(expression.expression, context); + context.target.pop(); + if (target.value.every((item) => item.type === 'id')) { + if (value instanceof torch.Value) { + const node = this._graph.create('prim::TupleUnpack'); + node.addInput(value); + const outputs = []; + for (let i = 0; i < target.value.length; i++) { + const item = target.value[i]; + const output = node.addOutput(); + const type = value.type(); + if (type instanceof torch.ListType) { + output.setType(value.type().getElementType()); + } else if (type instanceof torch.TupleType) { + output.setType(type.elements()[i]); + } else { + throw new pytorch.Error(`Unsupported tuple unpack type '${type.kind()}'.`); + } + output.setDebugName(item.value); + context.set(item.value, output); + outputs.push(output); + } + return outputs; + } + if (target.value.length < value.length) { + throw new python.Error(`ValueError: too many values to unpack (expected ${target.value.length}, actual ${value.length}).`); + } + if (target.value.length > value.length) { + throw new python.Error(`ValueError: not enough values to unpack (expected ${target.value.length}, actual ${value.length}).`); + } + for (let i = 0; i < value.length; i++) { + context.set(target.value[i].value, value[i]); + } + return undefined; + } + } + break; + } + case 'call': { + if (expression.target.type === 'id' && expression.target.value === 'annotate') { + let value = this.expression(expression.args[1], context); + const type = this.type(expression.args[0]); + if (value instanceof torch.Tensor) { + let name = null; + if (type instanceof torch.IntType) { + name = 'aten::IntImplicit'; + } else if (type instanceof torch.FloatType) { + name = 'aten::FloatImplicit'; + } else if (type instanceof torch.StringType) { + name = 'aten::StringImplicit'; + } else if (type instanceof torch.ComplexType) { + name = 'aten::ComplexImplicit'; + } else if (type instanceof torch.NumberType) { + name = 'aten::ScalarImplicit'; + } else { + throw new pytorch.Error(`Unsupported annotation type '${type.kind()}'.`); + } + const node = this._graph.create(name); + node.addInput(this.variable(value, node)); + value = node.addOutput(); + } + if (value instanceof torch.Value) { + value.setType(type); + } + return value; + } + if (expression.target.type === 'id' && expression.target.value === 'unchecked_cast') { + let value = this.expression(expression.args[1], context); + const type = this.type(expression.args[0]); + const node = this._graph.create('prim::unchecked_cast'); + node.addInput(this.variable(value)); + value = node.addOutput(); + value.setType(type); + return value; + } + if (expression.target.type === 'id' && expression.target.value === 'isinstance') { + let value = this.expression(expression.args[1], context); + // const type = this.type(expression.args[0]); + const node = this._graph.create('prim::isinstance'); + node.addInput(this.variable(value)); + value = node.addOutput(); + value.setType(new torch.BoolType()); + return value; + } + return super.expression(expression, context); + } + case '[]': { + if (expression.arguments.type === 'list' && expression.arguments.value.length === 1) { + const target = this.expression(expression.target, context); + if (target instanceof torch.Value && target.type() instanceof torch.ListType) { + let index = this.expression(expression.arguments.value[0], context); + const node = this._graph.create('aten::__getitem__.t'); + node.addInput(target); + if (Number.isInteger(index)) { + const value = this.invoke('torch.Value', [node]); + value.value = index; + index = value; + } + node.addInput(index); + const value = node.addOutput(); + value.setType(target.type().getElementType()); + return value; + } + if (target instanceof torch.Value && target.type() instanceof torch.DictType) { + let key = this.expression(expression.arguments.value[0], context); + const node = this._graph.create('aten::__getitem__.t'); + node.addInput(target); + if (target.type().getKeyType() instanceof torch.StringType && typeof key === 'string') { + const value = this.invoke('torch.Value', [node]); + value.value = key; + key = value; + } else { + throw new pytorch.Error(`Unsupported dictionary key type.`); + } + node.addInput(key); + const value = node.addOutput(); + value.setType(target.type().getValueType()); + return value; + } + if (target instanceof torch.Value && target.type() instanceof torch.TupleType) { + let index = this.expression(expression.arguments.value[0], context); + const node = this._graph.create('prim::TupleIndex'); + const value = node.addOutput(); + value.setType(target.type().elements()[index]); + node.addInput(target); + if (Number.isInteger(index)) { + const value = this.invoke('torch.Value', [node]); + value.value = index; + index = value; + } + node.addInput(index); + return value; + } + } + break; + } + case '.': { + if (expression.member.type === 'id') { + const target = this.target(expression.target, context); + if (typeof expression.member.value === 'string' && target instanceof torch.Value && target.type() instanceof torch.ClassType) { + const attribute = target.type().findAttribute(expression.member.value); + const node = this.graph.create('prim::GetAttr'); + const name = new torch.Value(node); + name.setType(new torch.StringType()); + name.value = expression.member.value; + node.addInput(target); + node.addInput(name); + const value = node.addOutput(); + value.setType(attribute); + return value; + } + return target[expression.member.value]; + } + throw new python.Error("Unsupported field expression."); + } + case 'list': { + const list = expression.value.map((item) => this.expression(item, context)); + if (/* list.length > 0 && */ list.every((item) => pytorch.Utility.isInstance(item, 'torch.Value') || Number.isInteger(item) || typeof item === 'string' || item === null)) { + const node = this._graph.create('prim::ListConstruct'); + const output = node.addOutput(); + for (const item of list) { + if (item instanceof torch.Value) { + node.addInput(item); + output.setType(new torch.ListType(item.type())); + } else if (Number.isInteger(item)) { + const value = new torch.Value(node); + value.value = item; + value.setType(new torch.IntType()); + node.addInput(value); + output.setType(new torch.ListType(new torch.IntType())); + } else if (typeof item === 'string') { + const value = new torch.Value(node); + value.value = item; + value.setType(new torch.StringType()); + node.addInput(value); + output.setType(new torch.ListType(new torch.StringType())); + } else { + const value = new torch.Value(node); + value.value = item; + node.addInput(value); + } + } + return output; + } + break; + } + case 'tuple': { + const args = expression.value.map((expression) => this.expression(expression, context)); + const node = this._graph.create('prim::TupleConstruct'); + const types = []; + const elements = []; + for (const item of args) { + if (item instanceof torch.Value) { + node.addInput(item); + types.push(item.type()); + elements.push(item); + } else if (pytorch.Utility.isTensor(item)) { + const value = this.variable(item, node); + node.addInput(value); + // value.value = item; + // value.setType(new torch.TensorType()); + types.push(value.type()); + elements.push(item); + } else if (Number.isInteger(item)) { + const value = new torch.Value(node); + value.value = item; + types.push(new torch.IntType()); + elements.push(item); + } else if (typeof item === 'boolean') { + const value = new torch.Value(node); + value.value = item; + node.addInput(value); + types.push(new torch.BoolType()); + elements.push(item); + } else if (item === null) { + const value = new torch.Value(node); + value.value = item; + node.addInput(value); + types.push(new torch.NoneType()); + elements.push(item); + } else { + const value = new torch.Value(node); + value.value = item; + node.addInput(value); + types.push(new torch.Type()); + elements.push(item); + } + } + const value = node.addOutput(); + value.value = elements; + value.setType(new torch.TupleType(types)); + return value; + } + default: { + break; + } + } + return super.expression(expression, context); + } + + statement(statement, context) { + if (!this.trace) { + return super.statement(statement, context); + } + const torch = this.torch; + switch (statement.type) { + case 'class': { + super.statement(statement, context); + const value = context.get(statement.name); + const type = new torch.ClassType(`${value.__module__}.${value.__name__}`); + for (const entry of statement.body.statements) { + if (entry.type === 'var') { + const variableType = this.type(entry.variableType); + type.addAttribute(entry.name, variableType); + } + } + value.__type__ = type; + return undefined; + } + default: { + break; + } + } + return super.statement(statement, context); + } + type(expression) { const torch = this.torch; if (expression.type === '[]' && expression.target.type === 'id') { @@ -2274,8 +2633,8 @@ pytorch.jit.Execution = class extends pytorch.Execution { return new torch.OptionalType(elementType); } case 'Tuple': { - const args = expression.arguments.value.map((expression) => this.type(expression)); - return new torch.TupleType(args); + const elements = expression.arguments.value.map((expression) => this.type(expression)); + return new torch.TupleType(elements); } case 'Dict': { const key = this.type(expression.arguments.value[0]); @@ -2294,6 +2653,7 @@ pytorch.jit.Execution = class extends pytorch.Execution { case 'str': return new torch.StringType(); case 'float': return new torch.FloatType(); case 'number': return new torch.NumberType(); + case 'bool': return new torch.BoolType(); default: throw new pytorch.Error(`Unsupported type expression '${expression.value}'.`); } } @@ -2301,381 +2661,616 @@ pytorch.jit.Execution = class extends pytorch.Execution { } call(target, name, args, context) { - if (this.trace) { - const overload = this._overload(target, name, args, context); - if (overload) { - const [schema, args, evalArgs] = overload; - const copyArgs = Array.prototype.slice.call(args); - const copyEvalArgs = Array.prototype.slice.call(evalArgs); - const node = this._graph.create(schema.name); - node.schema = schema; - const referencedParameters = []; - const parameters = Array.prototype.slice.call(schema.inputs || []).concat(Array.prototype.slice.call(schema.attributes || [])); - while (copyEvalArgs.length > 0) { - if (parameters.length <= 0) { - if (schema.name.startsWith('_caffe2::')) { - break; - } + if (!this.trace) { + return super.call(target, name, args, context); + } + if (name === '__new__') { + const identifier = pytorch.Utility.target(target); + if (identifier) { + const type = this.resolve(identifier); + if (type && type.__type__) { + const node = this.graph.create('prim::CreateObject'); + const value = node.addOutput(); + value.setType(type.__type__); + return value; + } + } + } + if (name === '__init__') { + const obj = this.expression(target, context); + if (args.length === 0) { + return obj; + } + const node = this.graph.create('prim::CallMethod'); + node.addInput(obj); + const evalArgs = args.map((arg) => this.expression(arg, context)); + for (const arg of evalArgs) { + this.variable(arg, node); + } + const value = node.addOutput(); + value.setType(obj.type()); + return value; + } + const overload = this._overload(target, name, args, context); + if (!overload) { + return super.call(target, name, args, context); + } + const torch = this.torch; + const [schema, evalArgs] = overload; + const copyArgs = Array.prototype.slice.call(args); + const copyEvalArgs = Array.prototype.slice.call(evalArgs); + const node = this._graph.create(schema.name); + node.schema = schema; + const referencedParameters = []; + const parameters = Array.prototype.slice.call(schema.inputs || []).concat(Array.prototype.slice.call(schema.attributes || [])); + const types = new Map(); + while (copyEvalArgs.length > 0) { + if (parameters.length <= 0) { + if (schema.is_vararg || schema.name.startsWith('_caffe2::')) { + break; + } + throw new pytorch.Error('Invalid parameter length.'); + } + if (copyArgs.every((arg) => arg.type === '=' && arg.target && arg.target.type === 'id') && + parameters.every((parameter) => parameter.type !== 'Tensor' && parameter.type !== 'Tensor[]')) { + const map = new Map(parameters.map((parameter) => [parameter.name, parameter])); + while (copyArgs.length > 0) { + const argument = copyArgs.shift(); + const arg = copyEvalArgs.shift(); + const parameter = map.get(argument.target.value); + if (!parameter) { throw new pytorch.Error(); } - if (copyArgs.every((arg) => arg.type === '=' && arg.target && arg.target.type === 'id') && - parameters.every((parameter) => parameter.type !== 'Tensor' && parameter.type !== 'Tensor[]')) { - const map = new Map(parameters.map((parameter) => [parameter.name, parameter])); - while (copyArgs.length > 0) { - const argument = copyArgs.shift(); - const arg = copyEvalArgs.shift(); - const parameter = map.get(argument.target.value); - if (!parameter) { - throw new pytorch.Error(); - } - if (!this.isType(arg, parameter.type)) { - if (parameter.optional) { - continue; - } - throw new pytorch.Error(); - } - const value = this.variable(arg); - value.value = arg; - node.addInput(value); + let type = parameter.type; + let optional = false; + if (parameter.type.endsWith('?')) { + type = parameter.type.substring(0, parameter.type.length - 1); + optional = true; + } + if (!this.isType(arg, type)) { + if (optional) { + continue; } - continue; + throw new pytorch.Error(); } - const parameter = parameters.shift(); - const [argument] = copyEvalArgs; - if (parameter.type === 'Tensor' || (parameter.type === 'Scalar' && pytorch.Utility.isTensor(argument))) { - if (Array.isArray(argument) || (!pytorch.Utility.isTensor(argument) && argument !== null && argument !== undefined)) { - if (parameter.optional) { - continue; + const value = this.variable(arg); + value.value = arg; + node.addInput(value); + } + continue; + } + const parameter = parameters.shift(); + const [argument] = copyEvalArgs; + let match = false; + let input = null; + let optional = false; + let type = parameter.type; + if (type.endsWith('?')) { + type = parameter.type.slice(0, -1); + optional = true; + } + if (optional === true && + (type === 'float32' || type === 'boolean' || type === 'int64' || type === 'complex') && + argument instanceof torch.Value && argument.type() instanceof torch.NoneType) { + copyArgs.shift(); + copyEvalArgs.shift(); + match = true; + input = argument; + } else if (type === 'Tensor[]') { + const [argument] = copyEvalArgs; + if ((argument instanceof torch.Value && pytorch.Utility.toType(argument.type()) === 'Tensor[]') || + (Array.isArray(argument) && argument.every((item) => pytorch.Utility.isTensor(item) || item === null || (item instanceof torch.Value && item.type() instanceof torch.TensorType)))) { + copyArgs.shift(); + copyEvalArgs.shift(); + if (argument instanceof torch.Value) { + match = true; + input = argument; + } else { + const list = this._graph.create('prim::ListConstruct'); + for (const arg of argument) { + const tensor = arg; + if (tensor) { + tensor.__count__ = (tensor.__count__ || 0) + 1; } - throw new pytorch.Error(); - } else { - copyArgs.shift(); - copyEvalArgs.shift(); - const tensor = (argument === null || argument === undefined) ? {} : argument; const value = this.variable(tensor); - referencedParameters.push(tensor); - node.addInput(value); + value.setType(new torch.TensorType()); + list.addInput(value); } - } else if (parameter.type === 'Tensor[]') { - const [argument] = copyEvalArgs; - if (!Array.isArray(argument) || !argument.every((item) => pytorch.Utility.isTensor(item) || item === null)) { - if (parameter.optional) { - continue; - } - throw new pytorch.Error(); - } else { - copyArgs.shift(); - copyEvalArgs.shift(); - - const list = this._graph.create('prim::ListConstruct'); - for (const arg of argument) { - const tensor = arg; - if (tensor) { - tensor.__count__ = (tensor.__count__ || 0) + 1; - } - const value = this.variable(tensor); - list.addInput(value); - } - - const value = list.addOutput(); - node.addInput(value); + const output = list.addOutput(); + output.setType(new torch.ListType(new torch.TensorType())); + match = true; + input = output; + } + } else { + if (optional) { + continue; + } + throw new pytorch.Error(); + } + } else { + const [arg] = copyArgs; + if (!this.isType(argument, type) && argument !== null) { + if (optional) { + continue; + } + throw new pytorch.Error('Invalid argument type.'); + } else if (arg.type === '=') { + throw new pytorch.Error('Expected named argument.'); + } else { + copyArgs.shift(); + copyEvalArgs.shift(); + if (pytorch.Utility.isInstance(argument, 'torch.Value')) { + match = true; + input = argument; + } else { + const value = this.variable(argument); + if (value instanceof torch.Value) { + // value.setType(this.toType(parameter.type)); } + value.value = argument; + match = true; + input = value; + } + } + } + if (match) { + node.addInput(input); + if (type === 't') { + const key = type; + if (input instanceof torch.Value && input.type()) { + types.set(key, input.type()); + } else if (input instanceof torch.Value && Number.isInteger(input.value)) { + types.set(key, new torch.IntType()); + } + // throw new pytorch.Error("Unknown value type 't'."); + } + if (type === 't[]') { + const key = type.replace('[]', ''); + if (input instanceof torch.Value && input.type() instanceof torch.ListType) { + types.set(key, input.type().getElementType()); + } else if (Array.isArray(input) && input.length > 0 && input.every((item) => Number.isInteger(item))) { + types.set(key, new torch.IntType()); + } else if (input.value && Array.isArray(input.value) && input.value.length > 0 && input.value.every((item) => Number.isInteger(item) || isNaN(item))) { + types.set(key, new torch.IntType()); + } else if (input.value && Array.isArray(input.value) && input.value.length > 0 && input.value.every((item) => pytorch.Utility.isTensor(item))) { + types.set(key, new torch.TensorType()); } else { - const [arg] = copyArgs; - if (!this.isType(argument, parameter.type) && argument !== null) { - if (parameter.optional) { - continue; - } - throw new pytorch.Error(); - } else if (arg.type === '=') { - throw new pytorch.Error('Expected named argument.'); - } else { - copyArgs.shift(); - copyEvalArgs.shift(); - const value = this.variable(argument); - node.addInput(value); - value.value = argument; + // throw new pytorch.Error("Unknown value type 't'."); + continue; + } + } + const dict = type.match(/^Dict\((\w+),\s*(\w+)\)$/); + if (dict && (dict[2] === 't' || dict[2] === 'tVal')) { + if (input instanceof torch.Value && input.type() instanceof torch.DictType) { + types.set(dict[2], input.type().getValueType()); + } else if (input.value && Object.values(input.value).every((item) => pytorch.Utility.isTensor(item))) { + types.set(dict[2], input.type().getValueType()); + } else { + throw new pytorch.Error("Unknown dict type 't[]'."); + } + } + const tuple = type.match(/^\((\w+),\s*(\w+)\)\[\]$/); + if (tuple && (tuple[2] === 'tVal')) { + if (input instanceof torch.Value && input.type() instanceof torch.ListType && input.type().getElementType() instanceof torch.TupleType) { + const elements = input.type().getElementType().elements(); + if (elements.length === 2) { + types.set(tuple[2], elements[1]); } } } - const result = []; - for (let i = 0; i < schema.outputs.length; i++) { - const parameter = schema.outputs[i]; - switch (parameter.type) { - case 'Scalar': - case 'Tensor': { - const output = this.invoke('torch.Tensor', []); - output.__origin__ = schema.name; - if (i === 0) { - switch (schema.name) { - case 'aten::conv1d': - case 'aten::embedding': { - output.resize_([NaN, NaN, NaN]); - break; - } - case 'aten::cat': - case 'aten::conv2d': - case 'aten::dropout': - case 'aten::flatten': - case 'aten::flatten.named_out_dim': - case 'aten::max_pool2d': - case 'aten::adaptive_avg_pool2d': - case 'aten::avg_pool2d': - case 'aten::quantize_per_tensor': - case 'aten::relu_': - case 'aten::prelu': - case 'aten::hardtanh_': - case 'aten::upsample_bilinear2d': - case 'prepacked::conv2d_clamp_run': { - const [input] = evalArgs; - if (pytorch.Utility.isTensor(input) && input.size() === undefined) { - input.resize_([NaN, NaN, NaN, NaN]); - } - output.resize_([NaN, NaN, NaN, NaN]); - break; - } - case 'aten::slice': - case 'aten::slice.Tensor': { - const [input] = evalArgs; - if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { - const size = input.size(); - output.resize_(size); - } - break; - } - case 'aten::to': - case 'aten::to.device': - case 'aten::to.dtype': - case 'aten::to.dtype_layout': { - const [input] = evalArgs; - if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { - const size = input.size(); - output.resize_(size); - } - break; - } - case 'aten::conv3d': { - output.resize_([NaN, NaN, NaN, NaN, NaN]); - break; - } - case 'aten::roll': - case 'aten::detach': - case 'aten::mean': - case 'aten::mul': - case 'aten::mul.Scalar': - case 'aten::div': - case 'aten::div.Scalar': - case 'aten::batch_norm': - case 'aten::gelu': - case 'aten::relu': - case 'aten::clamp': - case 'aten::clamp_': - case 'aten::_add_relu_': - case 'aten::hardswish_': { - const [input] = evalArgs; - if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { - output.resize_(input.size()); - } - break; - } - case 'aten::add': - case 'aten::add.Scalar': - case 'aten::sub': - case 'aten::sub.Scalar': { - const [input] = evalArgs; - if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { - output.resize_(input.size()); - } else { - const [, other] = evalArgs; - if (pytorch.Utility.isTensor(other) && Array.isArray(other.size())) { - output.resize_(other.size()); - } - } - break; - } - case 'aten::select': - case 'aten::select.int': { - const [input] = evalArgs; - if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { - output.resize_(Array(input.size().length - 1).fill(NaN)); - } - break; - } - case 'aten::layer_norm': { - const [input, normalized_shape] = evalArgs; - if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { - const shape = input.size(); - if (Array.isArray(normalized_shape) && normalized_shape.length === 1) { - const [value] = normalized_shape; - shape[shape.length - 1] = value; - } - output.resize_(shape); - } - break; - } - case 'aten::empty': - case 'aten::ones': - case 'aten::zeros': - case 'aten::zeros_like': { - output.resize_(evalArgs[0]); - break; + } + } + const result = []; + for (let i = 0; i < schema.outputs.length; i++) { + const parameter = schema.outputs[i]; + const type = parameter.type; + switch (type) { + case 'Tensor': { + const output = this.invoke('torch.Tensor', []); + output.__origin__ = schema.name; + if (i === 0) { + switch (schema.name) { + case 'aten::conv1d': + case 'aten::embedding': { + output.resize_([NaN, NaN, NaN]); + break; + } + case 'aten::cat': + case 'aten::conv2d': + case 'aten::dropout': + case 'aten::flatten': + case 'aten::flatten.named_out_dim': + case 'aten::max_pool2d': + case 'aten::adaptive_avg_pool2d': + case 'aten::avg_pool2d': + case 'aten::quantize_per_tensor': + case 'aten::relu_': + case 'aten::prelu': + case 'aten::hardtanh_': + case 'aten::upsample_bilinear2d': + case 'prepacked::conv2d_clamp_run': { + const [input] = evalArgs; + if (pytorch.Utility.isTensor(input) && input.size() === undefined) { + input.resize_([NaN, NaN, NaN, NaN]); + } + output.resize_([NaN, NaN, NaN, NaN]); + break; + } + case 'aten::slice': + case 'aten::slice.Tensor': { + const [input] = evalArgs; + if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { + const size = input.size(); + output.resize_(size); + } + break; + } + case 'aten::to': + case 'aten::to.device': + case 'aten::to.dtype': + case 'aten::to.dtype_layout': { + const [input] = evalArgs; + if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { + const size = input.size(); + output.resize_(size); + } + break; + } + case 'aten::conv3d': { + output.resize_([NaN, NaN, NaN, NaN, NaN]); + break; + } + case 'aten::roll': + case 'aten::detach': + case 'aten::mean': + case 'aten::mul': + case 'aten::mul.Scalar': + case 'aten::div': + case 'aten::div.Scalar': + case 'aten::batch_norm': + case 'aten::gelu': + case 'aten::relu': + case 'aten::clamp': + case 'aten::clamp_': + case 'aten::_add_relu_': + case 'aten::hardswish_': { + const [input] = evalArgs; + if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { + output.resize_(input.size()); + } + break; + } + case 'aten::add': + case 'aten::add.Scalar': + case 'aten::sub': + case 'aten::sub.Scalar': { + const [input] = evalArgs; + if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { + output.resize_(input.size()); + } else { + const [, other] = evalArgs; + if (pytorch.Utility.isTensor(other) && Array.isArray(other.size())) { + output.resize_(other.size()); } - case 'aten::view': - case 'aten::reshape': - case 'aten::new_full': { - output.resize_(evalArgs[1]); - break; + } + break; + } + case 'aten::select': + case 'aten::select.int': { + const [input] = evalArgs; + if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { + output.resize_(Array(input.size().length - 1).fill(NaN)); + } + break; + } + case 'aten::layer_norm': { + const [input, normalized_shape] = evalArgs; + if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { + const shape = input.size(); + if (Array.isArray(normalized_shape) && normalized_shape.length === 1) { + const [value] = normalized_shape; + shape[shape.length - 1] = value; } - case 'aten::squeeze': - case 'aten::squeeze.dim': { - const [input] = evalArgs; - const size = input.size(); - if (Array.isArray(size)) { - switch (evalArgs.length) { - case 1: { - output.resize_(size.filter((value) => value !== 1)); - break; - } - case 2: { - const [, dim] = evalArgs; - output.resize_(size.filter((value, index) => (value !== 1 && !isNaN(value)) || index !== dim)); - break; - } - default: { - break; - } - } + output.resize_(shape); + } + break; + } + case 'aten::empty': + case 'aten::ones': + case 'aten::zeros': + case 'aten::zeros_like': { + output.resize_(evalArgs[0]); + break; + } + case 'aten::view': + case 'aten::reshape': + case 'aten::new_full': { + output.resize_(evalArgs[1]); + break; + } + case 'aten::squeeze': + case 'aten::squeeze.dim': { + const [input] = evalArgs; + const size = input.size(); + if (Array.isArray(size)) { + switch (evalArgs.length) { + case 1: { + output.resize_(size.filter((value) => value !== 1)); + break; } - break; - } - case 'aten::unsqueeze': { - const [input, dim] = evalArgs; - const size = input.size(); - if (Array.isArray(size) && dim !== undefined) { - const shape = size.slice(); - shape.splice(dim, 0, 1); - output.resize_(shape); - } else { - output.resize_([NaN, NaN, NaN, NaN]); + case 2: { + const [, dim] = evalArgs; + output.resize_(size.filter((value, index) => (value !== 1 && !isNaN(value)) || index !== dim)); + break; } - break; - } - case 'aten::transpose': - case 'aten::transpose.int': { - const [input, dim0, dim1] = evalArgs; - if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { - const size = input.size().slice(); - const d0 = dim0 >= 0 ? dim0 : size.length + dim0; - const d1 = dim1 >= 0 ? dim1 : size.length + dim1; - const value = size[dim0]; - /* eslint-disable prefer-destructuring */ - size[d0] = size[1]; - /* eslint-enable prefer-destructuring */ - size[d1] = value; - output.resize_(size); + default: { + break; } - break; - } - case 'aten::contiguous': { - const [source] = evalArgs; - output.__source__ = source; - break; } - case 'quantized::cat': - case 'quantized::cat_relu': - case 'quantized::linear': - case 'quantized::conv2d': - case 'quantized::conv2d.new': - case 'quantized::conv2d_relu': - case 'quantized::conv2d_relu.new': - case 'quantized::add': - case 'quantized::add_relu': - output.resize_([NaN, NaN, NaN, NaN]); - output.__quantized__ = true; - break; - default: - break; } + break; } - this.variable(output, node); - result.push(output); - break; - } - case 'Tensor[]': { - let count = 1; - switch (schema.name) { - case 'aten::chunk': - count = node.inputs()[1].value; - break; - case 'aten::meshgrid': { - const list = node.inputs()[0].node(); - if (list.kind() === 'prim::ListConstruct') { - count = list.inputs().length; + case 'aten::unsqueeze': { + const [input, dim] = evalArgs; + if (pytorch.Utility.isTensor(input)) { + const size = input.size(); + if (Array.isArray(size) && dim !== undefined) { + const shape = size.slice(); + shape.splice(dim, 0, 1); + output.resize_(shape); + } else { + output.resize_([NaN, NaN, NaN, NaN]); } - break; } - case 'aten::unbind': - case 'aten::unbind.int': - count = args[0].__tuple__ || count; - break; - case 'aten::broadcast_tensors': - case 'aten::split': - case 'aten::split.Tensor': - case 'aten::split_with_sizes': - if (context.target.length > 0) { - count = context.target[context.target.length - 1].length; - } - break; - default: - break; + break; } - - const value = node.addOutput(); - const list = this._graph.create('prim::ListUnpack'); - list.addInput(value); - - const tensors = []; - for (let i = 0; i < count; i ++) { - const tensor = this.invoke('torch.Tensor', []); - tensor.__origin__ = schema.name; - this.variable(tensor, list); - tensors.push(tensor); + case 'aten::transpose': + case 'aten::transpose.int': { + const [input, dim0, dim1] = evalArgs; + if (pytorch.Utility.isTensor(input) && Array.isArray(input.size())) { + const size = input.size().slice(); + const d0 = dim0 >= 0 ? dim0 : size.length + dim0; + const d1 = dim1 >= 0 ? dim1 : size.length + dim1; + const value = size[dim0]; + /* eslint-disable prefer-destructuring */ + size[d0] = size[1]; + /* eslint-enable prefer-destructuring */ + size[d1] = value; + output.resize_(size); + } + break; } - result.push(tensors); - break; + case 'aten::contiguous': { + const [source] = evalArgs; + output.__source__ = source; + break; + } + case 'quantized::cat': + case 'quantized::cat_relu': + case 'quantized::linear': + case 'quantized::conv2d': + case 'quantized::conv2d.new': + case 'quantized::conv2d_relu': + case 'quantized::conv2d_relu.new': + case 'quantized::add': + case 'quantized::add_relu': + output.resize_([NaN, NaN, NaN, NaN]); + output.__quantized__ = true; + break; + default: + break; } - case '__torch__.torch.classes.quantized.Conv2dPackedParamsBase': - case '__torch__.torch.classes.quantized.Conv3dPackedParamsBase': - case '__torch__.torch.classes.quantized.LinearPackedParamsBase': - case '__torch__.torch.classes.rnn.CellParamsBase': - case '__torch__.torch.classes.xnnpack.Conv2dOpContext': - case '__torch__.torch.classes.xnnpack.LinearOpContext': - case '__torch__.torch.classes.xnnpack.TransposeConv2dOpContext': { - const value = this.invoke(parameter.type, []); - this.variable(value, node); - result.push(value); + } + this.variable(output, node); + result.push(output); + break; + } + case 'Tensor[]': { + let count = 1; + switch (schema.name) { + case 'aten::chunk': + count = node.inputs()[1].value; break; - } - default: { - const output = this.invoke('torch.Tensor', []); - output.resize_([]); - output.__origin__ = schema.name; - this.variable(output, node); - result.push(output); + case 'aten::meshgrid': { + const list = node.inputs()[0].node(); + if (list.kind() === 'prim::ListConstruct') { + count = list.inputs().length; + } break; } + case 'aten::unbind': + case 'aten::unbind.int': + count = args[0].__tuple__ || count; + break; + case 'aten::broadcast_tensors': + case 'aten::split': + case 'aten::split.Tensor': + case 'aten::split_with_sizes': + if (context.target.length > 0) { + count = context.target[context.target.length - 1].length; + } + break; + default: + break; + } + + const value = node.addOutput(); + value.setType(new torch.ListType(new torch.TensorType())); + result.push(value); + + /* + const value = node.addOutput(); + const list = this._graph.create('prim::ListUnpack'); + list.addInput(value); + + const tensors = []; + for (let i = 0; i < count; i ++) { + const tensor = this.invoke('torch.Tensor', []); + tensor.__origin__ = schema.name; + this.variable(tensor, list); + tensors.push(tensor); + } + result.push(tensors); + */ + break; + } + case '__torch__.torch.classes.quantized.Conv2dPackedParamsBase': + case '__torch__.torch.classes.quantized.Conv3dPackedParamsBase': + case '__torch__.torch.classes.quantized.LinearPackedParamsBase': + case '__torch__.torch.classes.rnn.CellParamsBase': + case '__torch__.torch.classes.xnnpack.Conv2dOpContext': + case '__torch__.torch.classes.xnnpack.LinearOpContext': + case '__torch__.torch.classes.xnnpack.TransposeConv2dOpContext': { + const value = this.invoke(parameter.type, []); + this.variable(value, node); + result.push(value); + break; + } + case 'Scalar': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.NumberType()); + result.push(value); + break; + } + case 'boolean': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.BoolType()); + result.push(value); + break; + } + case 'boolean[]': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.ListType(new torch.BoolType())); + result.push(value); + break; + } + case 'string[]': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.ListType(new torch.StringType())); + result.push(value); + break; + } + case 'int64': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.IntType()); + switch (schema.name) { + case 'aten::div.int': value.value = torch.div(evalArgs[0], evalArgs[1]); break; + case 'aten::dim': value.value = torch.dim(evalArgs[0]); break; + case 'aten::len.t': value.value = torch.len(evalArgs[0]); break; + // case 'aten::size.int': value.value = torch.size(evalArgs[0], evalArgs[1]); break; + default: break; + } + result.push(value); + break; + } + case 'int64[]': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.ListType(new torch.IntType())); + switch (schema.name) { + // case 'aten::size': value.value = torch.size(evalArgs[0], evalArgs[1]); break; + default: break; + } + result.push(value); + break; + } + case 'float32': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.FloatType()); + result.push(value); + break; + } + case 'float32[]': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.ListType(new torch.FloatType())); + result.push(value); + break; + } + case 'complex': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.ComplexType()); + result.push(value); + break; + } + case 'string': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.StringType()); + result.push(value); + break; + } + case 'Device': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.DeviceObjType()); + result.push(value); + break; + } + case 'Dict(string, Tensor)': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + value.setType(new torch.DictType(new torch.StringType(), new torch.TensorType())); + result.push(value); + break; + } + case 't': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + const t = types.get('t'); + if (!t) { + throw new pytorch.Error(); } + value.setType(t); + result.push(value); + break; } - for (const referencedParameter of referencedParameters) { - referencedParameter.__count__ = (referencedParameter.__count__ || 0) + 1; + case 't[]': { + const value = this.variable(null, node); + value.__origin__ = schema.name; + const t = types.get('t'); + if (!t) { + throw new pytorch.Error(); + } + value.setType(new torch.ListType(t)); + result.push(value); + break; } - if (result.length > 1) { - return result; + default: { + const dict = parameter.type.match(/^Dict\((\w+),\s*(\w+)\)$/); + if (dict) { + const value = this.variable(null, node); + value.__origin__ = schema.name; + const keyType = this.toType(dict[1], types); + const valueType = this.toType(dict[2], types); + value.setType(new torch.DictType(keyType, valueType)); + result.push(value); + break; + } else { + const output = this.invoke('torch.Tensor', []); + output.resize_([]); + output.__origin__ = schema.name; + this.variable(output, node); + result.push(output); + break; + } } - return result[0]; } } - return super.call(target, name, args, context); + for (const referencedParameter of referencedParameters) { + referencedParameter.__count__ = (referencedParameter.__count__ || 0) + 1; + } + if (result.length > 1) { + return result; + } + return result[0]; } isType(obj, type) { @@ -2685,7 +3280,8 @@ pytorch.jit.Execution = class extends pytorch.Execution { return !Array.isArray(obj) && (pytorch.Utility.isTensor(obj) || obj === null || (obj instanceof torch.Value && obj.type() instanceof torch.TensorType)); case 'Tensor[]': - return Array.isArray(obj) && obj.length > 0 && obj.every((tensor) => pytorch.Utility.isTensor(tensor) || tensor === null); + return Array.isArray(obj) && obj.length > 0 && + obj.every((tensor) => pytorch.Utility.isTensor(tensor) || tensor === null || (tensor instanceof torch.Value && tensor.type() instanceof torch.TensorType)); case 'Scalar': return (obj !== null && (obj !== Object(obj) || obj instanceof Number)) || (pytorch.Utility.isTensor(obj) && Array.isArray(obj.size()) && obj.size().length === 0) || @@ -2696,12 +3292,12 @@ pytorch.jit.Execution = class extends pytorch.Execution { if (Array.isArray(obj) && obj.every((item) => item === true || item === false)) { return true; } - if (pytorch.Utility.isInstance(obj, 'torch.Value') && pytorch.Utility.isInstance(obj.type(), 'torch.ListType') && pytorch.Utility.isInstance(obj.type().getElementType(), 'torch.BoolType')) { + if (obj instanceof torch.Value && obj.type() instanceof torch.ListType && obj.type().getElementType() instanceof torch.BoolType) { return true; } return false; case 'string': - return obj === null || typeof obj === 'string'; + return obj === null || typeof obj === 'string' || (obj instanceof torch.Value && obj.type() instanceof torch.StringType); case 'SymInt': case 'int64': return Number.isInteger(obj) || typeof obj === 'bigint' || @@ -2747,7 +3343,8 @@ pytorch.jit.Execution = class extends pytorch.Execution { case 'Layout': case 'ScalarType': case 'MemoryFormat': - return Number.isInteger(obj) || obj === null; + return Number.isInteger(obj) || obj === null || + (obj instanceof torch.Value && obj.type() instanceof torch.IntType); case 'Dimname': return obj === null || (typeof obj === 'string' || obj instanceof String); case 'Dimname[]': @@ -2755,219 +3352,319 @@ pytorch.jit.Execution = class extends pytorch.Execution { case 'Device': return obj === null || obj === Object(obj); case 't[]': - return Array.isArray(obj) || (pytorch.Utility.isInstance(obj, 'torch.Value') && pytorch.Utility.isInstance(obj.type(), 'torch.ListType')); + return Array.isArray(obj) || (obj instanceof torch.Value && obj.type() instanceof torch.ListType); case 't': return true; case 'AnyEnumType': return false; - default: + case 'complex': + return obj instanceof torch.Value && obj.type() instanceof torch.ComplexType; + case 'Any[]': + if (Array.isArray(obj)) { + return true; + } + if (obj instanceof torch.Value && obj.type() instanceof torch.ListType) { + return true; + } + return false; + case 't1': + case 't2': + return true; + default: { if (type && type.startsWith('__torch__.') && obj && obj.__class__ && obj.__class__.__module__ && obj.__class__.__name__) { return type === `${obj.__class__.__module__}.${obj.__class__.__name__}`; } + const match = type.match(/^\((\w+),\stVal\)\[\]$/); + if (match) { + if (obj instanceof torch.Value && obj.type() instanceof torch.ListType && obj.type().getElementType() instanceof torch.TupleType) { + const elements = obj.type().getElementType().elements(); + if (elements.length === 2) { + if (pytorch.Utility.toType(elements[0]) === match[1]) { + return true; + } + } + } + return false; + } + if (type.startsWith('Dict(') && type.endsWith(')')) { + if (obj instanceof torch.Value && obj.type() instanceof torch.DictType) { + const params = type.substring(5, type.length - 1).split(',').map((item) => item.trim()); + if ((params[0] === 't' || params[0] === pytorch.Utility.toType(obj.type().getKeyType())) && + (params[1] === 't' || params[1] === pytorch.Utility.toType(obj.type().getValueType))) { + return true; + } + } + return false; + } + // throw new pytorch.Error(`Unknown type '${type}'.`); return true; + } } } - fromType(type) { - const torch = this.torch; - if (type instanceof torch.ListType) { - return `${this.fromType(type.getElementType())}[]`; - } - if (type instanceof torch.TensorType) { - return 'Tensor'; - } - if (type instanceof torch.IntType) { - return 'int64'; - } - if (type instanceof torch.FloatType) { - return 'float32'; - } - throw new pytorch.Error(`Unknown type '${type.kind()}'.`); - } - _overload(target, name, args, context) { - let moduleName = pytorch.Utility.target(target); - if (moduleName) { - let outputTypes = null; - let type = name ? `${moduleName}.${name}` : moduleName; - if (type === 'ops.prim.NumToTensor' && args.length === 1 && args[0].type === 'call' && args[0].target.member.type === 'id') { - const [arg] = args; - moduleName = pytorch.Utility.target(arg.target.target); - name = arg.target.member.value; - args = arg.args; - outputTypes = ['int64']; - type = `${moduleName}.${name}`; - } - // https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/native_functions.yaml - let overloads = null; - if (type.startsWith('torch.')) { - overloads = this._types.get(`aten::${type.substring(6)}`); - /* } else if (type.startsWith('ops.prim.')) { - overloads = this._types.get(`prim::${type.substring(9)}`); - } else if (type === 'int') { - overloads = this._types.get(`aten::Int`); - // "bool": "aten::Bool" - // "int": "aten::Int" - // "float": "aten::Float" - // "complex": "aten::Complex" - // "abs": "prim::abs" - // "max": "prim::max" - // "min": "prim::min" - // "range": "fake::does_not_exist" - */ - } else if (type.startsWith('ops.') && !type.startsWith('ops.prim.')) { - const path = type.split('.'); - if (path.length === 3) { - overloads = this._types.get(`${path[1]}::${path[2]}`); - } - if (!overloads) { - const module = this.import(moduleName); - if (!module || !module[name]) { - const metadata = {}; - metadata.name = type; - metadata.inputs = []; - metadata.outputs = []; - for (let i = 0; i < args.length; i++) { - const input = {}; - let argument = args[i]; - input.name = i.toString(); - if (argument.type === '=' && argument.target && argument.target.type === 'id') { - input.name = this.expression(argument.target, context); - argument = argument.expression; - } - const obj = this.expression(argument, context); - input.type = pytorch.Utility.getType(obj); - metadata.inputs.push(input); - } - const count = context.target.length > 0 ? context.target[context.target.length - 1].length : 0; - for (let i = 0; i < count; i++) { - metadata.outputs.push({ name: '', type: '' }); + const moduleName = pytorch.Utility.target(target); + if (!moduleName) { + return null; + } + const torch = this.torch; + const type = name ? `${moduleName}.${name}` : moduleName; + // const outputTypes = null; + // https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/native_functions.yaml + let overloads = null; + if (type.startsWith('torch.')) { + overloads = this._types.get(`aten::${type.substring(6)}`); + } else if (type.startsWith('ops.prim.')) { + overloads = this._types.get(`prim::${type.substring(9)}`); + } else if (type === 'int') { + overloads = this._types.get(`aten::Int`); + } else if (type === 'str') { + overloads = this._types.get(`aten::str`); + // "bool": "aten::Bool" + // "int": "aten::Int" + // "float": "aten::Float" + // "complex": "aten::Complex" + // "range": "fake::does_not_exist" + } else if (type.startsWith('ops.') && !type.startsWith('ops.prim.')) { + const path = type.split('.'); + if (path.length === 3) { + overloads = this._types.get(`${path[1]}::${path[2]}`); + } + if (!overloads) { + const module = this.import(moduleName); + if (!module || !module[name]) { + const metadata = {}; + metadata.name = type; + metadata.inputs = []; + metadata.outputs = []; + for (let i = 0; i < args.length; i++) { + const input = {}; + let argument = args[i]; + input.name = i.toString(); + if (argument.type === '=' && argument.target && argument.target.type === 'id') { + input.name = this.expression(argument.target, context); + argument = argument.expression; } - this._metadata.add(type, metadata); - overloads = [metadata]; + const obj = this.expression(argument, context); + input.type = pytorch.Utility.getType(obj); + metadata.inputs.push(input); } + const count = context.target.length > 0 ? context.target[context.target.length - 1].length : 0; + for (let i = 0; i < count; i++) { + metadata.outputs.push({ name: '', type: '' }); + } + this._metadata.add(type, metadata); + overloads = [metadata]; } } - if (overloads) { - overloads = Array.isArray(overloads) ? overloads : [overloads]; - const evalArgs = args.map((argument) => { - if (argument.type === '=' && argument.target && argument.target.type === 'id') { - argument = argument.expression; - } - return this.expression(argument, context); - }); - for (const schema of overloads) { - const copyArgs = Array.prototype.slice.call(args); - const copyEvalArgs = Array.prototype.slice.call(evalArgs); - const parameters = Array.prototype.slice.call(schema.inputs || []).concat(Array.prototype.slice.call(schema.attributes || [])); - let next = false; - while (copyEvalArgs.length > 0) { - if (parameters.length <= 0) { - next = !schema.name.startsWith('_caffe2::'); + } + if (!overloads) { + if (type.startsWith('aten::') || type.startsWith('prim::')) { + throw new pytorch.Error(`Unknown function '${type}'.`); + } + return null; + } + overloads = Array.isArray(overloads) ? overloads : [overloads]; + const evalArgs = args.map((argument) => { + if (argument.type === '=' && argument.target && argument.target.type === 'id') { + argument = argument.expression; + } + return this.expression(argument, context); + }); + const matches = []; + for (const schema of overloads) { + const copyArgs = Array.prototype.slice.call(args); + const copyEvalArgs = Array.prototype.slice.call(evalArgs); + const parameters = Array.prototype.slice.call(schema.inputs || []).concat(Array.prototype.slice.call(schema.attributes || [])); + let next = false; + let kwarg_only = false; + while (copyEvalArgs.length > 0) { + if (parameters.length <= 0) { + next = !schema.name.startsWith('_caffe2::') && !schema.is_vararg; + break; + } + if (copyArgs.every((arg) => arg.type === '=' && arg.target && arg.target.type === 'id') && + parameters.every((parameter) => parameter.type !== 'Tensor' && parameter.type !== 'Tensor[]')) { + const map = new Map(parameters.map((parameter) => [parameter.name, parameter])); + while (copyArgs.length > 0) { + const argument = copyArgs.shift(); + const arg = copyEvalArgs.shift(); + const parameter = map.get(argument.target.value); + if (!parameter) { + next = true; break; } - if (copyArgs.every((arg) => arg.type === '=' && arg.target && arg.target.type === 'id') && - parameters.every((parameter) => parameter.type !== 'Tensor' && parameter.type !== 'Tensor[]')) { - const map = new Map(parameters.map((parameter) => [parameter.name, parameter])); - while (copyArgs.length > 0) { - const argument = copyArgs.shift(); - const arg = copyEvalArgs.shift(); - const parameter = map.get(argument.target.value); - if (!parameter) { - next = true; - break; - } - if (!this.isType(arg, parameter.type)) { - if (parameter.optional) { - continue; - } - next = true; - break; - } - } - continue; + if (parameter.kwarg_only) { + kwarg_only = true; } - if (next) { - break; + let type = parameter.type; + let optional = false; + if (parameter.type.endsWith('?')) { + type = parameter.type.substring(0, parameter.type.length - 1); + optional = true; } - const parameter = parameters.shift(); - const [argument] = copyEvalArgs; - if (parameter.type === 'Tensor' || (parameter.type === 'Scalar' && pytorch.Utility.isTensor(argument))) { - if (Array.isArray(argument) || (!pytorch.Utility.isTensor(argument) && argument !== null && argument !== undefined)) { - if (parameter.optional) { - continue; - } - next = true; - } else { - copyArgs.shift(); - copyEvalArgs.shift(); - } - } else if (parameter.type === 'Tensor[]') { - const [argument] = copyEvalArgs; - if (!Array.isArray(argument) || !argument.every((item) => pytorch.Utility.isTensor(item) || item === null)) { - if (parameter.optional) { - continue; - } - next = true; - } else { - copyArgs.shift(); - copyEvalArgs.shift(); - } - } else { - const [arg] = copyArgs; - if (!this.isType(argument, parameter.type) && argument !== null) { - if (parameter.optional) { - continue; - } - next = true; - } else if (arg.type === '=') { - throw new pytorch.Error('Expected named argument.'); - } else { - copyArgs.shift(); - copyEvalArgs.shift(); + if (!this.isType(arg, type)) { + if (optional) { + continue; } - } - if (next) { + next = true; break; } } - if (next) { - continue; + continue; + } + if (next) { + break; + } + const parameter = parameters.shift(); + if (parameter.kwarg_only) { + kwarg_only = true; + } + const [argument] = copyEvalArgs; + /* if (type === 'Tensor' || (type === 'Scalar' && pytorch.Utility.isTensor(argument))) { + if (Array.isArray(argument) || (!pytorch.Utility.isTensor(argument) && argument !== null && argument !== undefined)) { + if (optional) { + continue; + } + next = true; + } else { + copyArgs.shift(); + copyEvalArgs.shift(); } - for (let i = 0; i < schema.outputs.length; i++) { - const parameter = schema.outputs[i]; - switch (parameter.type) { - case 'Scalar': - case 'Tensor': - case 'Tensor[]': - break; - // case 'int64': - // break; - case '__torch__.torch.classes.xnnpack.LinearOpContext': - case '__torch__.torch.classes.xnnpack.Conv2dOpContext': - case '__torch__.torch.classes.xnnpack.TransposeConv2dOpContext': - case '__torch__.torch.classes.rnn.CellParamsBase': - case '__torch__.torch.classes.quantized.LinearPackedParamsBase': - case '__torch__.torch.classes.quantized.Conv2dPackedParamsBase': - case '__torch__.torch.classes.quantized.Conv3dPackedParamsBase': - break; - default: { - if (!outputTypes || schema.outputs.length !== 1 || schema.outputs[0].type !== outputTypes[0]) { - next = true; - } - break; - } + } else */ + let type = parameter.type; + let optional = false; + if (parameter.type.endsWith('?')) { + type = parameter.type.substring(0, parameter.type.length - 1); + optional = true; + } + if (optional === true && + (type === 'float32' || type === 'boolean' || type === 'int64' || type === 'complex' || type === 'ScalarType' || type === 'Device' || type === 'Layout') && + argument instanceof torch.Value && argument.type() instanceof torch.NoneType) { + copyArgs.shift(); + copyEvalArgs.shift(); + } else if (type === 'Tensor[]') { + const [argument] = copyEvalArgs; + if ((argument instanceof torch.Value && pytorch.Utility.toType(argument.type()) === 'Tensor[]') || + (Array.isArray(argument) && argument.every((item) => pytorch.Utility.isTensor(item) || item === null || (item instanceof torch.Value && item.type() instanceof torch.TensorType)))) { + copyArgs.shift(); + copyEvalArgs.shift(); + } else { + if (optional) { + continue; } + next = true; } - if (next) { - continue; + } else if (type === 't[]') { + if (!Array.isArray(argument) && (argument instanceof torch.Value === false || argument.type() instanceof torch.ListType === false)) { + if (optional) { + continue; + } + next = true; + } else { + copyArgs.shift(); + copyEvalArgs.shift(); + } + } else { + const [arg] = copyArgs; + if (!this.isType(argument, type) && argument !== null) { + if (optional) { + continue; + } + next = true; + } else if (arg.type === '=') { + next = true; + // throw new pytorch.Error('Expected named argument.'); + } else { + copyArgs.shift(); + copyEvalArgs.shift(); } - return [schema, args, evalArgs]; + } + if (next) { + break; } } + if (next) { + continue; + } + if (!kwarg_only && parameters.some((parameter) => parameter.default === undefined)) { + continue; + } + for (let i = 0; i < schema.outputs.length; i++) { + const parameter = schema.outputs[i]; + switch (parameter.type) { + case 'Scalar': + case 'Tensor': + case 'Tensor[]': + case 'float32': + case 'float32[]': + case 'int64': + case 'int64[]': + case 'Device': + case 'boolean': + case 'boolean[]': + case 't': + case 't[]': + case 'complex': + case 'complex[]': + case 'string': + case 'string[]': + case 'Dict(string, Tensor)': + case 'Dict(Tensor, t)': + case 'Dict(boolean, t)': + case 'Dict(complex, t)': + case 'Dict(float32, t)': + case 'Dict(int64, t)': + case 'Dict(string, t)': + case 'Dict(Tensor, tVal)': + case 'Dict(boolean, tVal)': + case 'Dict(complex, tVal)': + case 'Dict(float32, tVal)': + case 'Dict(int64, tVal)': + case 'Dict(string, tVal)': + case 'Any': + break; + case '__torch__.torch.classes.xnnpack.LinearOpContext': + case '__torch__.torch.classes.xnnpack.Conv2dOpContext': + case '__torch__.torch.classes.xnnpack.TransposeConv2dOpContext': + case '__torch__.torch.classes.rnn.CellParamsBase': + case '__torch__.torch.classes.quantized.LinearPackedParamsBase': + case '__torch__.torch.classes.quantized.Conv2dPackedParamsBase': + case '__torch__.torch.classes.quantized.Conv3dPackedParamsBase': + break; + default: { + throw new pytorch.Error(`Unknown return type '${parameter.type}'.`); + // if (!outputTypes || schema.outputs.length !== 1 || schema.outputs[0].type !== outputTypes[0]) { + // next = true; + // } + // break; + } + } + } + if (next) { + continue; + } + matches.push(schema); } - return null; + if (matches.length > 1) { + const keys = new Map([['int64', 1], ['float32', 2], ['Scalar', 3]]); + matches.sort((a, b) => { + let keyA = keys.get(a.inputs[0].type) || 4; + let keyB = keys.get(b.inputs[0].type) || 4; + if (keyA === keyB && a.inputs.length > 1 && b.inputs.length > 1) { + keyA = keys.get(a.inputs[1].type) || 4; + keyB = keys.get(b.inputs[1].type) || 4; + } + return keyA - keyB; + }); + } + if (matches.length > 0) { + return [matches[0], evalArgs]; + } + throw new pytorch.Error(`Unknown function '${type}'.`); + // console.log(` ${type}`); + // return null; } block(statements, context) { @@ -3523,7 +4220,9 @@ pytorch.jit.FlatBuffersLoader = class { for (const [name, value] of this._all_functions) { const class_index = module.ivalues[name].val.class_type; const class_type = this._all_types[class_index]; - class_type.addMethod(value); + if (value) { + class_type.addMethod(value); + } } m._min_operator_version = module.operator_version; m._bytecode_version = module.bytecode_version; @@ -3734,6 +4433,37 @@ pytorch.Utility = class { } } + static toType(type) { + if (pytorch.Utility.isInstance(type, 'torch.ListType')) { + return `${pytorch.Utility.toType(type.getElementType())}[]`; + } + if (pytorch.Utility.isInstance(type, 'torch.IntType')) { + return `int64`; + } + if (pytorch.Utility.isInstance(type, 'torch.FloatType')) { + return `float32`; + } + if (pytorch.Utility.isInstance(type, 'torch.StringType')) { + return `string`; + } + if (pytorch.Utility.isInstance(type, 'torch.ComplexType')) { + return `complex`; + } + if (pytorch.Utility.isInstance(type, 'torch.BoolType')) { + return `boolean`; + } + if (pytorch.Utility.isInstance(type, 'torch.TensorType')) { + return `Tensor`; + } + if (pytorch.Utility.isInstance(type, 'torch.TupleType')) { + return `(${type.elements().map((type) => pytorch.Utility.toType(type)).join(', ')})`; + } + if (pytorch.Utility.isInstance(type, 'torch.DeviceObjType')) { + return `Device`; + } + throw new pytorch.Error(`Unsupported type '${type.kind()}'.`); + } + static isObjectType(type) { switch (type) { case '__torch__.torch.classes.xnnpack.LinearOpContext': diff --git a/source/pytorch.py b/source/pytorch.py index b5955c9445..c4b0c70aea 100644 --- a/source/pytorch.py +++ b/source/pytorch.py @@ -274,37 +274,34 @@ def type(self, schema): # pylint: disable=missing-function-docstring self._argument(argument, getattr(_, 'type')) return self.types[key] + def _argument_type(self, value): + if isinstance(value, Schema.OptionalType): + element_type = self._argument_type(value.element_type) + return f'{element_type}?' + if isinstance(value, Schema.ListType): + element_type = self._argument_type(value.element_type) + size = str(value.size) if hasattr(value, 'size') else '' + return f'{element_type}[{size}]' + if isinstance(value, Schema.DictType): + key_type = self._argument_type(value.getKeyType()) + value_type = self._argument_type(value.getValueType()) + return f'Dict({key_type}, {value_type})' + if isinstance(value, Schema.TupleType): + elements = [] + for element in value.elements(): + elements.append(self._argument_type(element)) + return f'({', '.join(elements)})' + name = value.name + return self._primitives[name] if name in self._primitives else name + def _argument(self, argument, value): - optional = False - argument_type = '' - while not isinstance(value, str): - if isinstance(value, Schema.OptionalType): - value = value.element_type - optional = True - elif isinstance(value, Schema.ListType): - size = str(value.size) if hasattr(value, 'size') else '' - argument_type = '[' + size + ']' + argument_type - value = value.element_type - elif isinstance(value, Schema.DictType): - name = value.getKeyType().name - key_type = self._primitives[name] if name in self._primitives else name - name = value.getValueType().name - value_type = self._primitives[name] if name in self._primitives else name - value = f'Dict({key_type}, {value_type})' - argument_type = value - else: - name = value.name - name = self._primitives[name] if name in self._primitives else name - argument_type = name + argument_type - break + argument_type = self._argument_type(value) if argument_type: argument['type'] = argument_type else: argument.pop('type', None) - if optional: - argument['optional'] = True - else: - argument.pop('optional', False) + if 'optional' in argument: + del argument['optional'] class Schema: # pylint: disable=too-few-public-methods,missing-class-docstring def __init__(self, value): @@ -463,6 +460,15 @@ def __str__(self): return self.name @staticmethod def parse(lexer): # pylint: disable=missing-function-docstring + if lexer.eat('('): + lexer.whitespace(0) + elements = [] + while not lexer.eat(')'): + elements.append(Schema.Type.parse(lexer)) + lexer.whitespace(0) + lexer.eat(',') + lexer.whitespace(0) + return Schema.TupleType(elements) name = lexer.expect('id') while lexer.eat('.'): name = name + '.' + lexer.expect('id') @@ -508,6 +514,11 @@ def getKeyType(self): # pylint: disable=invalid-name,missing-function-docstring return self._key_type def getValueType(self): # pylint: disable=invalid-name,,missing-function-docstring return self._value_type + class TupleType: + def __init__(self, elements): + self._elements = elements + def elements(self): # pylint: disable=invalid-name,,missing-function-docstring + return self._elements class Lexer: # pylint: disable=too-few-public-methods,missing-class-docstring def __init__(self, buffer): self.buffer = buffer diff --git a/test/models.json b/test/models.json index 8563a8aead..35c3be23a1 100644 --- a/test/models.json +++ b/test/models.json @@ -5243,7 +5243,6 @@ "target": "deeplabv3_scripted.ptl", "source": "https://github.com/lutzroeder/netron/files/9562007/deeplabv3_scripted.ptl.zip[deeplabv3_scripted.ptl]", "format": "TorchScript v1.6", - "assert": "model.graphs[0].nodes[0].inputs[1].value.type.name == '__torch__.torch.classes.xnnpack.Conv2dOpContext'", "link": "https://github.com/lutzroeder/netron/issues/842" }, { @@ -5334,7 +5333,7 @@ "type": "pytorch", "target": "fasterrcnn_resnet50_fpn.pt", "source": "https://github.com/lutzroeder/netron/files/7677467/fasterrcnn_resnet50_fpn.pt.zip[fasterrcnn_resnet50_fpn.pt]", - "error": "Unsupported torch.add expression type.", + "error": "Unknown function 'torch.items'.", "link": "https://github.com/lutzroeder/netron/issues/689" }, { @@ -5491,7 +5490,7 @@ "target": "mask_model.pt", "source": "https://github.com/lutzroeder/netron/files/10080302/mask_model.pt.zip[mask_model.pt]", "format": "TorchScript v1.7", - "error": "Unsupported torch.add expression type.", + "error": "Unknown function 'torch.items'.", "link": "https://github.com/lutzroeder/netron/issues/842" }, { @@ -5785,7 +5784,7 @@ "type": "pytorch", "target": "netron_issue_547_1.pt", "source": "https://github.com/lutzroeder/netron/files/5137393/netron_issue_547_1.zip[netron_issue_547_1.pt]", - "error": "Unsupported torch.add expression type.", + "error": "Unknown function 'torch.add'.", "link": "https://github.com/lutzroeder/netron/issues/547" }, { @@ -5821,7 +5820,6 @@ "target": "opt_xx.pt", "source": "https://github.com/lutzroeder/netron/files/8747908/opt_xx.pt.zip[opt_xx.pt]", "format": "TorchScript v1.6", - "error": "Slicing expected array", "link": "https://github.com/lutzroeder/netron/issues/913" }, { @@ -5849,7 +5847,7 @@ "type": "pytorch", "target": "pyg_model.pt", "source": "https://github.com/lutzroeder/netron/files/10369483/pyg_model.zip[pyg_model.pt]", - "error": "Expected \\'edge_index\\' to be of integer type (got \\'6\\')", + "error": "Unknown function 'torch.linear'.", "link": "https://github.com/lutzroeder/netron/issues/546" }, { @@ -5864,7 +5862,6 @@ "target": "quant_3d.pt", "source": "https://github.com/lutzroeder/netron/files/5877566/quant_3d.pt.zip[quant_3d.pt]", "format": "TorchScript v1.6", - "assert": "model.graphs[0].nodes[1].inputs[1].value.type.name == '__torch__.torch.classes.quantized.Conv3dPackedParamsBase'", "link": "https://github.com/lutzroeder/netron/issues/546" }, { @@ -5892,7 +5889,7 @@ "type": "pytorch", "target": "rcnn.pt", "source": "https://github.com/lutzroeder/netron/files/9035740/rcnn.pt.zip[rcnn.pt]", - "error": "AssertionError: expecting the last two dimensions of the Tensor to be H and W instead got []", + "error": "Unknown function 'torch.items'.", "link": "https://github.com/lutzroeder/netron/issues/842" }, { @@ -6346,7 +6343,6 @@ "target": "transformer.pt", "source": "https://github.com/lutzroeder/netron/files/10271969/transformer.pt.zip[transformer.pt]", "format": "TorchScript v1.6", - "error": "AssertionError: was expecting embedding dimension of 512, but got ?", "link": "https://github.com/lutzroeder/netron/issues/842" }, { @@ -6502,8 +6498,7 @@ "type": "pytorch", "target": "yolox_m.torchscript.pt", "source": "https://github.com/lutzroeder/netron/files/15031984/yolox_m.torchscript.pt.zip[yolox_m.torchscript.pt]", - "format": "TorchScript v1.5", - "error": "ValueError: not enough values to unpack (expected 3, actual 1).", + "format": "TorchScript v1.6", "link": "https://github.com/lutzroeder/netron/issues/842" }, { diff --git a/tools/pytorch_script.py b/tools/pytorch_script.py index 8343f8f491..6a5623ccb5 100644 --- a/tools/pytorch_script.py +++ b/tools/pytorch_script.py @@ -59,20 +59,226 @@ def _write_metadata(value): ('aten/src/ATen/native/RNN.cpp', re.compile(r'TORCH_SELECTIVE_SCHEMA\("(.*)"', re.MULTILINE)), ('torch/jit/_shape_functions.py', - re.compile(r'(prim::.*->\s*.*)"', re.MULTILINE)) + re.compile(r'(prim::.*->\s*.*)"', re.MULTILINE)), + ('torch/csrc/jit/runtime/static/native_ops.cpp', + re.compile(r'(prim::.*->\s*.*)"', re.MULTILINE)), ] known_schema_definitions = [ - 'aten::as_tensor(Tensor(a) data, *, ScalarType? dtype=None, Device? device=None) -> Tensor(b|a)', # pylint: disable=line-too-long + 'aten::__and__.bool(bool a, bool b) -> bool', + 'aten::__and__.int(int a, int b) -> int', + 'aten::__and__.Scalar(Tensor self, Scalar other) -> Tensor', + 'aten::__and__.Tensor(Tensor self, Tensor other) -> Tensor', + 'aten::__getitem__.Dict_bool(Dict(bool, t) self, bool key) -> t(*)', + 'aten::__getitem__.Dict_complex(Dict(complex, t) self, complex key) -> t(*)', + 'aten::__getitem__.Dict_float(Dict(float, t) self, float key) -> t(*)', + 'aten::__getitem__.Dict_int(Dict(int, t) self, int key) -> t(*)', + 'aten::__getitem__.Dict_str(Dict(str, t) self, str key) -> t(*)', + 'aten::__getitem__.Dict_Tensor(Dict(Tensor, t) self, Tensor key) -> t(*)', + 'aten::__getitem__.str(str s, int index) -> str', + 'aten::__getitem__.t(t[](a) list, int idx) -> t(*)', + 'aten::any.all_out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::any.bool(bool[] self) -> bool', + 'aten::any.dim(Tensor self, int dim, bool keepdim=False) -> Tensor', + 'aten::any.dimname_out(Tensor self, str dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!)', # pylint: disable=line-too-long + 'aten::any.dimname(Tensor self, str dim, bool keepdim=False) -> Tensor', + 'aten::any.dims_out(Tensor self, int[]? dim=None, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!)', # pylint: disable=line-too-long + 'aten::any.dims(Tensor self, int[]? dim=None, bool keepdim=False) -> Tensor', + 'aten::any.float(float[] self) -> bool', + 'aten::any.int(int[] self) -> bool', + 'aten::any.out(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::any.str(str[] self) -> bool', + 'aten::any(Tensor self) -> Tensor', 'aten::as_tensor.bool(bool t, *, ScalarType? dtype=None, Device? device=None) -> Tensor', 'aten::as_tensor.complex(complex t, *, ScalarType? dtype=None, Device? device=None) -> Tensor', 'aten::as_tensor.float(float t, *, ScalarType? dtype=None, Device? device=None) -> Tensor', 'aten::as_tensor.int(int t, *, ScalarType? dtype=None, Device? device=None) -> Tensor', 'aten::as_tensor.list(t[] data, *, ScalarType? dtype=None, Device? device=None) -> Tensor', - 'aten::searchsorted.Tensor(Tensor sorted_sequence, Tensor self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None) -> Tensor', # pylint: disable=line-too-long - 'aten::searchsorted.Tensor_out(Tensor sorted_sequence, Tensor self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None, Tensor(a!) out) -> Tensor(a!)', # pylint: disable=line-too-long - 'aten::searchsorted.Scalar(Tensor sorted_sequence, Scalar self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None) -> Tensor', # pylint: disable=line-too-long + 'aten::as_tensor(Tensor(a) data, *, ScalarType? dtype=None, Device? device=None) -> Tensor(b|a)', # pylint: disable=line-too-long + 'aten::ceil.float(float a) -> int', + 'aten::ceil.int(int a) -> int', + 'aten::ceil.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::ceil.Scalar(Scalar a) -> Scalar', + 'aten::ceil(Tensor self) -> Tensor', + 'aten::dict.bool((bool, tVal)[] inputs) -> Dict(bool, tVal)', + 'aten::dict.complex((complex, tVal)[] inputs) -> Dict(complex, tVal)', + 'aten::dict.Dict_bool(Dict(bool, t)(a) self) -> Dict(bool, t)', + 'aten::dict.Dict_complex(Dict(complex, t)(a) self) -> Dict(complex, t)', + 'aten::dict.Dict_float(Dict(float, t)(a) self) -> Dict(float, t)', + 'aten::dict.Dict_int(Dict(int, t)(a) self) -> Dict(int, t)', + 'aten::dict.Dict_str(Dict(str, t)(a) self) -> Dict(str, t)', + 'aten::dict.Dict_Tensor(Dict(Tensor, t)(a) self) -> Dict(Tensor, t)', + 'aten::dict.float((float, tVal)[] inputs) -> Dict(float, tVal)', + 'aten::dict.int((int, tVal)[] inputs) -> Dict(int, tVal)', + 'aten::dict.str((str, tVal)[] inputs) -> Dict(str, tVal)', + 'aten::dict.Tensor((Tensor, tVal)[] inputs) -> Dict(Tensor, tVal)', + 'aten::dict() -> Dict(str, Tensor)', + 'aten::div.complex(complex a, complex b) -> complex', + 'aten::div.float(float a, float b) -> float', + 'aten::div.int(int a, int b) -> float', + 'aten::div.out_mode(Tensor self, Tensor other, *, str? rounding_mode, Tensor(a!) out) -> Tensor(a!)', # pylint: disable=line-too-long + 'aten::div.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::div.Scalar_mode_out(Tensor self, Scalar other, *, str? rounding_mode, Tensor(a!) out) -> Tensor(a!)', # pylint: disable=line-too-long + 'aten::div.Scalar_mode(Tensor self, Scalar other, *, str? rounding_mode) -> Tensor', + 'aten::div.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::div.Scalar(Tensor self, Scalar other) -> Tensor', + 'aten::div.Tensor_mode(Tensor self, Tensor other, *, str? rounding_mode) -> Tensor', + 'aten::div.Tensor(Tensor self, Tensor other) -> Tensor', + 'aten::div(Scalar a, Scalar b) -> float', + 'aten::eq_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)', + 'aten::eq_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)', + 'aten::eq.bool_list(bool[] a, bool[] b) -> bool', + 'aten::eq.bool(bool a, bool b) -> bool', + 'aten::eq.complex_float(complex a, float b) -> bool', + 'aten::eq.complex(complex a, complex b) -> bool', + 'aten::eq.device(Device a, Device b) -> bool', + 'aten::eq.enum(AnyEnumType a, AnyEnumType b) -> bool', + 'aten::eq.float_complex(float a, complex b) -> bool', + 'aten::eq.float_int(float a, int b) -> bool', + 'aten::eq.float_list(float[] a, float[] b) -> bool', + 'aten::eq.float(float a, float b) -> bool', + 'aten::eq.int_float(int a, float b) -> bool', + 'aten::eq.int_list(int[] a, int[] b) -> bool', + 'aten::eq.int(int a, int b) -> bool', + 'aten::eq.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::eq.Scalar(Tensor self, Scalar other) -> Tensor', + 'aten::eq.str_list(str[] a, str[] b) -> bool', + 'aten::eq.str(str a, str b) -> bool', + 'aten::eq.Tensor_list(Tensor[] a, Tensor[] b) -> bool', + 'aten::eq.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::eq.Tensor(Tensor self, Tensor other) -> Tensor', + 'aten::eq(Scalar a, Scalar b) -> bool', + 'aten::equal(Tensor self, Tensor other) -> bool', + 'aten::extend.t(t[](a!) self, t[] other) -> ()', + 'aten::gt_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)', + 'aten::gt_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)', + 'aten::gt.float_int(float a, int b) -> bool', + 'aten::gt.float(float a, float b) -> bool', + 'aten::gt.int_float(int a, float b) -> bool', + 'aten::gt.int(int a, int b) -> bool', + 'aten::gt.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::gt.Scalar(Tensor self, Scalar other) -> Tensor', + 'aten::gt.str(str a, str b) -> bool', + 'aten::gt.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::gt.Tensor(Tensor self, Tensor other) -> Tensor', + 'aten::gt(Scalar a, Scalar b) -> bool', + 'aten::item(Tensor self) -> Scalar', + 'aten::items.bool(Dict(bool, t) self) -> ((bool, t)[])', + 'aten::items.complex(Dict(complex, t) self) -> ((complex, t)[])', + 'aten::items.float(Dict(float, t) self) -> ((float, t)[])', + 'aten::items.int(Dict(int, t) self) -> ((int, t)[])', + 'aten::items.str(Dict(str, t) self) -> ((str, t)[])', + 'aten::items.Tensor(Dict(Tensor, t) self) -> ((Tensor, t)[])', + 'aten::keys.bool(Dict(bool, t) self) -> bool[](*)', + 'aten::keys.complex(Dict(complex, t) self) -> complex[](*)', + 'aten::keys.float(Dict(float, t) self) -> float[](*)', + 'aten::keys.int(Dict(int, t) self) -> int[](*)', + 'aten::keys.str(Dict(str, t) self) -> str[](*)', + 'aten::keys.Tensor(Dict(Tensor, t) self) -> Tensor[](*)', + 'aten::le_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)', + 'aten::le_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)', + 'aten::le.float_int(float a, int b) -> bool', + 'aten::le.float(float a, float b) -> bool', + 'aten::le.int_float(int a, float b) -> bool', + 'aten::le.int(int a, int b) -> bool', + 'aten::le.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::le.Scalar(Tensor self, Scalar other) -> Tensor', + 'aten::le.str(str a, str b) -> bool', + 'aten::le.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::le.Tensor(Tensor self, Tensor other) -> Tensor', + 'aten::le(Scalar a, Scalar b) -> bool', + 'aten::log10.complex(complex a) -> complex', + 'aten::log10.float(float a) -> float', + 'aten::log10.int(int a) -> float', + 'aten::log10.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::log10.Scalar(Scalar a) -> Scalar', + 'aten::log10(Tensor self) -> Tensor', + 'aten::lt_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)', + 'aten::lt_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!)', + 'aten::lt.float_int(float a, int b) -> bool', + 'aten::lt.float(float a, float b) -> bool', + 'aten::lt.int_float(int a, float b) -> bool', + 'aten::lt.int(int a, int b) -> bool', + 'aten::lt.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::lt.Scalar(Tensor self, Scalar other) -> Tensor', + 'aten::lt.str(str a, str b) -> bool', + 'aten::lt.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::lt.Tensor(Tensor self, Tensor other) -> Tensor', + 'aten::lt(Scalar a, Scalar b) -> bool', + 'aten::remainder.float_int(float a, int b) -> float', + 'aten::remainder.float(float a, float b) -> float', + 'aten::remainder.int_float(int a, float b) -> float', + 'aten::remainder.int(int a, int b) -> int', + 'aten::remainder.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::remainder.Scalar_Tensor_out(Scalar self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::remainder.Scalar_Tensor(Scalar self, Tensor other) -> Tensor', + 'aten::remainder.Scalar(Tensor self, Scalar other) -> Tensor', + 'aten::remainder.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::remainder.Tensor(Tensor self, Tensor other) -> Tensor', + 'aten::remainder(Scalar a, Scalar b) -> Scalar', + 'aten::replace(str self, str old, str new, int max=-1) -> str', 'aten::searchsorted.Scalar_out(Tensor sorted_sequence, Scalar self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None, Tensor(a!) out) -> Tensor(a!)', # pylint: disable=line-too-long + 'aten::searchsorted.Scalar(Tensor sorted_sequence, Scalar self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None) -> Tensor', # pylint: disable=line-too-long + 'aten::searchsorted.Tensor_out(Tensor sorted_sequence, Tensor self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None, Tensor(a!) out) -> Tensor(a!)', # pylint: disable=line-too-long + 'aten::searchsorted.Tensor(Tensor sorted_sequence, Tensor self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None) -> Tensor', # pylint: disable=line-too-long + 'aten::sqrt.complex(complex a) -> complex', + 'aten::sqrt.float(float a) -> float', + 'aten::sqrt.int(int a) -> float', + 'aten::sqrt.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)', + 'aten::sqrt.Scalar(Scalar a) -> Scalar', + 'aten::sqrt(Tensor self) -> Tensor', + 'aten::values.bool(Dict(bool, t) self) -> t[](*)', + 'aten::values.complex(Dict(complex, t) self) -> t[](*)', + 'aten::values.float(Dict(float, t) self) -> t[](*)', + 'aten::values.int(Dict(int, t) self) -> t[](*)', + 'aten::values.str(Dict(str, t) self) -> t[](*)', + 'aten::values.Tensor(Dict(Tensor, t) self) -> t[](*)', + 'aten::values(Tensor(a) self) -> Tensor(a)', + 'prim::abs.complex(complex a) -> float', + 'prim::abs.float(float a) -> float', + 'prim::abs.int(int a) -> int', + 'prim::abs.Scalar(Scalar a) -> Scalar', + 'prim::abs(Tensor x) -> Tensor', + 'prim::device(Tensor a) -> Device', + 'prim::is_cpu(Tensor a) -> bool', + 'prim::is_cuda(Tensor a) -> bool', + 'prim::is_ipu(Tensor a) -> bool', + 'prim::is_maia(Tensor a) -> bool', + 'prim::is_meta(Tensor a) -> bool', + 'prim::is_mkldnn(Tensor a) -> bool', + 'prim::is_mps(Tensor a) -> bool', + 'prim::is_mtia(Tensor a) -> bool', + 'prim::is_nested(Tensor a) -> bool', + 'prim::is_quantized(Tensor a) -> bool', + 'prim::is_sparse_csr(Tensor a) -> bool', + 'prim::is_sparse(Tensor a) -> bool', + 'prim::is_vulkan(Tensor a) -> bool', + 'prim::is_xla(Tensor a) -> bool', + 'prim::is_xpu(Tensor a) -> bool', + 'prim::itemsize(Tensor a) -> int', + 'prim::layout(Tensor a) -> Layout', + 'prim::max.bool_list(bool[] l, bool[] r) -> bool[]', + 'prim::max.float_int(float a, int b) -> float', + 'prim::max.float_list(float[] l, float[] r) -> float[]', + 'prim::max.float(float a, float b) -> float', + 'prim::max.int_float(int a, float b) -> float', + 'prim::max.int_list(int[] l, int[] r) -> int[]', + 'prim::max.int(int a, int b) -> int', + 'prim::max.self_bool(bool[] self) -> bool', + 'prim::max.self_float(float[] self) -> float', + 'prim::max.self_int(int[] self) -> int', + 'prim::max(Scalar a, Scalar b) -> Scalar', + 'prim::min.bool_list(bool[] l, bool[] r) -> bool[]', + 'prim::min.float_int(float a, int b) -> float', + 'prim::min.float_list(float[] l, float[] r) -> float[]', + 'prim::min.float(float a, float b) -> float', + 'prim::min.int_float(int a, float b) -> float', + 'prim::min.int_list(int[] l, int[] r) -> int[]', + 'prim::min.int(int a, int b) -> int', + 'prim::min.self_bool(bool[] self) -> bool', + 'prim::min.self_float(float[] self) -> float', + 'prim::min.self_int(int[] self) -> int', + 'prim::min(Scalar a, Scalar b) -> Scalar', ] def _parse_schemas(): @@ -99,7 +305,6 @@ def _parse_schemas(): return schemas def _filter_schemas(schemas, types): - keys = set(map(lambda _: _.split('.')[0], types.keys())) filtered_schemas = set() for schema in schemas.values(): @@ -162,23 +367,34 @@ def _check_types(types, schemas): 'aten::arange.start_out_', 'aten::classes._nnapi.Compilation', 'aten::fft', - 'aten::gt.float_int', - 'aten::gt.float', - 'aten::gt.int_float', - 'aten::gt.int', - 'aten::le.float_int', - 'aten::le.float', - 'aten::le.int_float', - 'aten::le.int', + 'aten::floor.float', + 'aten::floor.int', + 'aten::floor.Scalar', + 'aten::floordiv.float_int', + 'aten::floordiv.float', + 'aten::floordiv.int_float', + 'aten::floordiv.int', + 'aten::floordiv.Scalar', + 'aten::grid_sampler.legacy', + 'aten::mul.float_int', + 'aten::mul.int_float', + 'aten::mul.int', 'aten::mul.ScalarT', - 'aten::remainder.float32', - 'aten::remainder.int', + 'aten::mul', + 'aten::ne.float', + 'aten::ne.int', + 'aten::ne.str', + 'aten::neg.complex', + 'aten::neg.float', + 'aten::neg.int', + 'aten::neg.Scalar', 'aten::sub.float', 'aten::sub.int', 'aten::sub.str', 'aten::tensor.bool', 'aten::tensor.float', - 'aten::tensor.int' + 'aten::tensor.int', + 'prim::shape', ] for key in known_keys: types.pop(key)