Home
last modified time | relevance | path

Searched refs:src_dtype (Results 1 – 23 of 23) sorted by relevance

/external/executorch/backends/transforms/
Dconvert_dtype_pass.py22 src_dtype: torch.dtype,
33 self.src_dtype = src_dtype
52 if self._is_tensor_of_dtype(node_val, self.src_dtype):
70 if self._is_tensor_of_dtype(node_val, self.src_dtype):
80 if self._is_tensor_of_dtype(node_val, self.src_dtype):
87 {"dtype": self.src_dtype},
/external/tensorflow/tensorflow/python/framework/
Dpython_tensor_converter.cc97 DataType src_dtype = DataTypeForTensor(src); in Convert() local
98 if (src_dtype == DT_INVALID) return nullptr; in Convert()
99 if (!CheckDType(src_dtype, dtype)) return nullptr; in Convert()
/external/pytorch/torch/csrc/jit/tensorexpr/
Deval.cpp454 std::vector<DstType> castValues(const Dtype& src_dtype, const InterpValue& v) in castValues() argument
458 for (int i = 0; i < src_dtype.lanes(); ++i) { in castValues()
467 const Dtype& src_dtype, in doCastFromSrc() argument
473 this->value_ = InterpValue(castValues<SrcType, Type>(src_dtype, v)); \ in doCastFromSrc()
499 Dtype src_dtype = src_value->dtype(); in visit() local
500 if (src_dtype.lanes() != dst_dtype.lanes()) { in visit()
504 if (src_dtype != dst_dtype) { in visit()
505 switch (src_dtype.scalar_type()) { in visit()
508 doCastFromSrc<Type>(src_dtype, dst_dtype, value_); \ in visit()
522 const Dtype& src_dtype, in bitcastValues() argument
[all …]
/external/pytorch/torch/_inductor/codegen/cuda/
Dcutlass_epilogue_gen.py200 def reduction(self, dtype, src_dtype, reduction_type, value): argument
343 def _op_to_dtype(self, a, dtype, src_dtype=None): argument
350 assert src_dtype in (
357 def reduction(self, dtype, src_dtype, reduction_type, value): argument
/external/pytorch/torch/_inductor/codegen/
Dcpp.py204 src_dtype=None, argument
206 is_bool = src_dtype == torch.bool
544 def to_dtype(x, dtype, src_dtype=None, use_compute_types=True): argument
546 if src_dtype is None:
547 src_dtype = x.dtype
548 expr = V.kernel.get_to_dtype_expr(x, dtype, src_dtype)
550 csevar.update_on_args("to_dtype", (x, dtype), {"src_dtype": src_dtype})
551 if dtype in [torch.bfloat16, torch.float16] and src_dtype == torch.float:
583 V.kernel.cache_dtype_convert(x, src_dtype, csevar, dtype)
587 def to_dtype_bitcast(x, dtype, src_dtype): argument
[all …]
Dtriton.py617 src_dtype: Optional[torch.dtype] = None,
621 src_dtype: torch.dtype, dst_dtype: torch.dtype
623 if src_dtype == dst_dtype:
636 src_dtype in fp8_dtypes
638 and src_dtype != dst_dtype
640 if src_dtype == torch.float8_e5m2 or dst_dtype == torch.float8_e5m2:
642 if src_dtype == torch.float8_e4m3fn or dst_dtype == torch.float8_e4m3fn:
647 if src_dtype is not None:
652 _get_min_elements_per_thread(src_dtype, dtype),
671 def to_dtype_bitcast(x, dtype: torch.dtype, src_dtype: torch.dtype):
[all …]
Dtriton_split_scan.py78 def reduction(self, dtype, src_dtype, reduction_type, value): argument
Dhalide.py250 src_dtype: Optional[torch.dtype] = None,
258 def to_dtype_bitcast(x, dtype: torch.dtype, src_dtype: torch.dtype):
259 if src_dtype in (torch.float16, torch.bfloat16):
1180 src_dtype: torch.dtype,
1187 cache_key = (src_dtype, reduction_type, value)
1208 default = ir.Reduction.default_accumulator(reduction_type, src_dtype)
Dcommon.py1700 src_dtype: torch.dtype,
1956 src_dtype: torch.dtype,
1961 return self.reduction(dtype, src_dtype, reduction_type, value)
/external/pytorch/torch/_inductor/
Dops_handler.py143 src_dtype: Optional[torch.dtype] = None,
184 def to_dtype_bitcast(self, x: T, dtype: torch.dtype, src_dtype: torch.dtype) -> T:
244 src_dtype: torch.dtype,
914 src_dtype: torch.dtype,
918 line = self.parent_handler.reduction(dtype, src_dtype, reduction_type, value)
Dir.py612 src_dtype: torch.dtype
637 self.src_dtype,
667 self.src_dtype,
675 src_dtype, argument
831 src_dtype,
898 def _unroll_reduction_fn(inner_fn, reduction_ranges, reduction_type, src_dtype): argument
904 combine_fn = get_reduction_combine_fn(reduction_type, src_dtype)
942 src_dtype: torch.dtype,
982 dtype=src_dtype,
1012 inner_fn, reduction_ranges, reduction_type, src_dtype
[all …]
Dloop_body.py452 def reduction(self, dtype, src_dtype, reduction_type, value): argument
453 result = self._inner.reduction(dtype, src_dtype, reduction_type, value)
Dindex_propagation.py92 src_dtype: Optional[torch.dtype] = None,
Ddependencies.py720 src_dtype: torch.dtype,
Dutils.py1818 src_dtype, argument
1838 and needs_fallback_due_to_atomic_add_limitations(src_dtype)
Dlowering.py629 src_dtype = x.get_dtype()
630 if src_dtype == dtype:
634 return ops.to_dtype(x, dtype, src_dtype=src_dtype)
5123 src_dtype=x.get_dtype(),
/external/tensorflow/tensorflow/compiler/xla/python/
Dxla_client_test.py796 "testcase_name": "_{}_{}".format(src_dtype.__name__,
798 "src_dtype": src_dtype,
800 } for src_dtype, dst_dtype in itertools.permutations(
803 def testConvertElementType(self, src_dtype, dst_dtype): argument
804 if ((src_dtype in [np.int64, np.float64] or
809 x = np.array([0, 1, 0, 0, 1], dtype=src_dtype)
825 "testcase_name": "_{}_{}".format(src_dtype.__name__,
827 "src_dtype": src_dtype,
831 for src_dtype, dst_dtype in itertools.permutations(dtypes, 2))
833 def testBitcastConvertType(self, src_dtype, dst_dtype): argument
[all …]
/external/pytorch/torch/utils/_sympy/
Dvalue_ranges.py466 def to_dtype(a, dtype, src_dtype=None): argument
968 def reduction(self, name, dtype, src_dtype, reduction_type, index, value): argument
977 def to_dtype(x, dtype: torch.dtype, src_dtype: Optional[torch.dtype] = None):
/external/pytorch/test/inductor/
Dtest_fp8.py193 self, src_dtype: torch.dtype, dst_dtype: torch.dtype, shape: str
202 x = torch.rand(*shape, device="cuda", dtype=src_dtype)
/external/pytorch/test/
Dtest_foreach.py1315 for src_dtype in floating_types_and(torch.half, torch.bfloat16):
1316 if src_dtype == dtype:
1319 src_tensors = [t.to(src_dtype) for t in self_tensors]
Dtest_mps.py4310 def helper(src_shape, dst_shape, src_dtype, dst_dtype): argument
4311 cpu_src = torch.randint(0, 127, src_shape).to(src_dtype)
4321 for (src_dtype, dst_dtype) in itertools.product(test_dtypes, test_dtypes):
4322 helper((2, 1), (2, 3), src_dtype, dst_dtype)
4323 helper((2, 1), (2, 2), src_dtype, dst_dtype)
4324 helper((3, 1, 4, 1), (3, 4, 4, 5), src_dtype, dst_dtype)
4325 helper((3,), (2, 3), src_dtype, dst_dtype)
4326 helper((2,), (2, 2), src_dtype, dst_dtype)
4327 helper((4, 1, 5), (3, 4, 4, 5), src_dtype, dst_dtype)
4328 helper((4, 1, 5), (4, 0, 5), src_dtype, dst_dtype)
[all …]
Dtest_torch.py3204 for dst_dtype, src_dtype in [
3210 src = make_tensor((100,), dtype=src_dtype, device=device)
3229 for dst_dtype, src_dtype in [
3233 src = make_tensor((100,), dtype=src_dtype, device=device)
6349 def can_cast(src_dtype, dst_dtype): argument
6357 return is_unsigned_int(src_dtype)
6358 return torch.can_cast(src_dtype, dst_dtype)
6369 for src_dtype in src_dtypes:
6370 src = make_tensor_wrapper((50,), dtype=src_dtype)
6372 dst = make_tensor_wrapper((50, ), dtype=src_dtype)
[all …]
/external/pytorch/benchmarks/static_runtime/
Dtest_static_runtime.cc139 const auto src_dtype = R"JIT( in TEST() local
166 testStaticRuntime(src_dtype, args_dtype); in TEST()