Home
last modified time | relevance | path

Searched refs:python_type (Results 1 – 25 of 26) sorted by relevance

12

/external/pytorch/torch/_dynamo/variables/
Dlists.py84 return self.python_type()([x.as_python_constant() for x in self.items])
87 assert self.python_type() is not SizeVariable
88 return self.python_type()(self._as_proxy())
176 def python_type(self): member in RangeVariable
294 return self.python_type()(*self._as_proxy())
396 def python_type(self): member in ListVariable
442 class_type = self.python_type()
450 if self.python_type() is not list:
456 def python_type(self): member in DequeVariable
528 def python_type(self): member in TupleVariable
[all …]
Dtorch_function.py175 return var.python_type()
186 return VariableBuilder(tx, TypeSource(var.source))(var.python_type())
188 return SourcelessBuilder.create(tx, var.python_type())
196 attr_val = inspect.getattr_static(var.python_type(), name)
296 def python_type(self): member in TensorWithTFOverrideVariable
384 )(inspect.getattr_static(self.python_type(), name))
Ddicts.py171 def python_type(self): member in ConstDictVariable
451 def python_type(self): member in SetVariable
562 def python_type(self): member in FrozensetVariable
651 def python_type(self): member in DictKeys
674 def python_type(self): member in DictValues
976 def python_type(self): member in PythonSysModulesVariable
Dtensor.py167 def python_type(self): member in TensorVariable
374 return UserDefinedClassVariable(self.python_type())
1040 isinstance(a, ConstantVariable) and a.python_type() == int for a in args
1097 def python_type(self): member in SymNodeVariable
1252 def python_type(self): member in NumpyNdarrayVariable
Diter.py345 def python_type(self): member in ZipVariable
454 def python_type(self): member in MapVariable
Dfunctions.py159 def python_type(self): member in UserFunctionVariable
309 def python_type(self): member in UserMethodVariable
579 def python_type(self): member in SkipFunctionVariable
Dbase.py186 def python_type(self): member in VariableTracker
Ddistributed.py41 def python_type(self): member in DistributedVariable
Duser_defined.py641 def python_type(self): member in UserDefinedObjectVariable
1251 return self.python_type()(*args, **kwargs)
1377 def python_type(self): member in RemovableHandleVariable
Dmisc.py96 type_to_use = self.objvar.python_type()
1146 def python_type(self): member in PythonModuleVariable
1616 def python_type(self): member in RandomVariable
Dnn_module.py150 def python_type(self): member in NNModuleVariable
1020 and value.python_type() is torch.nn.Parameter
Dbuiltin.py1476 arg_type = arg.python_type()
1499 return issubclass(arg.python_type(), ty)
1899 py_type = obj.python_type()
Dhigher_order_ops.py953 if input.python_type() != list:
985 if combine_result.python_type() != list:
/external/pytorch/torch/csrc/
DExceptions.h89 PyErr_SetString(e.python_type(), msg); \
269 virtual PyObject* python_type() = 0;
289 PyObject* python_type() override { in python_type() function
297 PyObject* python_type() override { in python_type() function
/external/pytorch/torch/_refs/nn/functional/
D__init__.py173 python_type = utils.dtype_to_type(a.dtype)
174 if not utils.is_weakly_lesser_type(type(alpha), python_type):
233 python_type = utils.dtype_to_type(a.dtype)
235 utils.is_weakly_lesser_type(type(input_scale), python_type),
239 utils.is_weakly_lesser_type(type(scale), python_type),
243 utils.is_weakly_lesser_type(type(alpha), python_type),
376 python_type = utils.dtype_to_type(a.dtype)
377 if not utils.is_weakly_lesser_type(type(negative_slope), python_type):
476 python_type = utils.dtype_to_type(a.dtype)
477 if not utils.is_weakly_lesser_type(type(beta), python_type):
/external/pytorch/torch/fx/experimental/
Dschema_type_annotation.py87 python_type = _torchscript_type_to_python_type(maybe_inferred_ts_type.type())
88 … attr_proxy.node.type = python_type if not attr_proxy.node.type else attr_proxy.node.type
/external/pytorch/torch/_dynamo/
Dcomptime.py78 def python_type(self): member in ComptimeVar
83 return self.__variable.python_type()
Dcodegen.py173 and value.python_type() == float
Doutput_graph.py1105 and not (isinstance(v, SymNodeVariable) and v.python_type() is float)
Dsymbolic_convert.py3065 args=[arg.python_type() for arg in args],
/external/pytorch/torch/_inductor/codegen/
Dwrapper.py88 python_type = repr(arg.real_type) # type: ignore[attr-defined]
90 if python_type == "Tensor":
97 if python_type in PYTHON_TO_CPP:
98 cpp_type = PYTHON_TO_CPP[python_type]
103 container_match = re.findall(py_container + r"\[([a-zA-Z_]+)]", python_type)
117 python_type = repr(ret.real_type) # type: ignore[attr-defined]
123 cpp_type = python_to_cpp.get(python_type, None)
128 if python_type == "Tensor" and ret.alias_info is not None:
/external/pytorch/test/dynamo/
Dtest_comptime.py405 SELF.assertIs(y.python_type(), torch.Tensor)
Dtest_misc.py4156 self.assertEqual(ConstDictVariable(d1).python_type(), dict)
4158 ConstDictVariable(d2, collections.OrderedDict).python_type(),
8867 self.assertEqual(expected_variable.python_type(), type(device))
8888 self.assertEqual(expected_variable.python_type(), type(dtype))
/external/pytorch/torch/_refs/
D__init__.py647 python_type = utils.dtype_to_type(a.dtype)
648 if not utils.is_weakly_lesser_type(type(value), python_type):
1088 python_type = utils.dtype_to_type(dtype)
1089 if python_type != bool and not utils.is_weakly_lesser_type(
1090 type(alpha), python_type
1730 python_type = utils.dtype_to_type(dtype)
1731 if not utils.is_weakly_lesser_type(type(alpha), python_type):
1819 python_type = utils.dtype_to_type(dtype)
1821 utils.is_weakly_lesser_type(type(value), python_type),
1846 python_type = utils.dtype_to_type(dtype)
[all …]
/external/pytorch/torch/_decomp/
Ddecompositions.py2614 python_type = utils.dtype_to_type(x.dtype)
2616 python_type == bool
2617 or utils.is_weakly_lesser_type(type(alpha), python_type),

12