experimental_experiment.torch_interpreter._prims_functions¶
- experimental_experiment.torch_interpreter._prims_functions.prims_add(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, y: str, name='prims_add') str [source]¶
add
- experimental_experiment.torch_interpreter._prims_functions.prims_amax(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, dim: int | None = None, keepdim: bool = False, output_dtype: torch.dtype | None = None, name: str = 'prims_amax') str [source]¶
reducemax
- experimental_experiment.torch_interpreter._prims_functions.prims_broadcast_in_dim(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], a: str, shape: List[int], broadcast_dimensions: List[int]) str [source]¶
broadcast
s = list(shape) for broadcast_dimension in broadcast_dimensions: s[broadcast_dimension] = -1 v = a for idx, x in enumerate(s): if x != -1: v = unsqueeze(v, idx) return expand(v, shape)
- experimental_experiment.torch_interpreter._prims_functions.prims_cat(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], tensors: Tuple[str, ...], dim: int = 0, name: str = 'prims_cat') str [source]¶
concat
- experimental_experiment.torch_interpreter._prims_functions.prims_clone(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, memory_format: str | None = None) str [source]¶
identity
- experimental_experiment.torch_interpreter._prims_functions.prims_collapse_view(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, start: int, end: int, name: str = 'prims_collapse_view') str [source]¶
reshape
- experimental_experiment.torch_interpreter._prims_functions.prims_convert_element_type(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, dtype: torch.dtype, name: str = 'prims_convert_element_type') str [source]¶
cast
- experimental_experiment.torch_interpreter._prims_functions.prims_cos(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, name: str = 'prims_cos') str [source]¶
cos
- experimental_experiment.torch_interpreter._prims_functions.prims_div(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, y: str, name: str = 'prims_div') str [source]¶
div
- experimental_experiment.torch_interpreter._prims_functions.prims_empty_strided(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], size: str, stride: str, dtype: torch.dtype | None = None, layout=None, device: torch.device | None = None, requires_grad: bool = False, name: str = 'prims_empty_strided') str [source]¶
constantofshape
- experimental_experiment.torch_interpreter._prims_functions.prims_eq(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, y: str, name: str = 'prims_eq') str [source]¶
equal
- experimental_experiment.torch_interpreter._prims_functions.prims_exp(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, name: str = 'prims_exp') str [source]¶
exp
- experimental_experiment.torch_interpreter._prims_functions.prims_ge(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, y: str, name: str = 'prims_ge') str [source]¶
less
- experimental_experiment.torch_interpreter._prims_functions.prims_gt(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, y: str, name: str = 'prims_gt') str [source]¶
greater
- experimental_experiment.torch_interpreter._prims_functions.prims_iota(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], length: int, start: int = 0, step: int = 1, dtype: torch.dtype | None = None, device: torch.device | None = None, requires_grad: bool = False) str [source]¶
arange
- experimental_experiment.torch_interpreter._prims_functions.prims_lt(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, y: str, name: str = 'prims_lt') str [source]¶
less
- experimental_experiment.torch_interpreter._prims_functions.prims_mul(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, y: str, name: str = 'prims_mul') str [source]¶
mul
- experimental_experiment.torch_interpreter._prims_functions.prims_neg(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, name='prims_neg') str [source]¶
neg
- experimental_experiment.torch_interpreter._prims_functions.prims_pow(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, exponent: str, name: str = 'prims_pow') str [source]¶
pow
- experimental_experiment.torch_interpreter._prims_functions.prims_rsqrt(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, name: str = 'prims_rsqrt') str [source]¶
rqsrt
- experimental_experiment.torch_interpreter._prims_functions.prims_sin(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, name: str = 'prims_sin') str [source]¶
sim
- experimental_experiment.torch_interpreter._prims_functions.prims_split_dim(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, dim: int, outer_length: int, name: str = 'prims_split_dim')[source]¶
split
- experimental_experiment.torch_interpreter._prims_functions.prims_sub(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, y: str, name: str = 'prims_sub') str [source]¶
sub
- experimental_experiment.torch_interpreter._prims_functions.prims_sum(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], x: str, dim: int | List[int] | None = None, keepdim: bool = False, output_dtype: torch.dtype | None = None) str [source]¶
reducesum
- experimental_experiment.torch_interpreter._prims_functions.prims_transpose(g: GraphBuilder, sts: Dict[str, Any] | None, outputs: List[str], input_name: str, perm: List[int], name: str = 'prims_transpose') str [source]¶
transpose